I find myself needing to check and monitor voltages in the 0-30V range quite often. Most of that time I simply need to know if 3.3V is there or not, or if it suddenly jumped to 5V.
This is not a replacement for a good multimeter or precision datalogger - rather this is something you can have with you and wire up quickly into a small space within a device, visually check your connections and then log voltages unattended.
- monitors 4 voltages from 0-30V or 2 differential voltages
- accurate RTC time-stamps for logs
- writes logs to a microSD card
- 2-row 4-digit low power LED bubble display for setup verification
- configurable autoranging for quick setup and best resolution
- Powered by and can charge an external Li-Ion via JST PH connector - https://www.adafruit.com/products/1578 for example
- FTDI header for charging/configuration
Something was wrong, the board would peg the power supply if current limited to anything less than an amp. The ATmega was consistently the hottest part if I left it on for any length of time (10s).
Finally, I discovered that Y2 had been installed 180-degrees from how it should be. The assemblers did not check the silkscreen, and unfortunately due to my unfamiliarity with their Part Placement screen, the Pick and Place data was incorrect. Noted for rev2.
After removing Y2, the power dissipation problem went away. Unfortunately I also discovered that Y1 had an incorrect footprint. I had taken the positions from the Bottom View in the datasheet - oops.
I removed Y1 as well, fearing I had blown my xtal driver pins by shorting them to GND.
A lot of work followed to get a ICSP header soldered onto my pogo lands, and setting up an Arduino UNO as a programmer using the Arduino as ISP sketch.
This all seemed to work, but now I had to figure out which bootloader to use as I had no 16MHz clock anymore. I found one that was meant for the "Arduino on a breadboard" using the internal RC oscillator at 8MHz.
Unfortunately, even though the flash worked fine, and I was later able to use Nick Gammon's bootloader ID sketch to verify the bootloader and fuses appeared to be written correctly, I was never able to upload a sketch using the Arduino IDE.
I tried a lot of things a lot of times during the debug process, realizing I had also done one of the most obvious errors in the history of electronics - failed to swap Rx and Tx for the UART. Once I got that sorted, I was able to find a combination of settings in board.txt, bootloader, and fuses that got me a response from avrdude. Unfortunately it was a fail, getparam failed, all the other calls failed, but at least it was getting to a bootloader! Maybe the baud rate was wrong, or one of the fuses wasn't quite set correctly, I don't know because...
On a whim I had dead-bugged the 16MHz crystal back onto the board using the correct pins for the oscillator - I still had C7 and C8 on there - and I was able to flash the Genuino/Uno bootloader direct from the IDE using the other Arduino. I had tried this bootloader previously but at the time one of Y1 or the FTDI header Tx/Rx swap were still wrong.
THIS TIME IT WORKED!
I had a skeleton Serial tester sketch I had been using to test uploads - it worked, and soon I saw Hello World! on the serial monitor. At 115200bps. I was ecstatic. I immediately went and found Adafruit's ADS1x15 library for the ADC - it worked immediately. I changed the gain settings and accounted for my 1:9 divider (oops...) and was reading an adjustable power supply to within 200mV from 0 to 20V. I'm pretty happy with that for now!
That was Wednesday - Today I tried the SD library examples with a FAT32 formatted 8GB microSD - they worked flawlessly. 2/2
Write a quick test to make sure I can read from the ADS1115 while writing data to the SD card - I2C and SPI should be fine at the same time, but will be nice to know.
Get the display working - haven't found a library for the AMS AS1117 display driver, so this might take a little more effort. Looks doable.
Try and reinstall the RTCMK module and get timestamps from it. Not sure how to set the initial time and date, may need to write a daemon to talk to it over serial.
Combine it all - figure out the command structure, if I'll do a config file only, or also have an interactive console.
That's all for now. Very excited. Many ideas for rev2...
Not much to report today - no progress on the hot ATmega here's what I tried:
Removed Y1 the 16MHz crystal with the incorrect footprint
No change to power consumption
Tied RESETn low
No change in power consumption
Power via VBAT in case TPS6305x isn't good with backfeeding
Reduced power consumption to 100mA - but output of buck-boost was only approximately 1V - current limiting was in effect
So...I figure I have two choices for where to go from here:
Option 1: I remove the ATmega from this board, which has the rest of the components populated allowing me to verify their operation (buck-boost, battery charger, maybe even the RTC, display, ADC if I wire up an external controller).
Option 2: I have the three OSH Park fab'd boards, stencils, and Digi-Key parts. I can try to assemble a minimal set of components to test the ATmega pinout and connections in the absence of other components.
After procrastinating on attempting to assemble some or all of the main components on the OSH Park boards with mylar stencils and a toaster, I decided since all of the work was already done to give MacroFab a try for small quantity turn-key fabrication and assembly.
I got one assembly at a cost of approximately $70 and helped debug the part placement UI of their web-app (I put the switcher at a 30-degree angle to squeeze it in the corner and they were only handling 0/45/90 geometry at the time).
The results *look* amazing:
I measured 26k between VCC3V3 and GND - a little low but enough for me to go ahead and populate some pins on the ICSP pads and then go ahead and try to power it on.
Unfortunately, that's as far as I got today. It railed the current limit at 200mA :-(
It was late and a quick 1A current limit temp-test showed the ATmega328p to be the hot potato.
Initial debug is showing me I did some silly things with the clocks - got the footprint wrong on the ABM11 crystal for starters. Looks like XTAL1 and XTAL2 are dead shorted via pins 2 and 4 of the package - pretty sure I flipped the top and bottom views when drawing the footprint.
Pull Y1 (ABM11 crystal) and pull the ATmega328p RESETn to GND - if that removes the power dissipation, next step is to try letting RESETn get pulled high - if that works I'll try to program it and find a different crystal to maybe fit that footprint...