This project is aimed at building a precision voltage reference which is programmable from 0 to 4995mV with a resolution of 1mv and with a accuracy of better than 0.05% i.e +-2.5mV.
I have divided the project into three phases, in the 1st phase I will build Voltage Source using one channel of the DAC and then in next phase I have added the current Source using 2nd channel of DAC and in the final stage I will develop the custom PCB and enclosure to give it a professional look. I will also make it battery powered and add USB interface for easy PC control.
Phase 1 : Voltage Reference
As a phase 1, I have built the voltage reference using readily available power adapter, OLED display, Nucleo MCU board, and LTC2602 DAC Evaluation board.
High Level Wiring Details
MCU Connection Details
You can watch this video to understand how I built it, the components used and how it works.
Power Consumption Optimization (35mA to 5mA)
After completing the Phase 1 (Voltage Reference) I tested the power consumption of the project. It was consuming 35mA @ 9V which was very high.
As I want to ultimately make it battery powered I spent some time to figure out the scope of reducing the power consumption and with in a couple of hours I could reduce the power consumption from 35mA to 5mA without limiting any of the functionality 🙂
What to know how?
LEDs will consume a lot of power, in battery powered equipments we should avoid LEDs as much as possible or keep them off as much as possible and use only when needed.
I saw 3 LEDS on Nucleo board, they were consuming around 3mA, two 0603 SMD led(RED and Green) and one RGB LED.
OLED displays have very good brightness and wide view angle but they are power hungry and most of the time not suitable for battery powered applications.
That’s is why I will change the display to Chip on Glass reflective LCD type display(will consume roughly 250-300uA) in the final prototype (Phase 3)
But I wanted to see what can be done with OLED display itself.
There is a setting in OLED configuration where we can change the pixel brightness level, in the code it was 0xFF which is maximum, I reduced it to 0x10 and still brightness was good enough.
This helped me reduce the power consumption by ~1mA
Power in of Nucleo Board
Next biggest scope I found was the STM32 Nucleo Board itself, Other than the desired MCU, it has extra debugger circuitry, two 5v to 3.3V linear regulators and USB current limiting IC, all these were consuming power but not very useful while the project is running.
So, in order to by pass all these, I powered the Nucleo board from external 3.3V but when i did that I faced an issue that MCU was not getting started as the Reset pin of MCU was connected to the debugger circuit MCU’s Pin and was not letting MCU to start. I removed resent pin connection by removing the series zero ohm resistance and the MCU started working fine.
This change reduced the power consumption by big 21mA 🙂
I am using STM32L031 for this project which is Cortex-M0+ MCU and has very low power consumption characteristics.
When I checked code, I initially configured it with 32Mhz clock frequency which for this simple project is quite high, given the need to reduce power I reduced the clock frequency from 32Mhz to 4Mhz.
It did not see any issues with the functioning of the project. Everything works perfectly fine at 4Mhz but with a much lowered power, it reduced further by 5mA.
So, that’s how I reduced the power consumption of the circuit from 35mA to ~5mA.
I think it should be possible to further reduce the power consumption as on DAC evaluation board extra unused but powered circuit is there which can be eliminated like two extra voltage reference ICs are there, one ADC is there and EEPROM is also there, all these are not used but still consuming power.
But, on the evaluation board there no easy way to removed power to these ICs so I will not do anything right now.
Phase 2: Addition of Current Reference
In the phase two, I am adding 2nd channel as a precision current source from 0.00 – 25.00mA which should be easy as the LTC2602 has 2 channel 16 bit DAC outputs just need to understand how much resolution/accuracy is possible.
Using a small Op-Amp and Mosfet based circuit to generate the constant current source
You can see the test board below.
I am still working on this phase, will share more details and probably a small video as soon as I am done.
Any additional circuit is required for current reference?
Yes, we need an extra circuit to create a current reference.
See the simplified schematic below:
Op-amp works as a voltage follower, whatever voltage is provided at the +ve terminal of Op-amp, it will try to control output in such a way that the voltage at -ve terminal matches.
So, if 100mV is given at +ve, to match it will make 100mV at -ve also, that means across shunt resistance 100mV will be there, to get 100mV across 10 ohm shunt, you need 10mA current. So op-amp will make its output to drive 10mA current when + input is given 100mV.
The accuracy of shunt resistance and its temperature coefficient is very important for a precision circuit like this.
For now, I have used 1% shunt resistor but in proto I will use 0.1% shunt.
The PCB you see above is the current reference, I have built this circuit using general purpose Opamp and N-Channel Mosfet.
With the current setup I was able to achieve fairly good accuracy from 1.00mA to 23.95mA, it is around +-0.02mA.
The limitation is I was not able to achieve good accuracy below 1.00mA and above 23.95mA, which I am yet to fix.
The inaccuracy at lower current is due to noise and DAC offset. For the zero PCB prototype level this looks good enough. Now, I will design the circuit for professional proto and build the circuit to test it further.
Video explanation is here:
Phase 3: Build a professional proto
The custom PCB version will be powered by battery as that will be desired. A boost converter for DAC voltage reference input and constant current circuit to work. I will also add isolated USB interface so that we can control the voltage current reference via PC.
Display will be changed from OLED to a low power glass display which will consume 200-330uA while running. This will help in increasing the battery back up time.
The whole circuit need to be designed to consider low power consumption.
I am planning to use a ready made enclosure so that it becomes a useful open source product and not just a hobby project. What I have seen is open source project becomes only referring source and nothing more than that if they are not manufactured and sold at reasonable cost.
Evaluating Chip-on-glass displays
Ordered a few Glass displays from buydisplay.com to test if they could be suitable for my proto and at the same time consume less power compared to OLED display I have used for far.
The display you see above is 132×32 pixels display using ST7567A controller and doesn’t have any backlight. The cost of the display for one unit is only 0.78$.
As you can see from the image, it was quite a challenge to solder all the pins and wire it up for testing. After some struggle, managed to get it soldered using ribbon cable and made it working.
Tried many fonts types, sizes to see what will suit better.
So far, I am considering not to backlight for the LCD as it will consume a lot of power.
But finally the big font looks much better as you can see in the image below
I tried to check at bigger display with 128×64 pixels, around 1.5 inches size which has backlight but found the backlight at minimum light will consume 2mA, which I think is too high for my project. See the LCD with only backlight ON to min possible level.
with these experiments considering low cost, low power consumption, I have selected this LCD for the proto.
At the time I will show either voltage channel or Current channel as font size takes 3 lines/75% of the vertical space on the display. But, that is fine. There is no major benefit of viewing both channels at a time.
The current consumption of this display is around 150-200uA. Datasheet say 500uA max. but I have checked with all pixels ON, it consumes no more than 220-250uA.
Now, I am working on the schematic, I have selected all major parts and know which kind of circuitry will be used, once I have completed the schematic capture I will show you what all is going to be there on the board.
Bill of Material (Phase 1 and Phase 2)
|1.||DC Barrel Jack connector||1|
|3.||STM32L031 Nucleo Board||1|
|4.||LTC2602 16 Bit DAC Evaluation Board||1|
|5.||OLED Display Board||1|
|6.||5V DC-DC Converter Module||1|
|7.||Female header for Nucleo Board and OLED Board|
2x single line 15 pin for MCU board
2x single line 10 pin for display
|9.||Wires for interconnection|
|10.||9V DC 1/1.5A Adaptor||1|
|11.||General Purpose Op-amp||1|
|13.||10 ohm shunt resistor||1|
- Version 1.0 (Voltage Reference) – this is still work in progress for next stage
- Version 1.1 (Voltage reference on one channel and Current reference on another channel)
I hope you found this project interesting.
If you like the post, please share it with others. Any suggestions or comments, let me know here.
Read my other articles on embedded systems design.