Close

HW rev. 2

A project log for Micro progmeter

Volt- and ohmmeter plus calculator on 25x25mm PCB

jaromirsukubajaromir.sukuba 12/08/2015 at 15:132 Comments

It took me longer than I expected, but I finally had a few evenings of spare time to populate new board with components and do a bit of programming. Here is quick update of status:

New PCB

Design in Eagle

and in reality, manufactured by cheap local manufacturer it looks like this

The silkscreen isn't perfect for such as tiny board, but I don't care that much. The most significant difference to previous board is change of main ADC from MCP3424 to ADS1120. I had to free up four pins for full SPI interface, but the previous design was quite constrained in this aspect - so I opted to connect the joystick into resistor network and sense the joystick position by ADC. I left the original schematics on github as well as there is new one to compare.

The new ADC works as expected and in fact, everything went flawless on first try. I reused "testbed" from previous hardware revision to continue with development

Testing code, showing measured voltage on last row.

Yep, 4,87V on input. With PGA - internal to ADC - disabled, the smallest distinguishable voltage step is around 1mV even at 20V range and the readout is rock stable with no filtering, so it looks fine for now. With PGA gain set to higher than 1 and some digital filtering (PGA will bring some noise) I should be able bring down resolution well under 1mV - but anyway, even 1mV resolution is good for this meter.

Firmware

I'm writing the firmware mostly on my main Linux machine, but I don't forget on Windows users too. I'm using MPLABX suite from Microchip along with their XC8 compiler as well as SDCC. Compilation from command line without MPLABX should be easy.

For programming, I'm using Microchip ICD3 for now (cheaper PicKIt3 works well too), but as soon as I finish hardware for my #PIC16F1xxx Arduino based programmer I'll try it out too. This should allow maximum flexibility for project followers - you can build/flash it with MPLABX/XC8/PicKit3 for maximal convenience or command line/SDCC/my programmer for open-source tools.

For now, I prepared basic skeleton of firmware, with ADC and display routines working with both XC8 and SDCC compilers, so I can start with more interesting parts. The firmware is available at github.

Discussions

Eric Hertz wrote 12/11/2015 at 01:46 point

Cool, never seen flat-cable soldered like that by a hobbiest, was it difficult?

  Are you sure? yes | no

jaromir.sukuba wrote 12/11/2015 at 09:22 point

Not at all. In fact, it is quite easy provided you have average soldering iron and flux, but this is necessary for other SMD parts anyway.

Working with the flat cable isn't that that hard and it isn't as fragile as it may look. This particular piece was already used on my first prototype, I put it down and resoldered on new prototype with no problem.

  Are you sure? yes | no