Showing posts with label laser cutter. Show all posts
Showing posts with label laser cutter. Show all posts

Wednesday, June 4, 2014

Robot Dot Printer

Hello all,

Well, the end of my sophomore year has finished, and with it, half of my college career...hopefully. At the tail end of every semester, design classes kick into high gear and students produce some extraordinary results. For the end of our electronics design lab, my partner and I decided to create a robot dot printer. For those who haven't seen our robot before, here he is, Geoff, with a face lift.

Figure 1: Geoff with his printer face.
Introduction
”Theoretically, this should work” was probably the most commonly used phrase in our final project days. The goal of our final project was to create a robot that is able to print discrete images using sharpies actuated by servo motors. To complete this goal, we had to construct a printer assembly that would be placed on the rear of our robot, and developed code for the Arduino to drive servos with pulse width modulation such that sharpies moved in a linear path.
Figure 2: Block diagram of our system.
We also had the idea to use a Sparkfun manufactured PWM shield (Fig. 3a)that had the ability to
drive the 8 servo motors. Unfortunately, luck was not on our side, because the board had a faulty powerpage3image1256
management system. To sidestep this issue, we settled for only using 6 servos, which was the maximum the arduino could provide. 

Design of Printer Assembly
Next, something that actually worked! Originally we had planned on using solenoids to actuate the Sharpies. After connection between the solenoids and markers became a dubious prospect at best, we opted for a more accurate, and more Arduino friendly method of actuation, the humble sub-micro servo. The servos allowed us to use PWM to accurately push and pull the Sharpies.
The first issue we ran across was constructing servo horns to connect servo and Sharpie. Using a laser cutter and some 1/8” acrylic, we were able to manufacture horns that fit our application wonderfully. A slot was cut along the length of the arm which allowed the Sharpie to side back and forth on its vertical path. This movement minimized the torque on the servo motors.
Figure 3: Printer Assembly. Due to the buggy nature of the PWM shield, we decided to remove the outside servo assemblies in favor of using the built-in PWM outputs of the Arduino. 

Figure 4: Connection between Sharpie and servo.
Figure 5: Printer assembly. By laser cutting the printer assembly, the servos were able to be press fit into the holes 
without any screws. This accuracy was accomplished through many iterations. 

PWM Servo Control
Servos are controlled by pulse width modulation. Different pulse widths are associated with different positions, shown in Fig. 6. In our robot, we use three positions: Storage (fully up), Set (down but not touching), and Print (down and touching). We ran across issues with power regulation when we tried to drive all 8 servos from PWM shield, so we defaulted to using the six PWM pins available on the Arduino. However, eight PWM outputs were required to control the six servos and two robot wheels. Two additional PWM outputs were made by manipulating Arduino digital output pins with strategic timer interrupts. This created a PWM signal suitable to be a voltage reference to the robot motor controller. 


Figure 6:
Explanation of pulse width modulation with servos. 

In order to print designs, servos would have to be in specific positions at specific times. The process of printing would be to 1) Push Sharpies down, 2) Move forward, 3) Change positions of Sharpies, 4) Repeat. Using a linked list method explained graphically in Fig. 7.
Figure 7: 
This diagram explains the basics of linked lists. A data structure was created print col that contained a list of values, 0 or 1, and a pointer, or link, to the next print col. At the start, the servos are given the list at the first print col. The dots indicate that the servos are in the up position. After all servos are positioned according to the current list, the robot moves forward an increment, then changes the position of Sharpies to the list in print col 2. This process is repeated until the print sequence is completed. 
Results
In order to have an operational robot dot printer, the Sharpies had to be properly calibrated. Calibration was as simple as manipulating the servo horns on the servo head such that the tip to be of the ground when the servo was in a high position, and on the ground in the low position. The results of a simple pattern print is shown in Fig. 8.
Figure 8: Results of  a simple pattern test.
-John "I've been in bed for a month because my face is broken" Dunn

Wednesday, February 5, 2014

Optical Encoder

My most recent project was spurred from a lecture in my electronics design lab class. The goal of the class is to create a autonomous robot that preforms a unique function.  The robot consists of two driving wheels and a castor stabilizer wheel in the rear. Autonomy would be a relatively simple task for a micro controller. But there's a catch, in this class we must construct our own circuitry from the ground up. A type of component we are given are optical encoders, one for each wheel, which are used for speed and distance calculations.



Simply put, an optical encoder is a device that converts the angular position or motion of a shaft or axle to digital code. As shown in the figure below, a light source is shone through a rotating disk with a code track. If the disk is in a position such that the light source can shine through a code track hole, the photodetector puts out a high or low voltage, depending on the circuit.
http://zone.ni.com/cms/images/devzone/tut/b/82f98d1a421.gif
As the disk revolves, we start to see a square wave form. Note that a 50% duty cycle waveform, or a waveform that is on for 50% of the time, is produced only when the the code track has evenly spaced holes of equal parts hole and blocking material.


This sort of device seemed simple enough to replicate, so a week after that lecture, I sat down with some cardboard, a DC hobby motor, a bright red LED, and a photoresistor, to see what I could come up with.

As a prototype, I created a very basic cardboard box and disc. After connecting the disk to a DC hobby motor and running at high RPM, I foresaw an issue. Due to the inaccuracy of cutting with scissors, the center of mass of the disk was not at the axle. This resulted in a very unstable spin. Complications also occurred when testing the bright red LED and photoresistor.  When I flashed the LED at the photoresistor and probed the output, the flash was indistinguishable from the ambient light in my dorm room. At least, it wasn't giving me the nice square wave I was looking for.


The solution was to use an infrared emitter and receiver pair. To mediate the center of mass problem of the disk, I choose to construct a box and disk using a laser cutter, which is far more accurate than scissors.


Once constructed, the laser cut disk and IR emitter/reciever system worked beautifully, producing the pulse wave I was looking for. In my finished encoder, I only used four holes approximately 5mm wide at 0, 90,180, and 270 degrees. This produced a 90% duty cycle.


While this project was simple enough, it took a bit of time to work out some of the kinks. The end product was worth the effort, and I can now make calculations to determine the angular speed, frequency, and inertia of the disk. At least to me, this is quite exciting.



If you have any suggestions on how I might improve this design, please fell free to comment below!

Also, there are reasons we have web-controlled power supplies. One of those reasons is attached below.




-John "I was scared for my life filming this" Dunn