Shop OBEX P1 Docs P2 Docs Learn Events
controlling a push button on a dvd player — Parallax Forums

controlling a push button on a dvd player

FranciscoFrancisco Posts: 26
edited 2010-01-15 08:47 in Propeller 1
Hello, I am trying to control the push buttons on a dvd player to remotely access its functions via the propeller.

I took the voltage reading on one side of a button that i want to control and it read 5v. When i pressed the button this connection would get grounded.

I connected the propellers' ground to the dvds' ground and I assinged a pin to the 5v side of the dvd button. I imagined that sending a low then high signal to the button would simulate the button getting pushed but this didn't work.

My questing is whether there is a way to interface the dvd players buttons with propeller without using extra circuitry, for example can i have the propellers pin be in a "floating/no connect" state to simulate the button being depressed without drawing current.

If that isn't possible, will i need to use a transistor to gate the button perhaps?

Thanks for any input you may have.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-11 20:21
    You may damage the Propeller by connecting it directly to a 5V source. Given that this is a pushbutton that grounds the 5V signal, there's probably a pullup resistor there which may protect the Propeller. You're better off using an NPN switching transistor like a 2N2222A or 2N3904 to take the place of the pushbutton with the emitter grounded, the collector connected to the +5V side of the pushbutton and the base connected through a 220 Ohm resistor to a Propeller I/O pin. Make the Propeller I/O pin low to turn off the transistor and high to turn it on. In a low state, the I/O pin will draw very little current.

    My preference for this sort of thing is to use 3.3V coil SPST NO reed relays with a diode reverse connected across the coil. This has the advantage of being able to directly replace or parallel the pushbutton without needing a common ground between the two pieces of equipment and you don't need to know how the pushbutton is connected internally since there's no direct connection to the Propeller. DigiKey carries some nice reed relays that can be directly driven by a Propeller I/O pin.
  • FranciscoFrancisco Posts: 26
    edited 2010-01-14 03:42
    Thanks Mike, I am going to try this one: www.radioshack.com/product/index.jsp?productId=2062479 . Is the diode necessary as you mentioned?
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-14 04:35
    The diode is necessary. You'll also need a switching transistor (like a 2N2222A or 2N3904) and you'll need to have a 12V power source for the relay coil. The switching transistor will need a base resistor (say 220 to 330 Ohms).

    If you get the RadioShack reed relay with the 5VDC coil, you'll be able to run the switching transistor off a 5V power source which you probably have.
    www.radioshack.com/product/index.jsp?productId=2062478

    To drive a reed relay directly from a Propeller I/O pin, it has to have a coil voltage around 3V with a coil current around 20mA (or less). You'd still need the diode, but you wouldn't need the switching transistor.

    Post Edited (Mike Green) : 1/14/2010 4:40:34 AM GMT
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-01-14 05:11
    The diode reversed biased across the relay coil (not contacts) is necessary as you get transient spikes from the relay's coil (or any coil for that matter) when the coil is switched off. These diodes suppress the spikes by providing a short circuit path for the current induced when the coil is switched off. Best to use switching diodes as they react very quickly and are intended for exactly the purpose for which you will be using them...try these

    http://www.radioshack.com/product/index.jsp?productId=2062576

    here is a blurb from an application note for relays which helps to explain why those diodes are so important:

    The Need for Transient Suppression>>>

    When an electromechanical relay is de-energized rapidly by a mecanical
    switch or semiconductor, the collapsing magnetic field produces a
    substantial voltage transient in its effort to disperse the stored energy
    and oppose the sudden change of current flow. A 12VDC relay, for example,
    may generate a voltage of 1,000 to 1,500 volts during turn-off. With the
    advent of modern electronic systems, this relatively large voltage transient
    has created EMI, semiconductor breakdown, and switch wear problems
    for the design engineer. It has thus become common practice to suppress
    relay coils with other components which limit the peak voltage to a much
    smaller level.
  • rjo_rjo_ Posts: 1,825
    edited 2010-01-14 06:26
    Fransico,

    I had the same issue, and I promise this will work. Use a 5 volt RadioShack Reed Relay... it works fine at 3.3 volts. Connect both sides of the button to the long axis of the relay and when you want to push the button send the relay a signal straight out of your Prop to one end of the short axis pins on the relay and connect the other side of the short axis pins of the relay to Propeller ground... and hook your propeller ground to your DVD's ground. No diodes, No resistors, No harm. No foul. Works every time.

    Rich
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-01-14 09:02
    On a lot of button inputs the contact is a part of a scanned matrix and so doesn't have a dirrect supply or a dirrect ground connection. Some use a chain of resistors and via an A2D convert it to the command. Either way the completely isolated relay contact across the button should work.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-01-14 19:37
    Usually you find a pedant of the buttons on the remote control. So, can't you simply use·a TV-B-Gone solution?·
    You record the codes of the buttons you want to be used by the propeller and replay that with a IR LED.
  • FranciscoFrancisco Posts: 26
    edited 2010-01-15 08:47
    rjo_ said...
    Fransico,

    I had the same issue, and I promise this will work. Use a 5 volt RadioShack Reed Relay... it works fine at 3.3 volts. Connect both sides of the button to the long axis of the relay and when you want to push the button send the relay a signal straight out of your Prop to one end of the short axis pins on the relay and connect the other side of the short axis pins of the relay to Propeller ground... and hook your propeller ground to your DVD's ground. No diodes, No resistors, No harm. No foul. Works every time.

    Rich

    Thanks for your confirmation on this. I tried your suggestion, a radio shack reed relay and common ground worked like a charm! Thanks for everyones suggestions.
Sign In or Register to comment.