BUILDSbot 12 ounce

buildscc | 15 Feb 2012 | | projects

[[Image:IMG_4024.jpg thumb right 240px 12 Ounce compared to its name sake. The 12 Fl. Ounce Diet Coke can.]]


BUILDSbot 12 Ounce is part of the overarching BUILDSbot project. The goal is to create a functional robot which can take commands from a USB serial connection (possibly move to a wireless connection eventually).

The robot should also be capable of doing line following as its main function. USB connectivity is simply for testing and possibly to help simplify future wireless based communication schemes.

Specifications and Goals

[[Image:BUILDSbot-12Ounce-1-Holding.jpg|thumb|right|200px|Chris Holding 12 Ounce]]

  • Tiny, lightweight and easy to make.
  • Line Following Capabilities
  • Begin development on a standard AVR-C++ library for future AVR microcontroller projects

Version 1

Coming soon…

12 Ounce V1.0 is currently being worked on.





Block Diagram


PCB Layout


Change Log




{| '''Part Names''' || '''Quantity''' || '''Part Number/Description''' || '''Vendor/Vendor ID'''|| '''Link/Datasheet''' |- | J1*, J2* || 2 || Mini Metal Gearmotor 100:1 (6V DC) || Sparkfun - ROB-08912 || [] |- | J1, J2 || 2 || Terminal Block 2-pin 3.5mm || Adafruit - 724 || [] |- | U3, U4, U5 || 3 || QRD1114 - Optical Detectors/Phototransistors || Sparkfun - SEN-00246 || [] |- | U1 || 1 || Arduino Duemillanove (Uno also works) || DEV-11021 || [] |- | U2 || 1 || L293E Quadruple Half H-Bridge || Digikey - 497-3622-ND || [] |- | D1 - D8 || 8 || Schottky Protection Diodes || N/A || N/A |- | C1, C2 || 2 || .1uF Ceramic Capacitors || N/A || N/A |- | C3 || 1 || 10uF Ceramic Capacitors || N/A || N/A |- | R1, R3, R5 || 3 || 200 Ohm Resistor || N/A || N/A |- | R2, R4, R6 || 3 || 5.6kOhm Resistors || N/A || N/A |- |}


