Hi,
As per your request please find attached a quick and basic suggestion for values I would use.
As you have 10k resistors I used these.
Bob
Hi,
As per your request please find attached a quick and basic suggestion for values I would use.
As you have 10k resistors I used these.
Bob
Bob , Chuck and other
Thank you all for the advice. I really appreciate it!![]()
> Has for the zener diode you just put the block end to say PORTA.0 and the ohter to ground.
No!
A Zener starts to draw current long before it gets to it's stated voltage... it doesn't just suddenly 'turn-on' at it's rated voltage. As soon as the Zener starts to draw current (a 5V6 Zener might start as low as 3v!!!) then it will throw your Resistor Voltage Divider out and you will no longer have the ratio voltage drop you expect!!!
A Zener is good for protecting Digital ON/OFF inputs but not for precise measurement ADC or Comparator inputs.
Just need to paste µChip built-in input protection by adding two low leakage diodes ( BAW62 i.e.) to clamp input voltage to the Pic supply rails ...
1N4148 also will fit for the here-required specs ...
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 " !!!
*****************************************
Bob
I just noticed that circuit CarVoltage.jpg specifies 10nf caps while you previously said I should use a 10uf cap? Which one is it?
Thank you again.
Last edited by passion1; - 2nd August 2007 at 11:48.
Thanks Melanie,
As always you are correct (damm! I would love to be a male chauvinist. But I always need a woman to keep me out of trouble!).
For cheap and effective protection I willingly sacrifice a bit of accuracy (or compensate in software). The resistor divider values can be reduced and a better choice of zenner to minimise the effect.
Alternative is to suppress the supply line and bit more capacitance on the analog input and miss out the zenner and ensure the resistor divider will NEVER give more than 5v. It all depends on the accuracy and speed you need from the circuit?
An extreme example I once had an alternator go on a company car and it pushed 18volts around. Don't know how long it was like that as it was only noticed when it managed to destroy a lot of the electronics on the car.
Bob
Excellent divide by three idea (10k 10k 10k) given by Dave (mackrackit).
How about this....? So far...
<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1900&stc=1&d=118606737 9" />
The automotive environment can be very nasty, as someone has already said. Here is how I go about it:
First of all, put a diode in series with the 7805 regulator for reverse polarity protection. The one you have now will burn out the 10ohm resistor if you connect it up backwards.
It is always a good idea to use a Transorb (instead of the zener) - they are much better at catching nasty spikes. On a 12v system, an 18v Transorb should be ok.
I would also add some inductance before the 7805 - somewhere around 1mH works for me.
For maximum reliability, I always try and isolate or buffer the micro from the "real world" signals as much as possible. Try to make it and "island", if you like. For digital inputs, this means using opto-isolators. For analog inputs I buffer the signals with RRIO op-amps powered from the +5v rail. Doing this greatly reduces the chances of nasty spikes reaching your micro. Outputs are usually buffered anyway through drivers, transistors, fets, relays etc. Adding 1nF ceramic decoupling capacitors to every i/o on your pcb can also be worthwhile.
The other important point is to take care when joining the ground connections together on your pcb. Keep analog and digital grounds separate. Try to use a "star" type connection where all the grounds join at one place - usually at the filter capacitor/regulator. This point should have the lowest impedance path for noise/spikes.
There are many more "tricks" to combat the nasties found in the automotive environment. A a quick google using "automotive interference suppression" or similar will probably produce some worthwhile results.
Hope I was of some help.
Regards,
Andy
Bookmarks