Using the robot for the base allows the robot to print a virtually unlimited size. Think football feilds or basketball courts. Maybe the rivals should be on the lookout for a swarm of these thanksgiving weekend next year. the robot also allows the printer mobility, allowing it to travel to a location to print, then move on to another. Wireless is included, so remote control is also possible. Sidewalk art and advertising is also a target-market for this device.
Step 1: IRobot Create
For our simple use we only required a few commands. Upon initialization the 128 command must be sent to tell the robot to start accepting external control. Next a mode must be selected. For full control we send the 132 command to the Create. Note you must send all data to the Create as integers, not regular ascii text. Each command opcode is one byte, the value of that byte is the integer value 128 or whatever. If you were to transmit in ascii or ansi text, each character in 128 would be a byte. For testing or control via PC we recommend Realterm as it makes everything very simiple. You will also need to set the Baud rate to 57600 as stated in the Open Interface documentation.
Now that the Create is initialized, we use the 137 command to drive the robot forward. Wait Distance, 156 is used to stop the robot after a specified distance. The script commands 152 and 153 put everything together and make a simple script which can be run over and over.
iRobot sells what they call the Command Module which is basically a programmable micro controller and a few serial ports which you may use to control your Create. Instead we used a Cypress Programmable System-on-a-Chip (PSoC) combined with a very small x86 PC called the eBox 2300.
The robot has an 18V battery which we will use to power all our peripherals.
Step 2: Printer Disassembly and Motor Control
After everything is disassembled, we must figure out how to drive this motor. Since we tore everything apart before testing anything, we needed to find the proper voltage to supply the motor. You can try to find the motor's specs online if you can find a model number, but lacking that, hook it up to a DC power supply and slowly increase the voltage to the motor. We were lucky and found our motor could run on 12-42V, but to be sure we tested it manually as described. We quickly discovered even at 12V the motor will be running way too fast. The solution here is to use Pulse-Width-Modulation (PWM). Basically this turns the motor on and off very quickly to spin the motor at a slower speed.
Our battery supplies 18V so to make life easy we will run the motor off the same. When using DC motors that must reverse in circuits you will experience a large back-current in your circuit when reversing the motor. Essentially your motor acts as a generator while it is stopping and reversing. To protect your controller from this you can use what is called an H-Bridge. This is essentially 4-transistors arragnged in an H-shape. We used a product from Acroname. Make sure the driver you choose can handle the current needed for your motor. Our motor was rated for 1A continuous, so the 3A controller was plenty of head room. This board also allows us to control the direction of the motor simply by driving an input high or low as well as brakeing (stopping the motor and holding it in position) the motor in the same way.
Step 3: The Print Head
Since this motor must only be controlled on or off, a H-bridge was not necessary here. Instead we used a simple transistor in series with the ground connection of the motor. The gate of the transistor was controlled by a digital output from our micro controller the same as the digital inputs the H-bridge.
The small PCB next to the DC motor is a infrared black and white sensor. This board simply outputs a digital high or low signal when the sensor sees black or white respectively. Combined with the black and white encoder strip allows us to know the position of the print head at all times by counting black to white transitions.
Step 4: The Microcontroller
The development board also has a integrated proto-board which allowed easy mounting of our motor controllers.
The code on the PSoC brings everything together. It waits to receive a serial command. This is formatted as a single line of 0 and 1s that indicate to print or not for each pixel. The code then loops through each pixel, starting the drive motor. A edge-sensitive interrupt on the input from the black/white sensor triggers an evaluation of weather or not to print at each pixel. If a pixel is on, the brake output is driven high a timer is started. An interrupt on the timer waits for .5 seconds then drives the dispenser output high, causing the transistor to turn on and the drill bit to spin, the timer counter is reset. After another half second, an interrupt triggers the motor to stop and the drive motor to move again. When the condition to print is false, simply nothing happens until the encoder reads another black to white edge. This allows the head to move smoothly until it needs to stop to print.
When the end of a line is reached ("\r\n") a "\n" is sent on the serial port to indicate to the PC it is ready for a new line. The direction control on the H-bridge is also reversed. The Create is sent the signal to move forward 5mm. This is done via another digital output connected to a digital input on the Create's DSub25 connector. Both devices use standard 5V TTL logic, so a full serial interface is unnecessary.
Step 5: The PC
Using the eBox could allow many further developments. A web server could allow images to be uploaded remotely via integrated wireless. Remote control could be implemented, among many other things. Futher image processing, possibly even a proper print driver could be created to allow the device to print from applications such as notepad.
One last thing we almost missed was power. The Create supplies 18V. But most of our devices run on 5V. A Texas Instruments DC-DC power supply was used to actively convert the voltage without wasting the power to heat, thus prolonging battery life. We were able to realize over an hour of printing time. A custom circuit board made the mounting of this device and required resistors and capacitors easy.
Step 6: That's it
Big thanks to the PosterBot and all the other iRobot Create Instructables for their inspiration and guidance.