UK
Offline
Newbie
Karma: 1
Posts: 22
|
 |
« on: January 07, 2013, 11:47:44 am » |
I have a voltage divider measuring a car battery Volts +-20k <> 10K - Ground with a ATtiny85 ADC connected to the junction of the 2 resistors. (with a 100nf cap on the input to the ADC to ground)
Everything works fine but I added a 5.1Volt Zener to stop any spikes and this is dragging /affecting the ADC reading down from 1023 for 15v (5v at the pin) down to 1014 for 15V. If I remove the zener and just measure the voltage with a fluke scope it also affects the reading, i just tried a basic DVM and this doesn't affect the reading so I am assuming its a capacitive issue rather than the voltage being dragged down.
I've built two prototypes and both do the same.
Has anyone else had a similar issue, I did try searching but couldn't find any answers.
Rob
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 13
Posts: 383
The last thing you did is where you should start looking.
|
 |
« Reply #1 on: January 07, 2013, 12:07:48 pm » |
Show us a schematic diagram, I'm old.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 13
Posts: 383
The last thing you did is where you should start looking.
|
 |
« Reply #2 on: January 07, 2013, 12:19:31 pm » |
Where is the zener?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Newbie
Karma: 1
Posts: 22
|
 |
« Reply #3 on: January 07, 2013, 12:25:07 pm » |
I guess showing the Zener would be useful, FYI I'm using .4w resistors
|
|
|
|
|
Logged
|
|
|
|
|
SW Scotland
Offline
Edison Member
Karma: 7
Posts: 1069
Arduino rocks
|
 |
« Reply #4 on: January 07, 2013, 12:25:45 pm » |
Where is the diagram - I saw it for a second then it disappeared
What I did see was no ground connection between the divider and the arduino
Edit : Oops it's back. can only suggest that the zener is tripping in slightly "early". Although it is specified as 5.1 volts there is usually a +- tolerance of around 0.1 to 0.2 volts
|
|
|
|
« Last Edit: January 07, 2013, 12:28:48 pm by jackrae »
|
Logged
|
|
|
|
|
UK
Offline
Newbie
Karma: 1
Posts: 22
|
 |
« Reply #5 on: January 07, 2013, 12:27:47 pm » |
Sorry this is just a quick sketch to show the divider, assume the pic has power etc please. I realised I hadn't drawn it correctly in my haste.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 13
Posts: 383
The last thing you did is where you should start looking.
|
 |
« Reply #6 on: January 07, 2013, 12:48:06 pm » |
Your zener may be in the knee pick a higher value.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Newbie
Karma: 1
Posts: 22
|
 |
« Reply #7 on: January 07, 2013, 01:07:25 pm » |
LarryD
Thanks for the reply
I just took one of the Zener's I'm using and put it straight across my bench PSU and it limits dead on 5.1V so I'm happy I'm outside of the knee.
Also just having a poke around again, if I put 12volts into the circuit I would expect to see 4volts at the junction of the 2 resistors. Without the Zener I see 4volts, but as soon at I put the Zener in circuit it drops to 3.1volts. I also just swapped the resistors out for 1/2w type in case it was this.
I'm stumped.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Sr. Member
Karma: 13
Posts: 383
The last thing you did is where you should start looking.
|
 |
« Reply #8 on: January 07, 2013, 01:15:15 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26030
Solder is electric glue
|
 |
« Reply #9 on: January 07, 2013, 01:30:12 pm » |
The resistor values are too high, they are being affected by the current that the zener is taking close to the knee. Drop them from 20K to 200R and 10K to 100R.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Newbie
Karma: 1
Posts: 22
|
 |
« Reply #10 on: January 07, 2013, 05:07:18 pm » |
LarryD
I'll wil have a read and will have a play with your circuit. Again thanks for taking the time to reply.
Grumpy_Mike
I thought about lower values but thought the values you suggest would draw 50ma which make be a little excess and generate heat. Also I thought the sweet spot for ADC inputs was 10k? Or am I wrong?
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 299
Posts: 26030
Solder is electric glue
|
 |
« Reply #11 on: January 07, 2013, 05:16:37 pm » |
Yes you are wrong in this case. The value of 10K is a maximum not a optimal. Anything lower is just as good. The ammount of current will not cause you any problems with heat. If you want to fix the problem lower the absoloute value, if you don't want to solve the problem then why bother asking.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #12 on: January 07, 2013, 05:41:20 pm » |
both do the same. Zeners do not have a sharp turn-on / off point. Instead, they turn on / off gradually and in that process, they become a material load to the divider. The solution is to use either low value in the resistors, or use sharper turn-on/off devices (like tl431).
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Tesla Member
Karma: 58
Posts: 6774
Arduino rocks
|
 |
« Reply #13 on: January 07, 2013, 07:34:17 pm » |
Has anyone else had a similar issue, I did try searching but couldn't find any answers. Zeners need a certain minimum current thru them before they will act to limit voltage spikes. My experience is that putting a zener on the wiper of something like a 10k pot may not limit the voltage on the wiper as I thought. Check the data sheet for your zener.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Edison Member
Karma: 114
Posts: 2205
|
 |
« Reply #14 on: January 07, 2013, 08:19:19 pm » |
I think you will find out that the resistors + clamping diodes will do a far better job than the zener ever will.
If you insist, put a 5.6v+ zener there.
|
|
|
|
|
Logged
|
|
|
|
|
|