Final Project Development

Schedule:

I have 17 days to finish my final project, as I will present it to the FAB Academy on June 18th. To accomplish this feat, I will adhere to this schedule:

At this point, I have proven that I can build printed circuit boards that contain Hall Effect Sensors and LED and thai I can write code to read and react to input from those sensors. What I have left to do now is package a PCB into the correct form factor for this project and then design a pleasing mechanical system to house it. I'm confident I can do this in the remaining time.

The process:

The first step in the process was to sort out the electronics. I had done some proof-of-concept work in the Input, Output, and Networking weekly assignments, so I jumped right into SolidWorks PCB to lay out the schematics and the boards.

As you can see, I designed 5 boards all together - this allowed me to get the LED and the three Hall sensors in to positions they needed to be in the final mechanical design.

In the early phase of my design, I actually had a 6th board. It had a second ATTiny44 microcontroller that I planned to use to read the hall effect sensors. It was then going to communicate with the ATTiny44 on the LED board via a Serial Bus. I had each board communicating to the Serial monitor quite nicely, and I even had the Hall Effect board sending simple insructions to the LED board to control its lights, but when I added in the Hall Effect data, the serial communication failed. I suspect it was because I was sending the wrong type of data, "int" vs. "char" vs. something else, but I was unable to get one to effectively speak to the other.

A bit pressed for time, I figured out that I could run everything off of one Attiny! ...if I shared the pins. More on that in a bit...

Before I could dream of writing code, I had to solder all of the boards. At this point in the class, I've gotten quite good at soldering, so it went fairly smoothly. ...that is until I tested my boards... more on that in a bit too...

I collected my electronics components...

...and soldered them in place...

Boards at the ready, I started to write code. Honestly, the code turned out to be quite simple, but it of course gave me some headaches. First - a small headache - I had to figure out how to use the same pins to perform both input and output tasks. To do so, I toggle the pinmode each time I need to read from or write to the pin.

My big headache came when I couldn't get the LEDs to obey my commands :(. I troubleshooted the code for quite some time and then realized that the problem might be in hardware. I took specific readings from the hall effect sensors, and found that they were outputting gibberish. I then took one of my older boards that had a hall effect sensor on it and held temporary jumper wires between the boards. This produced good results from the old hall effect sensor. With this, I determined that I managed to get a hold of a bad batch of sensors. Slightly defeated, I machined 3 more boards, grabbed 3 more sensors, and soldered the components in place. This,thankfully fixed the problem.

With the electronics in place, I turned my attention to designing the mechanical components. I used SolidWorks to design all of the pieces and had fun considering how everything was going to be packaged together.

In the process, I designed components that would be machined on the Shopbot, cut on the laser cutter, printed on a 3D printer, and cut on the vinyl cutter. Each of these techniques is highlighted in the above video and shown in the following collage.

With everything fabricated, I turned my attention to assembly. I carefully placed each component in place, securing with a screw when necessary. I used vinyl stickers to hold the hall effect sensor boards in place - though they'll also be held in by the large cover plate.

This is how the final project turned out. Overall, I am extremely proud of my accomplishment!

An Important word about Safety!

If you do build this design for yourself, I strongly advise you to improve two things. I feel it is paramount that you do so if you even remotely think it will be used by a small child.

First and most importantly, design a better way to securely hold the magnets into the wooden blocks. My design uses simple vinyl stickers. This is not remotely robust enough to ensure that the magnets stay in place while a child plays with the toy. These small magnets not only pose a choking hazard, but can also cause internal damage and create life-threatening complications if more than one magnet is swallowed. A robust method of holding the magnets in place would include at least two mechanical restraints - for example epoxy to hold the magnet in a counterbored hole followed by a metal covering plate that is screwed into the wooden block. Please heed this warning!

Secondly, please consider a self contained power source. I'm using an FDTI cable which could pose a strangularion hazard for young children!

As a father of two boys, I take their safety more seriously than anything in this world. I urge you to consider the safety of those who might use your creations as well.

Download my SolidWorks 2018 files

Download my SolidWorks PCB files

Download my Code

Download my Fabrication files for ShopBot, Laser Cutter, Roland Mill and Vinyl, 3D Printer