3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

The PrintBot

Step 4The Microcontroller

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.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
4
Followers
1
Author:TeamEasyEnough