small project --> suggestion

Hi.

I need to build one interrupt driver module with raspberry, but to make this possible i have to make one small in between board which should do following:

- i have one 12 VDC button that is connected to one external box

- when the user presses this button, i should send 3,3v to RSP GPIO

- start the TV ( connected over HDMI )

- this should trigger RSP program to display "user guide movie "

- when the movie is over, program should send shutdown signal to TV

So all together, this should be some multimedia help "station" that should be triggered on button press and when completed, it should stops to work. The process repeats it self every time the button is pressed. Btw. if you press button when the movie is running, nothing should happen...

What i dont know is:

- would it be enough to make some voltage divider from 12 to 3,3V and do i need some kind of additional protection ?

- how can i send startup / shutdown signal to TV ?

Best regards !

Reply to
gm
Loading thread data ...

That depends on where the 12V is coming from. A voltage divider that's protected by diodes to ground and power might be enough. If it were me I'd drive a transistor from the 12V line, with a protection diode. Something like this should be safe. Design the resistive divider to have about 2V without the transistor, and to deliver between 10uA and 1mA to the transistor base. The diode keeps the transistor from turning to crispy critters if the 12V line goes horribly negative. Size the collector resistor to flow about 10 times the base current at 3.3V. The transistor can be just about any small-signal NPN.

+3.3V o | .-. | | | | '-' | | o------o !ON | | "ON" ___ |/ o-------|___|----o--------o------| | | |> | | | .-. | | | | - | | | ^ | '-' | | | | | | | | | | | === === === GND GND GND (created by AACircuit v1.28.7 beta 02/28/13
formatting link

Dunno -- it depends on the TV.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com 

I'm looking for work -- see my website!
Reply to
Tim Wescott

To play it safe:

12V button signal -> resistor -> FOD814

formatting link

Other side of the coupler to the Raspberry which AFAIK can be internally set to pull-up. If you find an optocoupler that can already take 12V and has the resistor built in you'd only have one part. But make sure it has back-to-back diodes in the opto for ESD safety.

Probably this is an avenue to switch in and out of standby:

formatting link

But the TV (and Raspberry) has to support this.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

D'oh. Of course. Once again Joerg has suggested something that has me saying to ignore what I said. Ignore what I said -- Joerg is right.

BTW, your link gets an Adobe PDF icon. Try this one:

--
Tim Wescott 
Control systems, embedded software and circuit design 
I'm looking for work!  See my website if you're interested 
http://www.wescottdesign.com
Reply to
Tim Wescott

Thank you for reply guys ! Ok. i will then go with Jorg's solution.

Btw. i do have one more question...

I have one additional board that is hooked up to arduino and on this upper board you have one relay and one resistor.

formatting link

The idea is to get signal / impulse for triggering the RSP GPIO. This relay part is working and i get impulse.

Now, i want to pull this impulse from resistor so the idea was to solder one side of resistor and one gnd to GPIO and GND or RSP.

On the resistor side i can measure: one side --> 0.0V - 0.7V second side --> 0,0 - 4,7V

It looks like that 0-0.7V is not enough to activate RSP GPIO input so only way should be to make some voltage divider.

I dont know but i was thinking that 0-0.7V should trigger GPIO.

Maybe i should pull this impulse from transistor ?

Anyway, my question would be, how to trigger this GPIO and if i need to step down voltage from 5 to cca 3V, what would be the best way to do it...

Regards !

Reply to
gm

That is because the BE junction of the transistor will not go any higher. Bipolar junction transistors such as the BC547 are current driven at their base. To the outside world the base behaves like a diode with its cathode on ground (in this case with the NPN transistor).

If that 4.7V is very stable, comes from a well-regulated digital board, then you can use it directly.

Raspberry boards are 3.3V logic? If so, just hang another two resistors as a voltage divider to the left side of your 1k resistor. For example,

4.99k to the left of you 1k resistor, another 10k in series which goes to ground. Then your 3.3V control signal would show up where the 4.99k and the 10k are connected.
--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

Ok. Thank you for reply. Btw. please look at this answer:

/////////////////////////////////////////// GPIO voltage levels are 3.3V and are not 5V tolerant. There is no over-voltage protection on the board - the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board.

from:

formatting link

These are 3.3 volt logic pins. A voltage near 3.3 V is interpreted as a logic one while a voltage near zero volts is a logic zero. A GPIO pin should never be connected to a voltage source greater than 3.3V or less than 0V, as prompt damage to the chip may occur as the input pin substrate diodes (shown as parasitic FETs in Figure 1) conduct. There may be times when you may need to connect them to out-of-range voltages ? in those cases the input pin current must be limited by an external resistor to a value that prevents harm to the chip. I recommend that you never source or sink more than 0.5 mA into an input pin. /////////////////////////////////////////////////

For example, 4.99k to the left of you 1k resistor, another 10k in series which goes to ground. ****

Would it be much of a problem to draw this ? It would be much simpler for me to understand, because i dont want to fry new PCB. I can pull GND from few places so this is not a problem...

GM

Reply to
gm

OK. you are suggesting this :

formatting link

but before i make this can you please take a look at the answer that one guy has posted...

Reply to
gm

Yes, that's how it's done. But which guy and which answer? All I can see is an imgae.

[...]
--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

/////////////////////////////////////////// GPIO voltage levels are 3.3V and are not 5V tolerant. There is no over-voltage protection on the board - the intention is that people interested in serious interfacing will use an external board with buffers, level conversion and analog I/O rather than soldering directly onto the main board.

from:

formatting link

These are 3.3 volt logic pins. A voltage near 3.3 V is interpreted as a logic one while a voltage near zero volts is a logic zero. A GPIO pin should never be connected to a voltage source greater than 3.3V or less than 0V, as prompt damage to the chip may occur as the input pin substrate diodes (shown as parasitic FETs in Figure 1) conduct. There may be times when you may need to connect them to out-of-range voltages ? in those cases the input pin current must be limited by an external resistor to a value that prevents harm to the chip. I recommend that you never source or sink more than 0.5 mA into an input pin. /////////////////////////////////////////////////

Btw. i created as you suggested and i get max 3,25V and this is perfect. I read in one doc, that HIGH level is from 2,8 - 3.3V

Thank you !

Reply to
gm

The last two sentences are key: Limit the current into the ESD or substrate diode paths. Most modern chips can take 5-10mA but don't push it. The 4.99k in your new interface will limit that to less than 1mA. In general two things need to be kept in mind with any external driving:

  1. If a higher than allowed voltage is applied yet properly current limited your target circuit (in this case the Raspberry) will dump this current into its logic supply rail. Most regulators on there can only source current but not sink any. So the other stuff on there must use enough current to consume this excess coming in. Usually not a problem but it can become an issue if the target board can go into low-power hibernation modes. Then the supply voltage might rise beyond safe levels unless you have means to clamp it.
  2. When the target board is powered off any remaining external logic drive signals will try to feed the target board via the ESD diodes. That can cause it to do weird stuff such as an LCD flickering once in a while.

You are welcome. As a co-worker from the software group once said when he got me out of a pickle, we are all here to serve.

--
Regards, Joerg 

http://www.analogconsultants.com/
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.