• Voltage measurement

    Csiszár Attila10/21/2017 at 19:35 0 comments

    So I digged the internet about measuring the voltage with an Arduino.

    I found this article as the most informative one: http://www.skillbank.co.uk/arduino/measure.htm

    The most important thing is that Arduino's analog chips can measure voltage, and convert it to a value between 0 and 1023. But the analog pins cannot handle more than 5V, so I have to use a simple voltage divider to chop off the above 5V parts of the voltage. Testing the circuit on a breadboard the measuring kind of worked, but the accuracy was not the best. 

    The problem is that the arduino's atmel chip has an internal voltage reference which depends on the power supply. So you cannot rely on that its a constant 5V hence the measurement won't be accurate.

    To avoid this problem the atmel chips has an option - the AREF pin - to supply an external reference voltage to the analog converter.

    So I went throught the options, an bought an MCP1541 voltage reference IC. 

    By the way, It has a fantastic data sheet. Full of examples and detailed instructions about how to design a circuit around this chip. The key is you have to put a at least an 1uF capacitor between the Reference Out pin and Ground.

    So I hooked it up with and Arduino, and with this code I checked that it working quite accurately - I correlated datas with my multimeter.

    int voltageMeasurePin = A2;
    float referenceVoltage = 4.108;
    int analogVoltage = 0;
    float measuredVoltage = 0;
    void setup() {
    void loop() {
      analogVoltage = analogRead(voltageMeasurePin);
      float measuredVoltage = (referenceVoltage / 1024) * analogVoltage;
      Serial.print("A: ");
      Serial.print("   ");
      Serial.println(" V");

  • Voltage / Current display

    Csiszár Attila09/29/2017 at 18:16 0 comments

    Till I got the needed capacitors, I continued to work on other parts of the project. 

    The instrument need some way to display the actual voltage and perhaps the actual current consumption. 

    Ebay has tons of similar products for it, from simple 8 digits to fancy oled types.

    Another way would be to use an arduino and an lcd display to measure and show it. Because I happened to have an LCD display around, and also recently buyed an i2c interface for it I went this way. I hope to learn more of it.

    Read about how to use an i2c interfaced lcd display with an arduino:


  • Power source - smoothing / basic regulating

    Csiszár Attila09/29/2017 at 17:58 0 comments

    Next step is to make the rectified DC signal smoothed.  I watched a couple of videos about it, namely:

    Also read about smoothing, voltage ripple, etc. but I still not got around my head about the correct way to calculate the smoothing capacitors. 

    Probably 2x 2200uF capacitor will be more than enough, but the biggest problem I don't have these high values in my stash so for the time being I can't test the circuit.

  • Power source - rectifing

    Csiszár Attila09/29/2017 at 17:41 0 comments

    First of all I need to rectify the transformer's secondary output AC to DC. This was a great opportunity to learn about diodes, half and full wave rectifiers.

    As always afrotechmods has a great video about general rectification:

    Also I watched a couple of videos and learned about the difference between normal silicon rectifier diodes and Schottky diodes:

    Using schottky would be more practical, but I happened to found some rectifier diodes (BY 133) months ago, so I decided to use them instead.

    After that I watched and learned how half and full wave rectifiers works. mljorton has a very informative video about these:

    In the mean time I also got my first scope (DS1054Z) so I was able to measure and play around with rectifying.

  • How it started

    Csiszár Attila09/29/2017 at 17:19 0 comments

    I salvaged a transformator from an old broken halogen lamp - anyone remember halogen lights? These were the next big things before LED lights came and ruled the lightning market.

    Anyway, the lamp's tranformator has 12V with 1.6A ratings on the secondary (total 20W - those halogens were still juicy ones :). Even better that it also has a switch and mains cable with a plug so it don't need to buy those.

    So I decided I can make a variable power supply aka supply lab bench from it with the following parameters:

    Variable voltage: 0 - 10V

    Variable current: 0-1A ( still not decided that need this function?)

    Set common voltages easily: 3.3V and 5V 

    Display voltage 

    Measure current (?)