Smartisant Voltage Divider DIV1

This simple PCB makes it easier to measure higher voltages (above 5V and up to 40V) than could ordinarily be measured using an Arduino analogue input port. It provides an adjustable voltage divider that can be built and calibrated to the desired input range.

There are two purchase options:

  1. The PCB only.
  2. A kit including a PCB, a 4-way Molex connector, a 2-way Molex connector a 10K linear potentiometer. The kit does not include the Molex female housings or the resistor (R).

Specification

The PCB measures 28mm × 15mm.

The PCB features 3mm mounting holes to allow it to be securely mounted using hex spacers/stand-off pillars.

Applications

Warning:  This PCB must be configured and calibrated before connection to an Arduino, to ensure that it does not expose the Arduino analogue input pin to excessive voltages. It is not recommended for voltages higher than 40V dc.

This PCB is designed to simply connect to an analogue input on our Smartisant Arduino Shield SHLD1.

Application Notes

The PCB enables a voltage divider and a suitable resistor is required in series with the potentiometer, depending on the maximum voltage to be measured.

Most Arduino analogue input pins expect to see a voltage between zero and 5.0V. There are some Arduino processors that only accept 1V on their analogue input pins and this board will work with them but, your calculations and the resistor value (R) will need to be modified accordingly. Most Arduino use 10-bit resolution, which means the analogRead() function will return a value between 0 and 1023.

Measuring 12V

Typically, you want leave some safety margin on the analogue input, so we will work on the basis that we want to see a value of 1000 to represent the highest value of V, which is 12.0V when using the analogRead() function. This means that the resolution of our readings will be 12 ÷ 1000 = 0.012V.

We want the combined resistance of the potentiometer and on-board resistor (R) to be as high as possible but, we also want the voltage across the potentiometer (Vc) to be above 5V, so that we can measure the full range of input voltages and see 5.0V on the Arduino pin (Vi). If the value of R was 10KΩ, then Vc would sit at 6.0V when V = 12.0V and we would have a 50:50 voltage divider.

To calibrate the board, we would apply 12V to the input (V) and measure the voltage at Vi. We would then adjust the potentiometer until the Vi was exactly 4.89V (1000 ÷ 1024 * 5.0). We could then connect Vi to the Arduino analogue input pin and expect to see a value of 1000 from the analogRead() function. For any lower readings we can then calculate the voltage V.

Warning:  If using this technique, you must be confident that the voltage V will not exceed 12.0V dc. If it does, then the voltage applied to the Arduino analogue input pin will exceed 5.0V dc and could damage the Arduino. It is always better to over-estimate the value of V, to provide a greater safety margin.

When measuring dc voltages using the analogue inputs, it is best to fit the associated 0.1uF capacitor on the Smartisant Arduino Shield SHLD1.

Measuring 20V

If we wanted to measure voltages up to 20.0V dc, we would do some very similar calculations. If we choose a value of R = 27KΩ, then with V = 20.0V, we would expect Vc to be 5.41V. We would adjust the potentiometer so that Vi = 4.89V (equates to a value of 1000 from the analogRead() function).

So the measured voltage would be the value from the analogRead() function ÷ 1000 * 20. E.g. a value of 500 would mean V = 10.0V. This also gives us a resolution of 0.02V (20 ÷ 1000).

Further Reading