Close

It's ALIVE!

A project log for mini-DVM

A miniature (1in^2) 4-channel voltmeter with logging.

logan-cummingsLogan Cummings 10/08/2016 at 02:550 Comments

I'm so relieved! OK - recap:

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

Next up:

  1. 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.
  2. 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.
  3. 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.
  4. 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...

Discussions