0

Voltage Divider Board
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Voltage Divider Board

by kylefoster on Thu Feb 09, 2017 8:20 am

Hi Guys,

I'm in the middle of doing some tests involving some led tail lights for my car. I'm intending on using the current wiring for the input signals (brakes, turn signals & running lights). These are 12V and will need to be divided. I'd like something off the shelf so I can quickly test the wiring with some LEDs simply to make sure the wiring activates my LEDs as intended and I saw this:

https://www.dfrobot.com/wiki/index.php/Analog_Voltage_Divider_SKU:_DFR0051#Specification

This is a 5x divider and my question is, if 12V are divided 5x, will the Arduino inputs class 2.4V as high? How does this normally work? Does it have to be 5V to read as high? I assume from the look of this product that the output division is not adjustable.

To be honest, I'm surprised there doesn't seem to be a board out there that divides 12V down to 5V specifically, with several inputs/outputs.

Many thanks and any advice is greatly appreciated.

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Thu Feb 09, 2017 8:39 am

The manufacturer's threshold specification for logic HIGH on the Arduino processor is 0.7 * VCC, which would be 3.5v. In practice, we use 3.3v signals reliably, but 2.4v would probably not work.

Voltage dividers are pretty simple to make and there are lots of on-line calculators to determine the resistor values: http://www.ohmslawcalculator.com/voltag ... calculator

I'll forward your suggestion for a divider board to the products team.

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Thu Feb 09, 2017 9:42 am

Thanks very much Bill,

Very helpful as usual. When you say 3.3v, would you suggest dividing 12V down to 3.3V instead of 5V? I'm still a little in the dark about the input/output pins and their voltage range. Especially when it comes to inputs vs outputs etc.

I've got 6.8 & 4.7 ohm resistors for 5V and 9.1 & 3.6 for 3.3V. Does that sound right? I just don't want to cook my Arduino!

Thanks for forwarding the suggestion!

Kind regards,

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Thu Feb 09, 2017 10:04 am

When you say 3.3v, would you suggest dividing 12V down to 3.3V instead of 5V?

I was just pointing out that the voltage threshold is somewhat less than 5v. If you go too much below 3.5v, it might not work. But if you go even a little above 5.3v, you will almost certainly damage your processor. So it is better to aim a little low.

Also consider that "12v" automotive electrical systems actually reach as much as 14.7v when the alternator is charging the battery, so you should calculate based on 14.7v instead of 12v.

I've got 6.8 & 4.7 ohm resistors for 5V and 9.1 & 3.6 for 3.3V. Does that sound right?

Those values work on paper, but the total resistance is too low to be practical. You would get more than 1A of current flowing through them. You would need some extra heavy-duty power resistors and they would get quite hot. You probably want to shoot for a combined resistance of 10K ohms or more.

If you multiply all those numbers by 1,000, you will end up with the same divider ratio, but the current flow would be down around a millivolt, so you could use ordinary 1.8W resistors.

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Thu Feb 09, 2017 10:35 am

Thanks Bill,

These voltage dividers will be used for 12V analog signals from switches/buttons from brakes, turn signals & running lights.

As I know so little about this, why would there be so much current flowing through? I'll have a look into 1.8W resistors.

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Thu Feb 09, 2017 10:52 am

As I know so little about this, why would there be so much current flowing through?

Because that is the amount of current required by law.... Ohm's law to be specific: I = V/R where 'I' is the current in amps. 'V' is the voltage and 'R' is the resistance. If you have 12v across a resistance of 12 ohms, you will see 12/12 = 1 Amp.

I'll have a look into 1.8W resistors.

Sorry, that was a typo. I meant to say 1/8W resistors.

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Thu Feb 09, 2017 11:17 am

Ok, this is making a bit more sense (I think)

Based on 12V-14.7V, a 10k and a 4.7k resistor would give an output of 3.8-4.7V.

Does this sound right?

Thanks again,

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Thu Feb 09, 2017 11:28 am

That sounds like a workable combination.

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Thu Feb 09, 2017 12:07 pm

Thanks a lot bill, I'll give that a try!

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit2 on Thu Feb 09, 2017 2:51 pm

we dont have a breakout but we do have 10K pots! work great, even tunable :)
https://www.adafruit.com/products/1162

adafruit2
Site Admin
 
Posts: 19043
Joined: Fri Mar 11, 2005 7:36 pm

Re: Voltage Divider Board

by kylefoster on Wed Feb 15, 2017 12:35 pm

Hi Guys,

I'm just about to try this after receiving some 10k and 4.7k resistors. I'd like to clear up a couple of things before I fry an arduino or strip of LEDs.

When it comes to the 'Analog' inputs on the Nano, what's the difference between these and the other inputs/outputs considering I'll just be reading high or low? I'll be using the analog inputs anyway but was curious.

Could you guys also confirm this diagram for me for voltage dividing? I'm not 100% sure which resistor goes where.

https://blog.udemy.com/wp-content/uploads/2014/05/adruino-sketch.png

In my case I'm using 10k and 4.7k resistors to achieve 3.8-4.7V from 12-14.7V so I think R1 is the 10k resister?

I'm not familiar with the 10k pots. How is it used?

Many thanks,

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Wed Feb 15, 2017 1:19 pm

On the Nano (and most Arduino compatibles) all analog inputs can also be used as digital inputs. But not all digital inputs can be used for analog.

You are correct. The 10K is R1.

A 10K potentiometer or 'pot' is an adjustable resistor with 3 pins. You would connect one side to your 12v signal, the other side to ground, then adjust until the center pin was at an appropriate level.
https://en.wikipedia.org/wiki/Potentiometer

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Wed Feb 15, 2017 1:37 pm

Thanks Bill,

So what is considered an 'analog' input vs a digital input? I assume all of the wiring I've used for this project so far is analog?

I'm not sure what the difference is

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Re: Voltage Divider Board

by adafruit_support_bill on Wed Feb 15, 2017 1:58 pm

A digital input measures ON and OFF, where ON is a voltage above a certain threshold and OFF is a voltage below a lower threshold.
An analog input measures the actual voltage. In the case of the Nano, it measures the voltage with 10 bits of resolution.

adafruit_support_bill
 
Posts: 76186
Joined: Sat Feb 07, 2009 10:11 am

Re: Voltage Divider Board

by kylefoster on Thu Feb 16, 2017 1:47 pm

Thanks Bill,

That makes sense. I've read up on it a little too so I think I understand that. So considering my input voltage will likely be ranging from 3.8-4.7V, would using analog inputs be suitable? These are the ones I'm using for my prototype (since I've soldered a nano and screw terminals to perf board in those positions).

So although you can read the actual voltage as you said, what is considered 'HIGH'? Within the code, I have simply used HIGH and LOW as read states. Do you think this will still work if the voltage is as low as 3.8V into an analog input?

Thanks again,

Kyle

kylefoster
 
Posts: 82
Joined: Fri Jul 22, 2016 7:07 am

Please be positive and constructive with your questions and comments.