Author Topic: An implementation of ATMEGA328 volt logger: The Dinometer, a learning project  (Read 4851 times)

0 Members and 1 Guest are viewing this topic.

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3487
  • Country: us
Arduino/ATMega volt measurement and volt logging seems a rather popular topic.  I did one too as a learning project and I call it the Dinometer.  Dinometer uses the ATMEGA328P/PU.  It has 4 channels, 7 ranges (from -5v to +30v) per channel, and with less than 1% error down to about 60mV (with proper range selection).   Designed to work with an old Dinosaur laptop (hence Dinometer), it log voltage or current directly to file.

(As promised to another member) I am sharing how I approach this problem and my “lessons learned” with other newbie like myself.  I hope to learn from your comments as well.

1.  Dinometer Part I: Introduction, feature, and an application demo.  The demo is the Dinometer measuring volt and current into a boost board (car phone charger rewired to boost), and measuring the boost board’s output volt and current output.
(12:05)

2.  Dinometer Part II: Accuracy and how low (mV) can it goes and still read something that resembles the real voltage.  About 11 minutes into the video, you can see it's performance at single digit millivolt.  About 15 minutes into the video, it compares the Dinometer against an ATMEGA328 on Arduino UNO without Dinometer's calibration.
(22:16)

3.  Dinometer Part III: The circuit, mistakes, lessons learned and summary.
(24:37)

In addition, attached two graphs are the ones show at the end of Part III on accuracy.  It is hard see in the video.  I am actually rather pleased with the accuracy I achieved.  It may be just that I've a low bar.  I'd like to see someone with more experience.

I hope you find this useful, and I hope to learn from your comments.

Rick

Links:
1.  Dinometer Part I: Introduction, feature, and an application demo.



2.  Dinometer Part II: Accuracy and how low (mV) can it goes...



3.  Dinometer Part III: The circuit, mistakes, lessons learned and summary.
 

Offline sachleen

  • Contributor
  • Posts: 39
  • Country: us
    • My Site
I like this project. Can you post your schematic online please?
 

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3487
  • Country: us
I like this project. Can you post your schematic online please?

I'll dig it out.  Hang in there...
 

Offline Rick LawTopic starter

  • Super Contributor
  • ***
  • Posts: 3487
  • Country: us
I like this project. Can you post your schematic online please?

Ok, here are my schematics - I did not draw a single combined schematic but instead just one channel - since all 4 channels are the same except for address line.  Initially I had a combined one but 4 replications make the schematic difficult for me to follow.  I included the prototype board layout so that should clear up any confusion.

The power (7805 for 5V and LM317 for 6.5V) are straight from the datasheet.  After I made the video, I finally got my resistor resupplied.  I changed the 180ohm resistor (at LM317's Vout to Adj.) to 100ohm.  180 would work, but below the minimum current the datasheet specs out.

The diode board is a "fix" since I did not think I need it at the get-on.  Hence the diode matrix in on a daughter-card and not the best layout.

Each of of the 4 channels and the keypad are 5 groups of switches. Each group has 5 sense switches:
For Channel 1-4 (address 8,9,10,11)
  Divider position 0, 1, 2 (sense 1, 2 or none), two digital input (4,5)
  Multiplier position 0, 1, 2 (sense 1, 2 or none), two digital input (6,7)
  Polarity (sense reverse or not), one digital input (2)
Keypad (address 12)
  Center = 2, Up=4, Right=5, down=6, Left=7

The 5 senses and 5 addresses (4ch+keypad) are selected by turning the address line (digital line 8,9,10,11,12) high before reading then turn it low to allow the next one to turn on.

The sense-data (is this switch ON or OFF) 5V comes from address line.  If address line is HIGH, all switches for that channel has +5V.  (ie:pole has 5V)  Otherwise all switches are 0V so it doesn't matter if they are on or off.  That switch position data (the "throw") goes first into the diode matrix (anode) then (cathode) into MCU digital-line 2,4,5,6,7.  At the diode-cathode is where data form each group (for the same position) are combined.  The diode cathode board layout is also included.

Please review the entire video before attempting to construct.  It is a learning process.  You may not find this a cheap way to have 4 volt meters.  It is fun and frustrating at the same time.  But this project gave me lots of opportunities to learn a lot of things.  If I am to do it over, I would be able to design an improved one - for example, I would for sure split the OpAmp power to give it some V-.  That was the worst decision I made to not provide the OpAmp with bipolar power.

Rick
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf