L78L05AB -40 to 125 C.
http://www.alldatasheet.com/datashee...ICS/78L05.html
L78L05AB -40 to 125 C.
http://www.alldatasheet.com/datashee...ICS/78L05.html
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Hi,
There's the other way ...
use what's inside the Pic ... the clamp diodes !!! just use a series resistor to limit input current to 10-20µA ( 500µA max continuous ... )
see AN521c for direct mains ( ! ) to Pic interfacing. That's OFFICIAL !
and if you want ... add 2x 1N4148 diodes parallelled to the clamping diodes !!!
no need regulators or complex circuitry !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Merci Alain.
Ok:
- 2 parallel 5M resistors on the input pin (AN521 suggested a backup just in case).
- a pair of backup diodes on the input pin as well.
And now the noob question, the PIC will be powered by a 5V circuit, the signal from the sensor is powered on a 12V circuit, where do the backup diodes go to? The 12V cicuit or the 5V circuit?
The clamping diodes within the PIC go the the 5V circuit, I would assume the backup would go to the same place, just want to be sure.
This would greatly simplify my life 'cause it gets real complicated real quick trying to use op amps like the LM239, I got that idea from another tutorial.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Hi, Robert
No need for 5M if 12v signal ... just (say 45v ... automobile std. "power clamping" )
40v / 50µA .... 1M in series
diodes are - of course- between PIC input and power rails ( 5v and gnd )
IF using external clamp diodes, series resistor can be somewhat lowered :
using Schottky diodes ( Vf ~ .3v ) will easily allow 1 mA, (the internal clamping diodes won't have to conduct, then ... )
so, the resistor could be as low as 47k ... limiting input noise capture !!!
Alain
Last edited by Demon; - 4th October 2016 at 16:54.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I'm reading the app note again and the part about alternating voltage bugs me. It says that "a 115 VAC 60 cycle sine wave will traverse from 0 to 2V in 32ms", what about 12VDC? Wouldn't that be on instantly so to speak? The car alternator may work with AC but it distributes DC to the car electrical system.
The other thing is the clamping diodes, they shut off over VDD and below VSS. That's fine to protect the PIC but that would interfere with my application. The car sensor works on 12V, I can't just stop measuring at 5V, I need "see" the remaining 7 volts or else I will get only a partial reading?
Let's use the fuel gauge as an example, the fuel tank would read from empty up to 40% full or so and then the meter would top out, no?
The only thing I can think of it to divide the car voltage by 4 and do the same thing with the signal voltage. That way I won't be comparing apples and oranges and I will be able to use the PIC ADC properly. My car battery is about 12.? charged and 14.? with the alternator charging. Let's use 16V as a maximum in case of a surge, divide by 4, that brings it down to 4V, well within the 5V limit of the PIC. I can still place a safety diode on top of that to protect at 5V too.
EDIT: Oh, and that spare 1V translates into another 4V buffer, that means it would be safe up to an absolute maximum 20VDC.
Last edited by Demon; - 21st April 2008 at 09:45.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Hi, Robert
I think we mixed DIGITAL and ANALOG inputs ...
here you want 0 > 12 v to be 0 > 5 v !!!
so, you need a voltage DIVIDER ...
see Darrel's site for such an application :
http://www.pbpgroup.com/modules/wfse...p?articleid=25
Everything explained ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Yup, the signals from the sensors will be analog. Interesting tool, I added it to my favourites. There is a comment at the bottom of that page that puzzles me though:
"Do not use the Zener diode (D1) for analog circuits. It will adversely affect the readings.
It can be useful for protection of Digital Inputs though."
So, since I've lowered the voltage to an acceptable level for the PIC, then there should not be any need for extra clamping diodes, no?
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Last edited by Demon; - 4th October 2016 at 16:54.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks