All posts by lesterchall

Electronics Assembly and Test Begins on Hot Rod ROBO

The first permanent circuit board for my Hot Rod ROBO
The first permanent circuit board for my Hot Rod ROBO

Above you see the first circuit board assembly – actually a power LED was added at the top, some heat sinks were put on the transistors, and and of course the connectors added.  Then I installed the board using this tough-as-nails velcro that my brother gave me.  He got it from a truckstop so you know it’s a rugged product, unlike conventional “thin” velcro (this stuff is thick).  So anyway, I mounted the board, connected everything and had to solve two problems.

The first problem turned out to be a faulty LED.  This could have been from over soldering or from a manufacturing defect – no problem i bought a bag of 100 Red High Brightness LEDs for this project so there are plenty of spares.  This was an unusual case of the fault indicator reaching back into the system and actually causing a fault!  Go figure!

The other issue was a conceptual one on my part, I had just hooked the audio up to the input pin on the processor without doing any signal conditioning at all.  duh!  It need to be biased at least and preferably run through a comparator or opamp with sufficient gain to cause even very low duty cycle and high duty cycle waveforms to be detected.  Adding the signal conditioning on a breadboard temporarily caused the system to operate properly.  This was useful debugging because it reminded me that I must do signal conditioning on the star board.


Distributed Solution Simplifies Hot Rod ROBO

I took yesterday off of the Hot Rodding mission because I needed a break from it.  Too much of even a great thing can be a bit overwhelming and cause loss of interest which would kill the project so I rested.  In the morning during the wee hours, I sat by the ROBO and stared at all the wires that I had pulled out and that were dangling all over the place.  Surely there must be some way to simplify this.  Here is a repeat of the photo that shows the wires:

Reduced to it's base and guts, the ROBO is ready for customization!
Reduced to it’s base and guts, the ROBO is ready for customization!

Now that is one tangled mess of wires, or more specifically an untangled mess of wires.  I like to think that my best ideas are supernatural in nature, the evidence for this being that they really are “light bulb” moments, or epiphanies, not some gradually well thought out evolution of an idea.  Be that true or not, this was a bright spark of an idea – I imagined putting a small circuit board on each of the five steppers.  Now that I have a better (but not fully complete) feel for exactly how much circuitry is required at each stepper (heaters are a bit fuzzy but clearing up), I can imagine putting the circuitry for each stepper on the stepper itself.

If I also put the linear regulators, which will be LM317T’s (adjustable positive linear regulators in TO-220 packages), on those stepper boards then I need only run power and control – just three wires – to each stepper.  For the extruder and the heated bed steppers, a second board on standoffs can do the job of running those circuits.  This then becomes a distributed circuit rather than a centralized circuit.  The nature of the system is such that a centralized approach is less desirable because of all the wires.

Let’s look at the most complex part of the system as far as wires are concerned, the extruder carriage.  It has two wires each for two fans (4 wires so far), two for the heater and two for the thermistor (total now 8 wires), four for the stepper in a bulky insulated cable sheath (12 wires total), and i think that’s all, so yeah 12 wires to that thing and some of them larger wires too.  No wonder the ROBO designers used a big snake of a cable to the extruder carriage.  This cable snake caused issues for me when I tried to use the full height of the ROBO and the snake caught on the exposed ends of the Z riser rods, causing the machine to go kachunka-kachunka in a scarily violent manner until I managed to panic and hit the power switch.  This happened twice and I realized that I could not use the full height of the printer on my particular shipped device.  With only three braided wires, this problem is reduced or eliminated.

The rest of today’s efforts on the ROBO hot rodding project will be spent on putting in a jameco order.  Jamaica is a good low cost supplier to hobbyists and they have all that I need or most of it, so one stop shopping is the winner here.  See you next blog entry, and I hope you enjoy the ideas.


ROBO Teardown

Reduced to it's base and guts, the ROBO is ready for customization!
Reduced to it’s base and guts, the ROBO is ready for customization!

With some help from my friend Harold I have now stripped down the ROBO to it’s bare essence.  Gone are the Arduino and RAMPS board, the power supply, and the rat’s nest of cable tied wires underneath.  All the wires are now brought to the top where they will go up to the location of the circuit board.  I’ll make a custom circuit board complete with simple, elegant, and powerful circuits like a linear power supply and the custom stepper and heater controllers all based on the humble and affordable ATtiny85 8-pin processor (with Arduino programming).  At this point I’m interested in running the wires to the top where breadboarded circuits will drive the system.  Oh, video on this is here:

Harold says “It’ll never work again”, half joking and half serious – I say otherwise.  What do you think?


Guts of my Hot Rodded 3D Printer

