Close

Testing the Finished Boards

A project log for Light Up Raccoons

A little coin cell powered raccoon with capacitive sensing to light up its eyes

savoSavo 02/02/2023 at 01:090 Comments

Once I had assembled my first board I began to test it to make sure there weren’t any issues stemming from my assembly nor the design itself. The initial power applying test passed, current was drawn at about 10mA when 5V were applied, which was what I expected for a blank ATtiny85, so no obvious shorts or non-functional components.

Programming Issues

Since the board passed the basic power-on test I went to try and upload some basic code to the ATtiny85 using my ATMEL-ICE in system programmer. I plugged it into the header but failed to get it to work or even recognize that it was connected to a system, it didn’t even tell me that the target was powered which it certainly was!

After some poking around I decided to double check the connections, since they tend to be the culprit of most electrical issues. Sure enough, it was! It turns out that my connections were prepared correctly on the schematic, so each signal was on the correctly numbered pin - however, I had accidentally selected a pin-socket, not a pin-header for the footprint so the pins were mirrored.

The mirrored layout used on the manufactured boards
The mirrored layout used on the manufactured boards (as viewed from the back side)

Below is the proper layout, note how number-for-number they match properly. It is a good thing that I was using a proper programmer (I had got my ATMEL-ICE a few weeks before I started this) and not supplying power on these mirrored connections before I figured this out, otherwise I would have likely fried the ATtiny chip.

The proper layout of connections
The proper layout of connections

This was quite annoying since I needed some intermediate connectors between the programmer and the board to route the signals properly. If this was a through-hole header I could have simply put the header on the opposite side and that would have corrected this issue too.

Initially I used some M-F ribbon cable jumpers to re-route the signals between the programmer header of my ATMEL-ICE and the raccoon. This seemed to work, but only partially. The board/chip would be recognized, but any attempt to write any code to it would result in failure since the ATtiny would fail to respond with the correct device signature. I found the cause to be the excessive length of my programming wiring (roughly a combined 35cm from end to end) from some forums online. Since I did not have shorter M-F jumpers to use with my proper programmer, I opted to use my ol' reliable Arduino as an ISP system which would have a shorter wire length, which worked!

Using my Arduino as an ISP
Using my Arduino as an ISP

Even though I could continue using the Arduino as an ISP, I wanted to use my programmer since it was safer and would also make it easier for me to ensure that the power draw was what I expected since the board could not potentially draw power from it instead of from the monitored power supply. Since I didn’t have some shorter M-F jumpers I made a F-F adapter using two 2x3 pin-sockets soldered end-to-end which would then allow me to use my short M-M jumpers to mirror the signals between board and programmer. This solution worked and I kept it for the remainder of my development process.

The adapter setup to mirror the connections for the ATMEL-ICE.
The adapter setup to mirror the connections for the ATMEL-ICE.

Power Draw Issues

Once I was able to reliably upload code to the raccoon boards I went ahead to check the power draw of the boards met what I was expecting, roughly 5uA at 3V, when in deep sleep. After uploading my previously prepared code to the microcontroller, I started monitoring the power draw and… it was off the charts! The maximum draw was supposed to be roughly 10mA when the LEDs were on, but this board was drawing over 20mA with them off!

This honestly scared me, since this was way above what I expected. However I tested it and the system worked, reacting to my finger as expected, just gobbling up way more power than expected. The power draw seemed to vary over time, rising and lowering to the tune of several mA, which struck me as odd since its behaviour was constant. So I left it to run for a while after maybe 15 minutes unsupervised, I saw that that the power draw had been steadily rising and had reached 160mA at 3V! This shocked me so I reached for the board to see how the ATtiny was holding up, since with that much current it was likely going to be warm to the touch, but it wasn’t, and that confused me even more.

I turned off the power and de-soldered the chip from the board, so I could program and monitor it on its own to see what the issue was since I believed it to likely be a fried chip.

A harvested ATtiny being tested. Left red lead supplies +3V, right red jumper is the ground connection.
The harvested ATtiny being tested. Left red lead supplies +3V, right red jumper is the ground connection.

As soon as I had powered on the ATtiny85 on its own, on this programming board, the power draw was exactly what I had expected, roughly 5uA! I was flabbergasted. So I slowly assembled a new raccoon using this chip, applying power between each component installed to see which caused this massive leakage. At the end of it the assembled board worked fine, and was still only drawing the power I expected.

So I had a proper, finished board but no answer for why the original board failed so spectacularly.

Cause of Excessive Power Draw

After some discussion with my friends I learned that the current leakage was likely caused by the excessive flux remnants on the board from my initial assembly and some rework that I did to try and make the joints nicer. I had not bothered to properly clean this off properly before testing. I accidentally over heated the pads as I removed the microcontroller to test it as shown above so I couldn't reassemble the board and clean it to check, however since no other board has had this issue since I began to clean them properly before testing, I think it that I’ve solved the issue.

The puddle of flux on the original board
The puddle of flux on the original board

Discussions