Sunday, August 4, 2013

Part 7: Designing a shield for the Due

List of parts to blog:
Part 1: Quadcopter Design
Part 2: Integrating rc Transmitter and Receiver with Arduino
Part 3: ESC and motors (wiring and code)
Part 4: Sensors (reading in raw data and applying calibration)
Part 5: IMU - Kalman Filter Orientation Estimator
Part 6: Discussion on Arduino (boards and oddities)
Part 7: Designing a shield for the Due
Part 8: Control Laws!!!!!


Part 7: Designing a shield for the Due
I started this project using an Arduino Mega and I ripped the headers off and soldered straight to the board. This became a nightmare. I needed to move some of the wires to new pins but it was going to be impossible to get in there to desolder and resolder them. Here is a picture of the rats nest. Also my ground "plane" was a blob of solder that had like 12 wires going into it... this was quite the kluge. Tons of heat shrink and electrical tape wrapped around stuff. Scared me flying the thing, a wire could come loose at any second or something could short out.

I wanted to completely re-do all of the wiring. At the same time computational needs were pushing me towards the Due with the 84Mhz  ARM 32-bit chip. This will be hundreds of times faster than the Mega.

To do things the right way I needed to build a custom shield to sit on top of the Due to solder all of my connections into. I wanted to include plenty of room for expansion also which  means:
8 motors
9 channel reciever
4 Serial devices (GPS, SD card data logger, bluetooth interface, and a sensor device)
plenty of I2C devices (pressure sensor, IMU alternative to serial)
voltage regulator (ignore this for now, I have a use for it much later)
LEDs (red, yellow, green for status)
a buzzer for notifications (during quad testing I found this helpful)
spare set of 5 to 3.3 volt conversions in case a sensor is a 5v system
digital pin with a switch (I envision putting LED's that strobe or something around the frame but I want the option to turn it off)
maintain holes for as many other pins as possible.


With all of that in mind I set out to design a board. From what I read there is one standard software package for designing PCBs: Eagle. They have a freeware version that allows you to make small boards. The Arduino Due footprint falls within the freeware allowance. I must note I have no experience at all designing boards at all, never used eagle. I found it to be very easy to use. You just drop pin holes in and then draw the routing in the 2 layers. It ends up becoming a sort of puzzle to get everything laid out. I used mostly the top layer for routing, leaving the bottom layer almost completely a ground plane. I only had to use 1 set of vias. Here is the eagle board layout, note I later filled the bottom planes open spaces with ground.


For anyone who hasn't used Eagle and is scared away from designing your board, don't be. Its very easy to learn and use.

So after spending hours and hours laying all of that out... it was time to send it to get fabricated. There is a service called OSHpark that combines many peoples small projects together then has them fabricated on a giant panel. It helps reduce the cost for people like me doing simple prototype boards. Their pricing is fairly reasonable and only takes a couple weeks. Took my board only a couple days to be sent to fabrication. Then hopefully only a week for me to get it back in the mail.

Here is the render I got form OSHpark as to what the final board should look like:


[waiting for board to arrive from OSHpark, more to follow soon]

No comments:

Post a Comment