Introduction: The PrintBot
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
The iRobot Create is very similar to iRobot's Roomba, but without the internal vacuum. This allows us to add a greater payload and gives us convenient mounting holes. iRobot also provides a complete programming interface to the Create that makes controlling the robot very simple. The interface is a simple set of commands and parameters sent to the robot serially. Read the Open Interface specifications for more info.
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
We used an old Epson ink-jet printer for the horizontal motion of the printer and the print head mount assembly. First thing to do here was to carefully disassemble the printer. This required removing all non-essential components until all that was left was the track assembly, the motor, the print head holder and the drive belt. Be careful not to break this belt or its driving motor. It may also be cleaver to poke around with a volt-meter before you tear out all the power boards, but we were a little too excited for that. Note you don't need any of the page feed assembly, the actual print heads or cartridges, or any circuit boards.
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
As much of the original print head assembly that could be was removed. We were left with a plastic box which made it easy to attach our print head. A small 5V DC motor was attached with a drill bit. The bit was chosen to have as close to the same diameter as a funnel as possible. This will allow the drill to fill the entire outlet of the funnel. When the bit spins, powder enters the grooves and rotates down the bit towards the exit. By rotating the bit one rotation we could create a constantly sized pixel. Careful tuning will be required to make everything fit just right. Initially we had problems with the powder simply spraying all over the place, but by adding a second funnel and raising the drill bit, the longer fall while constrained to the funnel made a clean pixel.
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 Cypress PSoC integrates all the seperate peices of hardware. A Cypress development board provided an easy interface for working with the PSoC and connecting peripherals. The PSoC is a programmable chip so we can actually create physical hardware in the chip like an FPGA. Cypress PSoC Designer has pre-made modules for common components such as PWM generators, digital inputs and outputs, and serial RS-232 com ports.
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
To create a fully independent device, a small x86 PC was used called the eBox 2300. For maximum flexibility a custom build of Windows CE Embedded was installed on the eBox. An application was developed in C to read an 8-bit gray-scale bitmap from a USB drive. The application then re-sampled the image and then output it one line at a time to the PSoC via serial com port.
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.
We have a be nice policy.
Please be positive and constructive.