+/- 12V Input
hippy
Posts: 1,981
The PICmicro and others can tolerate connection of high voltages to input pins providing the signal is current limited; is this the same for the Propeller or is it a "do not do it" ? Having only just got my Propeller hardware I'd prefer to not destroy it in the first few days.
For example, +/-12V through a 47K would be just 260uA if the 47K were dropping the entire voltage. I'd have no problem going to a higher R as long as it worked.
I've read the "5V interfacing" sticky, but there wasn't anything I saw which really said how far the input voltage could be pushed at low current. I could buffer the signal through a 74HCxx which I know does work for other micros, but it seems over-kill if a single resistor will do the job.
For example, +/-12V through a 47K would be just 260uA if the 47K were dropping the entire voltage. I'd have no problem going to a higher R as long as it worked.
I've read the "5V interfacing" sticky, but there wasn't anything I saw which really said how far the input voltage could be pushed at low current. I could buffer the signal through a 74HCxx which I know does work for other micros, but it seems over-kill if a single resistor will do the job.
Comments
I don't know why... but these discussions always seem to vector toward that common answer.
There's nothing more to it than good old Ohm's law.
As long as your resistor limits current to acceptable values, you will be fine.
The Prop has no idea if you input 1, 10 or 100 volts as long as the resistor drops it. As you increase the voltage, you will find that power dissipation in the resistor becomes an issue. I am currently inputting an "unknown" voltage to a couple of pins. This voltage may be up to a few hundred hundred volts and I need to find out how many times per second it goes to zero V (it is about counting breakdowns in a thin layer of insulating liquid).
For this, I use a 100 kohm series resistor. At 300 V, the power dissipation is 900 mW, so I have put in 3 times 33 kohm to keep temperature down (the tiny resistors can only take a few hundred milliwatts). It also helps keep flash-over voltage up (it is usually around 250 V for 1/2 W resistors).
Why not 1 Mohm? Simply because the low-pass filter created from 1 Mohm and the pin and stray capacitance (about 10 pF) cuts off fast pulses. At 100 kohm, the corner frequency is around 150 kHz. With 1 Mohm, it would be 15 kHz, which would make the counting very unreliable.
The Prop and its counters are just perfect for this application. As it is for any application I have seen so far.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Isolate everything... and keep it all as far apart as the design will allow... keep your big stinking wires co-axial with the pins;>)
Rich
I have been doing this since dawn of time (when the 4004 appeared).
I have done consumer goods where we connect the micro (no, not the 4004!) directly to the mains with a series capacitor, a diode and a zener/electrolytic for power supply, not even knowing if Vss was at hot or neutral wire. And connecting micro output directly to the triac gate. Of course, you have to be careful and know about electricity. But the question was about how much voltage an input pin can take if there is a series resistor. The answer is; unlimited, as long as the resistor is properly sized.
And +/- 12 V is not a problem in any case.
The SELV (Safe Extra Low Voltage) limit is 50 volts. If you go beyond that, you need to contact a certified electrician. I do not need to, since I am a registered EE.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
As I am drawing pictures for my afternoon class next week anyhow, I can as well post it here. I think Skogsgurra's explainations could become even more obvious - if that would be possible.
BTW: I am not so confident with high negative voltage...
There are substrate diodes from input to Vss as well. That takes care of the negative part.
Edit: I found this paper. http://www.csit-sun.pub.ro/courses/vlsi/Carte_VLSI/bookch14.pdf·Have a look at pictures on page 14-15. It shows very well what is happening. Although at GHz speed. Not that the Prop is far behind...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Skogsgurra) : 9/9/2007 8:37:01 AM GMT
@ rjo_ : I appreciate you comments and especially from a 'solid engineering' perspective. In an ideal world, or when advising others, I would also take the "do it properly" approach. For home-hobby use I'm prepared to take quick and dirty as long as it comes with acceptable risk.
Is that right?
I cannot seem to think of another reason to use a higher than +5volts or a need to run both the plus and the minus.
Are their other uses, like samplling an audio input?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
-Phil
@ Phil Pilgrim (PhiPi) : Agreed; for a more robust solution I'd go with both. For hobby-home use I'd personally consider such failure to fall under acceptable risk, except for mains and higher voltage interfacing.
My primary, but not only, interest was indeed direct RS232 interfacing, but I wanted to avoid explicitly saying that because I've seen too many discussions elsewhere quickly collapse into "use a MAX232, they are only a few dollars" and then off at a tangent for alternative transistor interfaces etc, and the "can I or can't I, if I'm prepared to take the risks" question rarely gets satisfactorily answered.
What's recommended for a robust, well designed, commercial product is not necessarily what a hobby-home user wants or even needs. "A few dollars" can equate to many dollars for people who do not have component stock rooms and have to buy one offs as and when needed. That's not to say that I think "doing it properly" is wrong or unnecessary, or even that kludging it is recommended. Everything gets designed to a criteria, and every circuit builder has to decide their criteria.
I noticed that +/- 500 uA limit. It is (at least to me) a very conservative limit. I am used to a lot more in CMOS circuits.
It is not a question of thermal load (500 uA does not produce more than 300 - 400 uW in the diode). Instead it is about the risk of turning on parasitic thyristors that exist in the silicon. Once turned on, they short the power supply and develop a lot of heat that destroys the chip.
Question for Parallax: Is the +/- 500 uA limit a "prudent" limit? Or is the Propeller able to sink, let's say, 5 mA through its diodes without turning that SCR on? I mean, if it can take an 8 kV Human Model discharge, it should laugh at 5 mA. (Yes, I am aware of the time scales involved)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
I have done some teasting in practical applications. Three mA seems to be OK so far. I have since been using higher resistance values, but then I need to compensate with around 5 pF to keep frequency response up. The Prop is fast - never needed to compensate resistors in a microprocessor application before love it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