After two or three days of effort, I’ve finally got the guts of the design figured out.  DTMF turned out to be too difficult to decode for me, so I dreamed up an alternative solution that’s a whole lot easier to work with.  That’s because it only has one signal transmitted at a time rather than the two sinusoids of DTMF.  Anyway, I’m doing channel (stepper or heater) selection with frequency modulation and the command of what the setting is with pulse width modulation.

So for example to select the X axis motor I send out a 100 Hz tone.  The firmware on the ATtiny85 chip for that channel measures the positive and negative pulse widths and adds them together to get the period of the signal.  If that period is in a range of 10 ms +/- 0.5 ms then the chip sets a new position command value that is equal to the positive pulse width minus the negative pulse width.  By setting each step of the stepper motor to 10 us we get enough resolution and range to move the extruder head a range of +/- 500 steps, which oaths printer is the full bed width.

So in other words we send a little beep specially designed to tell the chip where to put the stepper motor and the chip dutifully generates the control signals to accomplish that result.  Once the correct position is reached the chip just stops the motor and waits for another command.  See the following video for a filmed explanation of what you’ve just read:

one channel's worth of printer guts plus input and power circuitry.
one channel’s worth of printer guts plus input and power circuitry.

This image shows the breadboarded stepper driver complete with USB power input, power indicator LED (in white), and audio input circuitry.  The tip channel of the audio is monitored only.  The source code for the controller chip is located at this PasteBin link:  Also here is the PasteBin link for the ChucK source code that is generating the commands to move the extruder left and right along the X-Axis:

The more I work on this project the more do-able it seems to be.  After all, this printer has five steppers, four limit switches, and two heaters (each with a companion thermistor) – and that’s it!  There’s really very little to the system’s parts.  I’ve got a control system that runs the steppers off of USB power and audio input, the heaters will require a separate power supply, and the limit switches can just reset the control chips via pulses sent to the reset pins (a la one-shot).

One friend asked how long I thought it would take to accomplish the results and I thought about it a moment then replied:  one week to get a crude formless extrusion out and another week to generate at least one useful print.  Then of course once the printer is all put together and working there will be a teardown to chop, build, Bondo, and paint those beautiful white racing stripes on that candy apple red paint!  Ah, what a clean machine she will be!


Hot Rodding My 3D Printer

Last night I made a small amount of progress.  I wrote a DTMF encoder in the ChucK programming language, which is located in this Pastebin page for anyone to view:  The program works using OSC, or Open Sound Control which is a music communications protocol that works over the internet and replaces or was intended to replace MIDI.  It never did that but it did get picked up as an excellent way to send small, rapidly repeating pieces of info across the web.

In this case I have purchased an iPhone program called GyrOSC which sends all of the iPhone’s sensor data (or the subset that you specify) to a remote machine, in this case my local Mac.  GyrOSC also has a button console with buttons 1 thru 9.  Every time i press a button, GyrOSC sends an OSC message to my Mac which routes it to the ChucK program that I wrote.  This program then generates a DTMV signal on the audio system.

I have an audio jack going to a breadboard that is all set up with a chip programmed to decode the DTMF signal and light an LED when the signal for a particular button is recognized.  See the photo nearby to view the hardware.  BreadBoard with DTMF Decoder

And here is a shot of me holding up GyrOSC’s button screen on my iPhone.

GyrOSC running on my iPhone, a convenient DTMF dialer.

Now as you might expect, writing a DTMF decoder in Arduino language and getting it to work on a chip with no input signal conditioning kind of um um um didn’t work at first, and I got tired and caught some zZzZzZzZz’s before breakfast in the morning.  I did get the bright idea, just before zoning out to sleep, to code up the DTMF decoder in the ChucK programming language (same as the DTMF encoder) because then I can debug the algorithm using print statements and error messages – I don’t have that luxury with the ATtiny85.

Then when the algorithm from Wikipedia is working in ChucK, it will be an easier task to transfer it into the chip.  Also I need to either reduce the volume or do some signal conditioning on the input side because an audio jack carries a 10V peak to peak signal, and the rebiased (hey, at least i rebiased it) signal has an ADC range of only 5V peak to peak.

Well that’s it for now.  I have lunch soon and after that I’ll be doing more work on the project which I will then blog for anyone following this.  I hope you at least find this project entertaining to read and enjoy the photos, videos, and PasteBin code.  I am getting a kick out of writing it, so let’s continue shall we?




Show Quality Hot Rod 3D Printer

I guess it’s a natural evolution in the 3D printing world that the mess of wires and rods and motors and gears that make up a 3D printer would eventually give way to a sleek, elegant look similar to that of the custom car world.  Today there are a few commercial printers designed to be stylish and some are really quite nice in appearance, however the DIY community has done little to customize these futuristic machines of magical capability.

