Jaclyn Berry

Final Project Update

Final Bill of Materials

Item Quantity Price Vendor
ATmega328p 1
ATtiny44 1
PIN HD (Male 2x2)
PIN HD (Male 2x3)
PIN HD (Male 2x2)
PIN HD (Male 1x)
3.3V Regulator, 100mA
5V Regulaor, 1A
16 Mhz Ceramic Resonator
Push Button
Analog Microphone
Ultrasonic Range Finder
H-Bridge Motor Driver 2
Resistors - 10k
Resistors - 1k
Resistors - 0 Ohm
Capacitors - 0.1uF
Capacitors - 10uF
3.7V - 2000mAh - Lithium Polymer Batt
Pololu Gearbox Motor: 200 RPM< 6V


  • Get power board working. Add an on-off switch.
  • Get 1 microphone working with attiny44
  • Get 2 microphones working with attiny44
  • Get attiny talking to 328p
  • Get 328p working with motors
  • Get 328p working with range finder
  • Get 328p working with range finder and motors
  • Get 328p working with range finder, motors, and attiny44

  • Design Wheels
  • Design Wheel Mold
  • Mill Wheel Mold
  • Fabricate wheel hubs
  • Cast Wheels
  • Design Robot Body
  • Lasercut robot body
  • Put Everything together
  • Make sure it works.

update 12/13/2017

328p is now working although cannot be directly programmed from Arduino. Earlier I had crossed Tx and Rx and forgotten a capacitor near the FTDI reset pin. Once I trimmed and resoldered those aspects, programming and serial communication worked fine.

I made new microphone boards with through-hole connectors. I'm planningn to attach the microphones to the outside of my robot and have the headers stick through small holes to the inside of the body. I'm actually very proud of these microphone boards... and they work. Tested and everything.

I made a master battery power board. The board takes two 3.7V LiPo batteries to supply 7.4 volts to my motors (I know they're only rated for 6, but it should probably be ok... 6 AA batteries didn't seem to kill them.) But of course... A PROBLEM arised!

Looks like the voltage regulator I got from the shop does not mach the regulator from the inventory and therefore, I was following the wrong datasheet. I looked up the part number on the component directly and it looks like it might be a Texas Instruments regulator with different pinouts. I will debug in the morning.

update 12/09/2017 -- 12:00AM

I milled a new board this week. It was lovely. But it didn't quite work (surprise!)...

Debugging the 328p
I tried to program the 328p in Arduino, successfully burned bootloader for the Arduino Pro Mini (328p, 16mhz). But I couldn't upload a program! I compiled hex from arduino and tried to upload via usbtiny isp and it worked! So there was something weird going on...

I tried getting serial to work next. I compiled the code from arduino then uploaded to the 328p via usbtiny/isp. Uploading was fine. When I opened the serial terminal, nothing showed up. I tried the code on my Arduino uno, and nothing was wrong there. So I tried crossing my tx/rx lines between the ftdi and the 328p and left off the reset pin. This got the board talking to the computer! It turns out that you connect Rx from the 328p to Tx on the FTDI and vice versa.

Next, I was curious of the reset pin was causing trouble with the programming. While the serial communication was going, I connected the reset pin to the ftdi cable, and everything stopped. This was the source of a problem. I referred to Neil's hello.world board for the 328p and noticed that he had a capacitor between reset, vcc, and reset-ftdi. My board is missing that.

Tomorrow there will be much board sugery.

update 11/28/2017

Successes and failures this week. After successfully getting the 16u2 to talk to usb, and while waiting for a new usb cable to come in the mail, I programmed my 16u2 with ISP headers, and my computer stopped seeing the 16u2. I spent a lot of time trying to find information in the datasheet, saw something about the UDCON register defaulting to DETACH on reset, so D+ was pulled low. I probed with my multimeter and it was pulled low, but disabling detach did not activate the pullup resistor. It might be time to try a different microcontroller.

I found out that the time of flight sensors use i2c communication protocol, which the 16u2 does not support. So I switched to an ultrasonic distance sensor.

I made my first revision model of the whole robot. I used Rhino this time to make it a bit faster. For the next version I think I will use Fusion.

