Week 5 - Electronics Design

Design

This week I wanted to create multiple circuit modules that could serve as a prototyping platform for my final project.

To start, I knew that I wanted to use the ATXMEGA16A4U-AURCT-ND since it has two separate I²C buses (my final project page has more info on why). Going forward, there are definitely cheaper chips that can serve this purpose; the XMega is overkill, but it's what we have. I based my schematic on this one and then broke it apart. There are 5 essential parts:

  1. The Master
    • Serves as an interface for the computer and the slaves
  2. The Slaves
    • Each slave will have a unique I²C address, so it can be called for by the master.
    • Each slave will also have a peripheral which can be inserted or removed to provide additional functionality (more on the final project page)
  3. The Peripherals
    • Interchangeable boards controlled by the slaves
  4. The Programming Adapter
    • This hooks into a PDI Programmer, and connects to the Master and Slave boards.
    • It removes the need for a programming header circuit on the Master and Slave boards
    • Another alternative could be something like Tag-Connect
  5. The USB Adapter
    • We need a UART connection as well as a power supply for our board, so the USB Adapter takes care of that

Designing in Eagle

All boards use the same hexagon scripts from Week 3. Vias are .9mm in diameter for rivets. Traces are 12mil, which is as thin as I'm willing to go. I previously had bad experiences with 10mil traces. Most designs flood the entire board with ground, which is indicated by the dotted polygon around the circuits.

Download the Eagle project here

Master:

This board is fairly light:

The other features are vias, making the board double sided. While not strictly necessary for this board, to get all of the headers aligned with the sides, and to make a distinction between the network and other headers, I placed them on the other side.

Master Schematic
Master Board

Slave:

This board is much heftier:

This one is much more crowded, and based on the architecture of the headers, it is necessary to make it double-sided to match this footprint. One mistake I made was putting the vias under the XMega but I realized that they won't be flat on the boards we're using, so I had to reroute them all to the outside.

Slave Schematic
Slave Board

Peripheral:

To meet the requirements for this week, this board uses an LED (attached to SCL), and a pushbutton (attached to SDA). You might be wondering "hmm, aren't SCL and SDA used for I²C?" and yes, you'd be absolutely right. The circuit was designed with the flexibility for the Slave to control simple components in the peripheral, as well as having more complex components that use I²C, such as IMUs. All it takes is some software to change what the pins do. Also note that this board does not have a large ground space.

This one is double sided, because the header pins on the bottom face inward to (theoretically with different headers) slide right into the slave.

Peripheral Schematic
Peripheral Board

Programming Adapter:

This pares down the 6 pin connector to only 4 pins, which reduces the size of the programming header necessary on the microcontrollers. There are also debugging LEDs as well.

This circuit nicely fit on one side, so double sided was unnecessary.

Programmer Schematic
Programmer Board

USB Adapter:

This also pared down the FTDI Connector to only 4 inputs, since we don't use 2 of them. It also brings the USB voltage from 5V to 3.3V.

This circuit was also small, so it fit well onto one side.

USB Schematic
USB Board

In general, this is how everything connects together. With I²C, it's possible for many slaves to wire to a single master. By week 7 I should be able to have at least 1 more slave hooked up.

Connection Diagram

Milling

This week I'm back again to the Othermill. It's very convenient for double sided boards.

Mill toolpath

By default, the Othermill doesn't take into account the optional alignment fixture. The quick way around this is to provide an offset for the piece you're cutting. This time, I got way too close for comfort, and stopped the job right away.

Close Call

At this point, I was sick of having to guess and adjust for the alignment fixture, so I found the setting for calculating where the fixture is. It involves putting an endmill in backwards, and then the Othermill touches various points on the fixture. Much better.

Alignment Bracket

The alignment fixture is necessary to align a double-sided board properly, but you can get somewhat decent results without it. If you're drilling vias, then you absolutely have to have it fully aligned. Here's what that part I stopped early looks like on a semi-cut board:

Double sided 1
Double sided 2

Rivets

After milling and getting a bunch of holes in the boards, I used rivets to create a connection between two sides. This is the rivet press to do so:

Rivet Press

First you have to carefully place the rivet into the hole

Rivet Placing

Next, you align the rivet into the rivet press

Rivet Aligning

And finally, you press down on the press. Too hard, and the rivet gets stuck on the press. Too light, and the rivet doesn't get squished enough.

Rivet Pressing

Check out these rivets!

Rivet COmplete

You may notice that some of the rivets are misaligned or the traces have come undone. That's okay, because we'll place solder over the rivets later to close those connections. The traces and pads for my vias were perhaps too thin. I used the default thickness in Eagle, which was fine for most vias. Some, however, got parts torn off by the drill, or plucked out by a rogue rivet:

Rivet Tear

Organizing

Before soldering everything, I wanted to make sure I had all of the components in order. I also wanted to have a guide I could reference rather than having to constantly look at an Eagle schematic, so I sketched out each circuit and where all the components should go.

No Components

Afterwards, I gathered up all of the components I needed, and taped down the tiniest ones into their correct places on the circuits.

Organized Components TOp
Organized Components BOt

It didn't work exactly as I had planned. The tape was stronger than expected, so it ended up taking a bunch of paper with it. Workable, but not great.

Tape Tear

Now I'm ready to solder! Spoiler: here's all of the components soldered and organized:

Final Organization

Soldering

Soldering was fairly straightforward. There were a few things that stood out.

The first, was when I went to the shop and used some random solder lying around on a table. Apparently, this solder was absolutely horrendous. I screwed up an entire board using it. It came out terribly on another board, and I had to wick all of the gross solder away:

Bad Solder

The second, was that I soldered some components in the wrong order, which made soldering some connections tricky:

Bad Solder

The third, was soldering the 44 pin XMega. Luckily, solder paste exists. Here's how to use it:

1. Squeeze out the solder paste along the pads for the XMega

SolderPaste

2. Carefully place and align the XMega on the pads (if it's not aligned properly, the connections won't be made correctly, and some legs may share a pad).

Placing xmega

3. Using a heat gun, melt the solder paste until it comes out shiny. The surface tension will draw the paste to the legs and pads.

Full Heat Gun
Heat Gun

4. In the case of solder bridges, flow even more solder onto the legs...

excess solder

5. And then use a wick to soak up the excess solder.

solder braid

And the XMega should be soldered!

Results

All of the chips

final layout top final layout bot

Master

Master Top
Master Bottom

Slave

Slave Top
Slave Bottom

Peripheral

Peripheral Top
Peripheral Bottom

Programming and USB Adapters

Programmer
USB

Programming

Since I designed the boards in such a way that requires the I²C protocol, as well as using PDI, it'll take a little more work than just plugging in Neil's code. So what I still need to do is:

Because the EECS shop doesn't have a very large mill, we had to start on next week's assignment early. Since I've already gotten it done, I have some spare time to work on making my board think.

This website was created by Harrison Allen for How to Make (Almost) Anything at MIT in 2019