Electronics & Maker Projects (page 6)


I watched the videos of robotic arms that write the time at the top of a dry-erase board on youtube. Very creative! I knew my next project would have to be a robot that could write. Since I’m really into cars, what better approach than a car-like robot that writes on paper as it travels? This project is about 50% 3D-Printing/Mechanical and about 50% Electronics/Software, but I decided to put it here with my other 3D projects.


My basic concept is that the X-axis pen motion will be the vehicle moving forward or backward. The Y-axis travel will be provided by a linear servo motor. The Z-axis is the pen height, driven by the small blue servo motor through the 3D printed arm with a clevis at each end: Down = tip touching the paper to write, Up = tip lifted slightly from the paper, Lift = pen lifted into a park position which allows room for the pen cap to be put back on.




I began development by shopping for a stepper motor with dual shafts. Given that, I could just put wheels directly on the shafts and take advantage of the fact that I only want the robot to go forward and backward, as straight as possible.  I based it all on the geometry of a 32 x 32 line-segment character font, with the X-axis figure inclusive of the space between characters.


I calculated the wheel diameter to make each of the 1.8˚ steps draw a very short line in the X-axis, 1/32 of the allowed character width. The wheel diameter in turn established the limit on the stepper motor size, which led me to the NEMA11 form factor. With a 1.1” square stepper motor mounted directly to .062” fiberglass sheet, using the target wheel size, there would still be (a very small amount of) ground clearance.





The next step was to find model car wheels close to the size I needed. I finally found some on ebay from China. They took a very long time to get here, and when they arrived the plastic wheels had such a small center hole with thin spokes coming out of it that it was useless. However, the “tires”, which were thin rubber elements, were removable and the perfect size.


So, I designed new wheels of the correct size and added an 8-hole pattern for aesthetics. Let me note here that these wheels are at the “front” of the robot. There are very small purchased wheels at the “rear” where the printing action happens. They reside on an axel made from a short length of brass welding rod that I threaded to 4-40 on each end. The axel goes through 2 small angle brackets screwed to the rear platform.


I printed the wheels with a very beefy center section and a D-shaped center hole to match the shafts. I actually hammered them onto the shaft, being careful that all the energy went to the wheel and shaft, not to the motor’s bearings, etc.


With the wheels mated to the shaft, I stretched the “tires” over them and it worked out great!


I ordered a stepper motor driver board assembly which is used a lot in the hobbyist community called the “EasyDriver”. I could have easily incorporated a driver into my final PCB design, but with this bd. I could experiment with the stepper immediately. Not only that, the bd. costs a fraction of what the parts alone would cost.


This is a good time to describe InkBot’s overall structure. The whole unit is about 9” long and 3” wide. I used 2 small sheets of .062” fiberglass, essentially PCB material with no copper. These are cut in patterns to create a front & rear “frame”, essentially platforms to build on. In the composite CAD drawings shown here, these  platforms are in dark green.


All other elements in the drawings are 3D parts I designed and printed. There are a total of 13 printed parts counting both wheels & both stepper brackets (i.e. 11 designs). Some seem to be located in space because the other parts (Y-servo, Z-servo, stepper motor, tires, PCB, battery holder, stepper driver PCB assy, Bluetooth module, switch, hardware) are not present.


The stepper motor / wheels assembly is attached to the front platform with two 3D printed “brackets”. These bracket surround 3 sides of the motor and have feet which are screwed to the platform. This creates a very solid mount for the relatively heavy stepper. Also, it couples all the torque of the motor to the chassis.


Since the stepper driver bd. only has two asymmetrical mounting holes, I designed a mounting base for it with integral standoffs and tabs with 4 mounting holes. This allowed me to attach it to the top of the stepper brackets with sheet metal screws.


That takes care of the front section. The central area is one 3D structure (see photo of raw print) that ties together the following (from the bottom up): the front platform, a small alcove which sandwiches in the power switch, then the most forward area of the rear platform. On top of that is a large void where the battery pack (black box with red & black wires coming out of it) resides. Above that goes InkBot’s custom PCB, which is mounted to the top of the 4 pillars of the central structure with sheet metal screws.


At the front of the rear section we first encounter the small blue Z-servo motor, held up at just the right height by a kind of “tower” bracket. You can see it’s yellow / orange / brown wiring pigtail exiting the servo’s rear.


The Z-servo’s output “horn” (lever which comes with servos that transmits the motion energy) is attached to a 3D printed “arm”. This arm has a clevis at each end. When the servo’s output shaft turns, the horn goes through an arc. This pushes or pulls the arm which in turn raises or lowers the Y-servo and it’s custom “carriage” located at the very rear of InkBot.


The carriage was necessary to provide a pivot point at the bottom of the assembly so the Y-servo and therefore the pen can be raised and lowered. Those pivot points are actually the head of a fillister screw sitting in a drilled-out hole of a small angle bracket on each side.


On the other side of the rear platform a small 3D printed bracket which holds a 4-way female .1” Molex connector facing up. This is for the purchased Bluetooth module, which has a right angle male connector so it can just plug into InkBot, leaving it’s antenna end up high.


At the very rear is the pen holder which moves along the length of travel of the linear Y-servo, approx. .65” of travel / character height. The pen holder is split to allow inserting the pen and adjusting it the to exact height so that it just touches the paper in the Down position. When adjusted, the small screw is tightened to clamp it in place.







Electronics / Software


I did the initial development using the PCB I designed for my cat food dispenser project, populated only with what I needed to control the servos and stepper. The MC9S08QE128CLH µC I used has many timer peripherals with pulse width modulator capabilities. This made generating the servo control signals easy and provided great resolution.


I wrote the firmware in stages. Initially just testing the hardware then starting on overall structure. There were many experiments with Z-servo positioning vs. bracket height vs. arm length. I also had to come up with a motion control descriptor protocol so that I could efficiently encode character generator table entries.


When it looked like I had everything covered, I did a completely new PCB layout just for InkBot. This allowed me to line up the connectors so that the wiring harnesses could head off in the proper direction. No splicing is needed in the chassis wiring as the PCB connectors are one-to-one with the servos, stepper driver, Bluetooth, switch & battery pack.


One of the goals was to have Bluetooth. Using a cellphone with a simple Bluetooth ASCII terminal app, I can send commands to InkBot. The most important command says what to print. I also have commands to put any servo in any position, beep, send a “ready” text response and move forward or backward by a certain number of steps. Most of these were used for development. If you watch the video, you’ll see the bottom “COMM” LED flash blue just before InkBot starts to print. I use this LED to indicate Bluetooth communications, and that flash is the reception of the command telling it what to print. The green LED is “STATUS”, and it always flashes but at different rates. Slow when in Standby / Lo power state or fast when in active / printing state. The top LED is red for “POWER”.


It was a really enjoyable project, where I got to brush up on my servo and stepper control development. Linda says InkBot displays it’s own personality as it moves & writes.


Update: The July 2016 edition of “Design News” (and on their website) featured InkBot in their “Gadget Freak” section. See the “Electronics - Published Magazine Articles & Early Electronic Projects” section of our website.