{| '''Quantity''' || '''Part Number/Description''' || '''Vendor/Vendor ID'''|| '''Link/Datasheet''' |- | 1 || Ball Caster Omni-Directional Metal || Sparkfun - ROB-00320 || [] |- | 2 || 32x7mm Wheels || Sparkfun - ROB-08901 || [] |- | 1 || Broken IR/Microwave Motion Detection Sensor for the chasis || N/A || N/A |- | 2 || Heavy Duty Zip Ties (in same these things actually secure the motors in place || N/A || N/A |}


Full Schematic

[[Image:12OUNCE_SCHEMATIC2.JPG|thumb|center|400px|Schematic done in EAGLE CAD]]

This schematic is laid out in EAGLE CAD 6, which offers an XML file format. The full schematic is available on [ Github].

Motor Controller

[[Image:BUILDSbot-12Ounce-1-Side.jpg|thumb|center|250px|Side View of Motor Controller]]

The motor controller works in a very simple manner here. You have control of 3 pins A, B and Enable for each motor. Enable is hooked up to a PWM pin and will control the speed of the motors and whether they are on or off. Pins A and B will be set HIGH or LOW to determine the direction of the motor. For example, if A is HIGH and B is LOW you will move Counter Clockwise. Alternatively you can do a halt, which will drive the motor against itself it is moving by raising both A and B HIGH.

The problem is this state is not very good for the motor and does not actually lock the motor once it has stopped moving. To do a true halt A and B must be strobed between the Counter Clockwise state and the clockwise state. In the future models A will go direct and B will be the same pin as A and go through a NOT gate to reduce pin usage on the microcontroller. This also ensures that the halt state cannot be reached. Instead you should use a proper halt, which is more effective and better for the motors.

Optical Detectors

[[Image:BUILDSbot-12Ounce-1-SensorArray.jpg|thumb|right|250px|Sensor Array]]

On the bottom of 12 Ounce 3 Optical Detectors/Photo-transistors from Sparkfun were mounted. These are very cheap, noise reduced units which can easily tell white from black and do object detection. These detectors are pointed down and are intended for use as line followers. Since white and black react very differently when IR light is shined on them we can easily tell the difference between the two shades.

Thus if a basic line follower course is created (white background with black lines) 12 Ounce should very easily be able to navigate it with the 3 sensors. Two of the sensors are spaced towards the outer extremities of 12 Ounce while the third is set in the centre and a little bit back.

This should allow for simplified tracking of lines. If a line appears to the right sensor but none of the others we can deduce the direction we should move in. If we see a line under the central sensor we know we are likely on path, or maybe at a decision point if certain other circumstances exist. Using all of this information we should be able to follow lines and possibly navigate slightly more complicated courses, which include decision points.


[[Image:BUILDSbot-12Ounce-1-Bottom1.jpg|thumb|left|260px|Bottom mounting]]

[[Image:BUILDSbot-12Ounce-1-TopOn.jpg right thumb 200px Full 12 Ounce with its motion detector top on]]

The chassis is constructed out of a Motion Detection unit which was accidentally fried by me and a friend of mine. The flat back plate of the detector made up the base of the robot and a few holes were drilled into it. The holes function to: allow wires to be run from the motors and sensors to the microcontroller and motor controller; attach the motors to the chasis via zip ties; secure the ball roller with screws; and allow the line sensors to poke through the bottom of the chasis. The current mounting situation for the motors involves using zip ties to hold the motors in place. This is effective and deals perfectly with the forces at play; however, I am currently looking into a better solution (velcro, double sided tape, etc). The top of the motion detector is used as a cover for the robot for storage and eventually for when it is operating. The plan is to allow BUILDS members to decorate it and make it look nice and representative of BUILDS as it works its way around the course.

Code Overview

Currently go to [ Github] to grab the code.

Example Logic

This is some basic Psuedo-Code to get the point across of how a basic line follower might work. This code is not meant to work, some variables are missing as are the implementations of the functions. This code is subject to tons of changes, but demonstrates the simplest way of doing line detection, with no mapping.

The actual logic I used began to get more complex and is simply a list of states and not very elegant.

#define LEFT 0
#define MID 1
#define RIGHT 2
#define THRESHOLD 50

// ADC inputs are 10 bits long and unsigned.
uint16_t line_sensors[3];

// Implement some way to update sensors
void updateSensor(sensor);
void updateSensors();
void motor_speed(motor_pin, pwm_speed);

void main() {
	while(1) {
		// Fetch new data every loop

		// Basic algorithm only requires 2 sensors
		if (line_sensors[LEFT] > (line_sensors[RIGHT] + 20)) {
			// Then the line is to the left... move left
			motor_speed(left_motor, 100);
			motor_speed(right_motor, 250);
		} else if (line_sensor[RIGHT] > (line_sensors[LEFT] + 20)) {
			// Then the line is to the right... move right
			motor_speed(left_motor, 250);
			motor_speed(right_motor, 100);
		} else {
			// Keep going straight
			motor_speed(left_motor, 200);
			motor_speed(right_motor, 200);




  • [DONE] Milestone 1: Constructed and Moving === :

Video of the BUILDSbot doing some basic movements (pre-programmed)

All of 12 Ounces sensors have been properly tested and identified. 12 Ounce can also take very basic commands over serial.

Current “protocol” is

{| '''Character''' || '''Action''' |- | g || Start moving (in whatever specified direction) |- | s || Stop movement (not a halt, a soft stop) |- | l || Turn/Spin Left (in place) |- | r || Turn/Spin Right (in place) |- | f || Forward Direction |- |b || Backward Direction |}
  • [DONE] Milestone 2: Line Following in C++

12 Ounce should be able to follow a line without any problems at this point, even if the algorithm is sort of nasty looking. :

[ Video of 12 Ounce Line Following]


  • BUILDSbot lost Serial support in the move from Arduino to C++ (namely because I didn’t spend enough time on getting serial communications working.

[ACTIVE] Milestone 3: Create a cheap, simple and easy to reproduce kit and general development platform

Additional Specs for a 12 Ounce Robotics Platform

  • Wheels mountable to PCB Board.
  • 3-4 downward pointing Photo Transistors for detecting lines
  • Expansion ports for up to 2 extra servos
  • Shield like system
  • Break out extra I/O pins in some manner allowing for addition of new sensors (possible IR collision detection sensors or range finders, or cameras, or whatever).
  • USB bootloader programmable. (Arduino bootloader compatible, for those who like that nicety). Should also be mostly through-hole, possibly with an SMT MCU to combine the USB and MCU into one chip. Otherwise, use FTDI chip


  • Christopher Woodall
  • Anthony Inzero
  • Allan Wirth


Wireshark Workshop

buildscc | 13 Feb 2012 | | workshops, events

Monday Feb. 13, 2012 at 6:00pm in BUILDS


  1. Basics of Network Communication, quick explanation of common protocols.

  2. Intro to Wireshark UI, useful menu items

  3. Group-solving challenges from past network forensics competitions (DEFCON, NFPC)

  4. Questions, where to look for harder challenges.


  1. Challenges found at

  2. Wireshark can be downloaded from

Tweeting Typewriter

buildscc | 12 Feb 2012 | | projects


Christopher Woodall and Tom Nadovich found a semi functional typewriter being thrown out around campus. We have decided to fix it up to a semi functional condition and turn it into a tweeting typewriter.



  • Make typewriter semi functional

Parts List

  • Royal Jupiter 12 typewriter (current use)

Ideas For Getting Key Inputs

Using conductive tape, we can sense if the conductive levers for the keys are touching the tape or not. We would do this by grounding and filtering the metal contacts on the typewriter. Then connect the conductive tape to a uC pin and 5V through a 10k Resistor. This will give us a digital input of 0 when the key is unpressed and 1 when its been triggered. Detection time depends on how fast the machine moves the lever. If the body of the typewriter is connected to ground there should be limited potential for AC noise. Needs a series of multiplexers and possibly some other supporting electronics to make communication with such a multiplexer practical. Would use part of an 6-bit 64 input multiplexer. Could get complex and hard to deal with, but would be straightforward.

This other guys uses shift registers to pass a pulse through each key at a very rapid speed. When a key is pressed down and the shift register sends that contact high you will send the carriage high. Since you have a counter which can tell where the signal is/should be at any given point in time you can effectively find which key was pressed down using a bunch of shift registers and two uC pins.

USB Type Writer


Meeting Minutes for 2012-02-08

buildscc | 08 Feb 2012 | | meeting-minutes


Kyle Brogle

  • So, there was a career fair today, and we might get free pizza! Also, hello to all newcomers. General note, everyone should subscribe to the “BU Colloquim” list for awesome talks going on around campus. To those who received the doodle, the BUILDS wireshark workshop is set to be held this coming monday at 6pm.

Allan Wirth

  • Lan-Tunes
    • Everyone should thank allan for writing a new music server for BUILDS, found at HTTP:// (sorry gutenbach). This saturday (around 6pm) Allan will be going over his solutions/ the puzzles for the Mozilla CTF a few weeks ago.

John-Nicholas Furst

  • The minutes will be much more reliable (cough, cough) in the future.

Valerie Young

  • Musical Stairs
    • The stairs hackathon this past weekend was a great success! Thanks to all those involved. Further progress is blocking on the acquisition of more (working) parts, which should be arriving soon. The next meeting will be this coming sunday at 4pm.

Monica Gribouski

  • Multitouch Table
    • Next meeting will be this sunday (more sanding). We are also considering entering the Multitouch project in the Imagineering Competition.

Christopher Woodall

  • Soldering Workshop
    • The soldering workshop was a great success! People got experience soldering, and a second workshop is in the works so keep checking your email.

Anthony Inzero

  • BUILDS Bot
    • Progress is currently blocking on the acquisition of parts (for BUILDS Bots)

John-Nicholas Furst

  • just checking on the (in)active status” of certain projects:
    • Jeff / CNC DrawBot:
      • active, Project blocking on the acquisition of a NEW LASER. It’s been ordered, waiting on arrival.
    • George/ DerpNet:
      • inactive
    • Chris/ Conductive Paint:
      • Still active, need to mix the paint (and need time to do this)
    • Liam et al/ Video Game Collective:
      • temporarily inactive.
    • Rusty et al / Coil Gun:
      • inactive, Version 2 pending submission of write-up.

Danny Cooper

  • Document Camera
    • The Document Camera is blocking on having free time. Also, project “hack-a-tile.” If you have a cool project (like LEDs), you should mount them in the ceiling tile! cf: the FAN OF DAMOCLES.

John-Nicholas Furst

  • The dean of students has sent out a survey concerning Gender Neutral Housing, so you should check it out.

David House

  • Remember everyone, elections for officer positions will be held next month, around March 16th, as mandated in the meta-meeting. Check your email.

Monica Gribouski

  • NEW BUILDS T-SHIRTS. Contact monica if you have any (good) ideas.

Avery Gray

  • Still working on a music player. If you’re interested in tooling around with something like this, contact Avery.

Christopher Woodall

  • Maker Faire Cambridge
    • The mini-Maker Fair is coming up (this april). If we have any working/finished projects by then, we should submit them. We should also consider helping them start the event. An email will be sent out soon, so keep checking your email.

Foucault Pendulum

buildscc | 08 Feb 2012 | | projects


This is a joint BUILDS - PHOTON project. BUILDS is working on a small scale model for PHOTON to take and work with BU to have a large scale model installed in a building on campus (SCI?).


If you want to join this project, email John-Nicholas Furst

Background Research

Build an Accurate Foucault Pendulum: [1]


After a consultation with PHOTON BUILDS engineers discussed with PHOTON that they would need approval from structural engineers, BU Facilties, and Boston Building Modifications Board.

Coding Bee

buildscc | 08 Feb 2012 | | events

Allan and George are planning a coding bee! Here are the rules:

Allowed Symbols

( {left,open} {paren,parenthesis} ) {right,close} {paren,parenthesis} [ {left,open} {bracket,square bracket} ] {right,close} {bracket,square bracket} { {left,open} {brace,curly {bracket,brace}, squiggly {bracket,brace}} } {right,close} {brace,curly {bracket,brace}, squiggly {bracket,brace}} < {bra,less than,{left,open} {waka,angle{ bracket,}},langle} > {ket,greater than,{right,close} {waka,angle{ bracket,}},rangle} ! {exclamation mark,bang,shriek,factorial,wow} @ {at{, symbol},strudel} # {hash,pound{, sign},number sign,crunch,sharp,{octo}thorpe,tic-tac-toe} $ dollar{, sign} % {percent,percentage}{, mark} ^ {hat,carat,circumflex} & {and,ampersand,pretzel} * {star,asterisk} ` {backtick,grave,backquote} ~ {tilde,twiddle,wiggle,squiggle} - {minus,hyphen,dash} _ {underline,underscore} + {plus,add} = {equals,equal to} | {bar,pipe} \ backslash / {forward ,}slash ? {question mark,surprise noodle} ; semicolon : colon ' {apostrophe,single quote} " {double ,}quote . {period,dot,point} , comma Enter: like hitting the 'enter' key on any sane system Tab: puts a 'tab' symbol [no automatic indentation] Space: hit the spacebar Backspace: Hit the fucking backspace key. Don't use the arrow keys. No editor-specific key bindings. Please explicitly state capital letters (e.g. "capital A") You may use the capslock key. We will not help you if you have forgotten if it is on. Allowed alternatives to standard American letter names: Z may be 'zed' H may be 'haich'


  • Python [the classic] ** Tabs are recommended. ** You are given a prototype. e.g.
      def fib (a):

** Python 2.6 or 2.7 ** No imports

  • Haskell** Please use spaces. **

You will be given the type and name of the function. e.g.

	fib :: Int -> Int

** GHC 6 or 7, with no extensions enabled. Haskell 98 is acceptable.

  • C ** You will be given a function prototype. Please complete it. e.g.
	int fib (int a);

** GCC version 4.x, with no flags. **

No imports; you may use anything in libc. (Including GNU extensions)

  • PHP ** you will be given a function prototype. e.g.
	function fib(a) {

** PHP Version 5 ** Restrictions?

  • Perl ** you will be given a subroutine name and the arguments it must take. e.g.
	sub fib {

** Perl 5 ** No use statements. Restrictions?


The prize will be a ceiling tile with your gorgeous face on it created by our very own - Monica Gribouski.



  • Factorial
  • Power [integer powers] {no cheating}
  • Fibonacci
  • Quadratic Formula
  • endswith:
  • GCD


  • Check paren matching
  • Substring given index and length
  • Check primality
  • Fizzbuzz
  • Binary search
  • Decide substring:
  • Remove duplicates from a list
  • Given a byte, output its bits. [most-significant first]
  • Search


  • Sort a list in maximum O(n^2) time
  • Sort a list in average {n log n} time
  • Output primes
  • Print/list all factors of a natural number
  • All contiguous substrings
  • Square roots of integers, round down.
  • Reverse a list/string
  • Capitalize
  • atoi
  • Intersection of two sorted lists
  • parse csv?

=== Impossible ===

  • RSA [just for Kyle]
  • Give all permutations of a list [list does not contain duplicates]
  • // Give all permutations of a list without repetition [oh god way too hard]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25