Skip to content
Ido Calman

Week 6 - Embedded Programming

weekly3 min read

This week I would like to experiment with LED strips. I found a NeoPixel strip that should be relatively easy to experiment with:

LED strip

So using Neil's hello world board with the https://www.microchip.com/en-us/product/ATSAMD11C14 I would like to connect a generic 1x3 header that would get power, ground and send data to one of the GPIO pins of the micro controller. I went ahead and designed the board in KiCAD:

First design

I wanted this board to be quite small and to not have vias at all, so I spent a lot of time designing it with the appropriate footprints, using zero-resistor jumpers. This resulted in a board that I am quite happy with!

First footprint

So I milled this board and was ready to solder it on Monday! BUT! A last minute save from one of the TAs made me realize that my board is wrong: The components that get powered from the USB should all go first through the regulator. In order to do so, it is convenient to change the schematics to have two distinct power inputs, one labeled 5V and the other 3.3V. So I changed my schematic and fortunately the changes in the actual board were not major since everything was already connected to the 5V supply, the only change was to route it to the output of the regulator.

Regulated circuit

Now that I finished this board I realized another problem, this time more severe - the LED strip I planned to use is not supported by the SAMD11C. So unfortunately I had to revert to a simple blink board and hope for the best. I decided to take away the custom LED header and move on with milling and soldering the board that I have:

Soldered regulated board

Now I wish to connect this board to the programmer using the 5x2 header and bootload the binary file on it. But here is another problem: the header I used (from the hello world example) is not compatible with the female part of the programmer. Apparently I used the SMD connectors which are 2.54mm but instead should have used the JTAG 1.27mm. So I had two options: redesign the board with the correct header or find some convertor. I looked around the shop and could not find the converter that I need, but then I though that might be a good opportunity to mess around with a utility board. I decided to make my own converter as a solution instead of remilling the board which took quite a while. So this new board should simply have the two 5x2 male heards on it, and have a 1-1 wiring from each pin. The circuit looks like:

JTAG to SMD converter

After milling:

Milled converter

Some of the traces were connected because I did not specify the correct clearance (0.4) to the Roland machine. So I fixed that and milled a correct converter:

Correct milled converter Soldered milled converter

Now finally I should be able to connect my board to the programmer!

Connected board and converter

But unfortunately this did not work as well. I got this error:

1Clock frequency: 16.0 MHz
2Error: invalid response during transfer (count = 0/1, status = 7)

Which might indicate either software or hardware connections. I debugged it using lsusb and realized that it might be the connections from the converter to the actual board that have been messed up because it didn not seem to recognize my USB. So I switched some stuff over:

Rearranged wires

Now my USB is recognized! but unfortunatley an error still remains (although slightly different error)

1Clock frequency: 16.0 MHz
2Error: invalid response during transfer (count = 0/1, status = 0)

At this point I realize that the problem is with my actual board. Unfortunately after spending 3 complete days (on my birthday) in the shop, I ran out of time and was left with no functioning board but I learned a few lessons:

  • Powered-input components should have explicit voltage label.
  • I should read the data sheet of the component I am trying to attach before designing and ascertain compatibility.
  • When attaching to an existing device (such as the programmer) it is important to check the connections before designing the board.
  • Headers problem can easily be solved by milling a converter.

Files