I printed some new wheel hubs. The holes were too small for pressfit. I think if I updated them to 1/8" diameter they will print at the perfect diameter (slightly under). I want to learn FusionCAM to mill out the molds for my tires.

I fabricated the first version of my robot chasis out of chipboard. I'm actually very happy with this material choice. I think I may need to make it slightly larger, becase the parts were a bit cramped. Unfortunately, I'm very dependent on fasteners for this design. I will need to find some very tiny screws for the distance sensor.

I started testing out how to use the microphones to control the motors. I got it partially working, but not very well. I think I will need to smooth the signal again like I did in the wk12 homework assignment. I'm worried about programming this entire interaction in C directly. Pardon the wires while I try to figure this out...

update 11/23/2017

Many things have developed over the past month. To start I purchased some tiny motors. I didn't expect them to be this small, but since they were a little expensive, I'm hoping that they will work just as well. They are 1:150 gear ratio, 200 RPM, 6v DC motors.

I started making a board for the atmega16u2. I chose this board for it's many pins, and capability to program via usb cable. Unfortunately, I have not been able to program it through usb as of yet. I can program it fine through the ISB header and the usbtiny fortunately.

I milled it out on the SRM-20 with the 1/64" endmill. I had to trick mods into thinking the endmill was 0.013" for it to complete the teeny tiny traces by the micro usb header. It was a bit risky and the traces did start to peel up, but everything seems to have come out ok. Next time I think I need to use a new endmill because some of the traces looked jagged.

I designed the board to have breakout pins just like an Arduino so I could easily test out my input/output devices with it. Some design changes I will implement in the next iterations: labels would be nice, a power indicator LED, more breakout pins, mounting holes, maybe a reset button. And of course USB functionality. (Thank you to everyone who has helped me troubleshoot this board so far: Will, Jonah, Amanda and Tomás).

One funny aside–I drew up the eagle package for the 10 pin female headers, but I accidentally mirrored the footprint. I realized this mistake when I had to solder the header on. Instead of milling a new board, I found out you could pull out the "feet" of the female headers and turn them 180 degrees. This worked like a charm. I will have to fix my package in eagle later.

I realized this microcontroller isn't set up for Arduino yet, so I had to grit my teeth and start building my program in C. I started from Neil's motor example code, which worked great for the normal 12V DC motors, but didn't seem to work for my motors. I found out it was related to the PWM rate, but I haven't fully troubleshooted the motor control yet.

In tangential news, I started building a simple model for my robot to visualize how all the pieces will go together. My first prototype will be built out of cardboard and wood or acrylic. We'll see how far we get after that.

The sensing devices have changed for my robot as well. I've decided to use sound levels (volume) as the trigger for my anti social robot. I tested out some microphones (week11) and still need to build a board for the distance sensors. I will also need to figure out a way to process the sound levels because they come in a wave form...

I intend to cast my wheels (like in wk8). However, I also intend for the hubs to be press fit onto the motor shafts directly (they are so tiny), so I need to 3d print the hubs. To make sure the oomoo stays on the hubs, I will have to make sure that the hole joints I designed before will be connected on both sides of the wheel. Pictures of models to come.

udpate 10/24/2017

I started learning how to build robots this week. Ali helped me consider which sensors and motors to use and pointed me to a book that would help me get started. I started cadding a very simple version of the hardware base so I can start prototyping. I plan to cast the wheels during the molding and casting week. I've decided to simplify my interaction considerably because I think I will have a lot to learn with motors. I updated the plan below to reflect the parts I think i will need and the interaction I intend to include.

Antisocial Robot Plan

  • PIR motion detector: Avoid People. Signal High-Low, turn X. Signal Low-High, turn Y.
  • Range Finder/Distance Sensor/Bump Switch: avoid obstacles and oncoming people

Other Parts:
  • Microcontroller (328p)
  • 2 DC Continuous Motor
  • H Bridge Motor Driver
  • Axles
  • Wheels

  • See people (IR) and run away
  • Avoid objects
  • Spin in circle when cornered

Some ideas I have considered:

  • Alert Cap (see week 1)
  • Smart bike frame
  • Spring-powered tiny human-size car
  • Antisocial robot

Right now Antisocial robot is winning.

How to Make (Almost) Anything | Fall 2017