All my pent-up impatience just came buzzing out all at once.
With my shiney new circuit board in hand, I started soldering up the bare minimum for testing – LiPo charging circuitry, voltage regulator, ICSP port and FTDI port. And indicator LEDs.
So far so good, the voltages were good and the LEDs worked ok. Mind you, I didn’t use the good LEDs on this. No, I already knew there’d have to be another revision because I made some mistakes on the boards…
Anyhow, power tests were passed so I added the micro-controller — an Atmel ATMega1284P — and an 8MHz resonator. Tricky soldering – the pins on the micro controller are 0.4mm wide and have 0.8mm centre-to-centre spacing. There’s 11 to a side.
My two biggest concerns at this point were that a) I might have botched up the soldering, and b) I might have totally botched up the circuit board when I laid it out.
So I plugged a programmer into the ICSP port and tested it, and presto! I had communications!
My plan was to continue using the Arduino IDE to program for this, and fortunately there was already a ‘duino based on the 1284p, called the Sanguino. Unfortunately it isn’t up to date with the latest (1.0.1) version of the IDE, and I’ve migrated everything to 1.0.1 so I ended up not using the Sanguino setup.
The only thing I did was take their 1284p bootloader, and modify it to match my board layout. Then I created my own 1284p variant in the IDE and set it to work with my customized bootloader.
I had done all that last week and without any way to test, so my first real test today was to burn my bootloader. This worked (so the microcontroller, resonator, and ICSP were definitely working correctly) but I could not write sketches from the IDE so I wasn’t sure if I had screwed up the FTDI port or not.
Further testing however revealed that my 57600baud bootloader was too ambitious for the 8MHz clock speed. At 19200baud the bootloader runs just fine, albeit slower.
So another passed test! I had working power, a working micro, working ICSP port and working FTDI port.
Next thing was to plug in a screen. That was slightly challenging as my big blunder with this board was laying out the screen at the wrong size – the holes on the board are too narrow for the holes in the screen. And I didn’t want to hook the screen up permanently since the board isn’t final. So I put in some female headers, and bent a few to fit in my misplaced pin holes.
And voilla! The screen works!
Lots of successes for a single night, but I’m not going to continue populating the board. I’ve left off all the sensors as they’re the most expensive parts (gps + compass + humidity + pressure = $85). I have to go back to the ‘drawing board’ and start fixing all the mistakes I made on the board.
I’m also running some additional tests, as I’ve noticed some problems with the ADC readings (analog, eg. temperature and voltage) that shouldn’t be happening, and I have to figure out if they are software or hardware.
Still, not bad for a single night – and it gives me stuff to work on for the next few nights.