Take a look at this image of my stock ROBO 3D R1 printer with it’s sewing-machine like cowling and black accent stripes.  Those stripes… it was the stripes that made me think of car paint.  If I were to fix up my ROBO, I’d paint it candy apple red with white racing stripes!  Yeah, that’s the ticket.  Next thing you know I’d dreamed up a custom hand-wired linear power supply complete with toroidal transformer and open wire construction, a totally new way of driving the machine from mp3 files, and some chrome plating to reflect the custom LED light show – wow what a ROBO that would be!  And what a run-on sentence too!

ROBO Printer
Stock ROBO 3D R1 Printer on Custom Made Cart

All that daydreaming and imagineering led me to take a really good look a the rat’s nest of wires underneath the machine with all it’s overheating and sparking problems, the noisy switching power supply, and that tease of an SD card reader that never worked.  Ugh, what a mess!  I decided to replace everything but the mechanicals and motors.  See the underside image and look but don’t stare at the ugliness of it all.  OK, I exaggerate but really it’s not pretty underneath an early adopter ROBO printer.  I decided to change this.


Enter my audio driver concept.  Before I had a 3D printer, I was eager to experiment with something of the sort so I decided to build a 3D printed stepper motor with custom controller.  Normally you drive a stepper with a little stepper driver board that costs around $10 to $20 each, and you need four of them for the ROBO’s five steppers (the two Z-motors operate in concert).  Then you plug these four mini boards into a RAMPS board containing electronics driver circuitry and you plug the RAMPS board into an Arduino processor board.  USB connects to the Arduino from the computer and the computer feeds commands to the Arduino to make the printed object.  That’s another run-on sentence that tells you the overall structure of the printer’s operation in a nutshell.  My concept is totally different.

One chip I absolutely adore is the ATtiny85 processor.  It’s like a teeny little Arduino in an 8 pin package that offers five pins of I/O that are free to use however you like.  The pins offer digital I/O, analog input, and PWM output though not every pin does every function so you have to study the thing to know how to make best use of it.  Well, long story short I came up with a way to control a 3D printed stepper motor with four power transistors and one ATtiny85 chip.  That’s only three dollars or so of parts and you can program the processor to do anything you want.  What I did was make it audio responsive.  I had the computer send out what sounded like musical tones that controlled the stepper.  With such an approach it might be possible to drive the printer from an mp3 file instead of the complex G-code files in use conventionally.

Fast forward to today and I’ve decided to blog it up and record my adventure into Hot Rodding the ROBO 3D R1 printer!  See the photo nearby for a view of the stripped-down ROBO ready for experimentation.  The first order of business will be to control the X-motor with an audio signal using the custom ATtiny85 chip and some power transistors.  So I unwrapped the wire guide that held the limit switches in place and unplugged the X-axis stepper motor cable, bringing it out to the front of the ROBO where it can be connected to a circuit board, as shown in the photo.

With the case off we can see the rods, carriage, limit switches and wires, bed, two of the five steppes, and base.
With the case off we can see the rods, carriage, limit switches and wires, bed, two of the five steppes, and base.

Next thing to do was to look up the stepper motors and see how to control the signals. I did make a video of the plastic stepper motor driver in action here: and these illustrations describe how the stepper motor is to be driven:



OK I was able to program an Arduino Uno R3 board to drive a stepper motor at 5Volts.  The circuit has eight transistors (four NPN and four PNP), eight resistors (one for each transistor input), and four LEDs (one per coil side).  It uses eight pins of the Arduino board because I wanted full control of each transistor for experimentation purposes and the possibility of using half steps.  You can see a video of the result in action:

As mentioned in the video, I have used the Arduino Uno R3 board with the Makershed breadboard shield for experimentation and testing, however I feel that it will be even lower cost and less work to do the job with some ATtiny85 Arduino chips, each of which can control two stepper motors.  I will use DTMF encoding as a simple way to control the printer instead of g-code.

The use of DTMF to control the printer opens up many possibilities.  DTMF tone sequences can be stored in mp3 or other format music files, so to run a print all you need is a music player.  Also DTMF tones can be sent via telephone all over the world so printers can be run remotely or prints effectively faxed from one location to another without the need for special equipment.

The DTMF standard allows up to 16 buttons and three control codes to be transmitted.  This means that a single channel of low performance audio can control a 3D printer with up to eight stepper motors or other driven features.  Also since only four ATtiny85 chips are needed to drive all eight signals (plus a total of 32 resistors and 32 transistors if using bipolar transistors), cost is greatly reduced.  Also it is possible to run all but the heaters from USB and possibly run the heaters from a small power supply or additional USB power sources.

Tonight I plan to breadboard and program control of all five steppers on the ROBO3D printer – wish me luck!