Tuesday, 2 October 2012

Replacing pololu stepper drivers with TB6560s

Edit - Update - Use DRV8825s instead.

I've noticed that this blog post is still getting referenced, so I feel an update is in order. I no longer recommend the TB6560s - they are a bit of work to install and very noisy. At higher currents this noise manifests as artefacts on the print. These days I've replaced my TB6560s with DRV8825s that fit in the sockets on my ramps board - They are less of a hassle than the TB6560s, take up much less room, make nicer prints and I can actually be in the same room as the printer as it isn't nearly as loud.

If I were building a new printer I would also consider the new SilentStepStick based on the TMC2100 as it also looks really nice. It should also be able to drive a lot of current, the spec is for 1.2 amp continuous which is pretty good.



During the end of July and early August this year we put together a reprap 3D printer.  I decided on the mendelmax as it looked rigid and I liked the use of  leadscrews rather than threaded rod.

The design uses the standard ramps board with pololu stepper drivers.  However, Dust (who kindly printed all my plastics) had noted that the y-axis on his machine was very heavy.  With that in mind, I sourced 2.5amp steppers and decided on replacing the pololus on the ramps board with boards based on the TB6560 which I got from ebay.


The only pololu I left was the extruder driver as it didn't need as high a current.  I soldered header pins onto the TB6560 which plug into the sockets on the ramps board.  It never knows that there aren't pololus in the sockets, so no firmware changes are necessary.   

The new drivers are pretty great, they are much easier to set the current on, you just toggle some switches rather than dial a surface mount pot on the pololus and hope you have set a reasonable current (to be fair, you can measure it, it is just annoying to do so).  They also allow me to run at 3amps continuous on all three axis, though it makes a lot of noise and is probably unnecessary except on the y-axis.  At three amps the 2.5amp steppers get very hot, and I started to become concerned about the PLA plastic the machine is built out of melting, so I cable tied a pair of old CPU heatsinks to the X and Y axis steppers (Z duty cycle is too low for it to get hot).  It looks pretty dubious but works really well the steppers barely feel warm.

All this allows the machine to run at some fairly silly speeds.  As I recall, the video below was taken at 300 $^{mm}/s$, 9000 $^{mm}/s^2$ acceleration and 20 $^{mm}/s^3$ Jerk



The machine does sometimes skip in the y-axis at these speeds, particularly when using Cura's default line fill; I've since dialed the acceleration and jerk down to 5000 $^{mm}/s^2$ and 15 $^{mm}/s^3$ and it doesn't seem to miss any steps.  Running that fast also produces heaps of artifacts in the prints, particularly on smaller radius arcs, the machine makes a kind of trilling sound and a wave pattern gets printed into the part.  So I generally run the machine much slower than this for part quality issues.

There were some problems with the stepper drivers I'm using, the 5v regulator on two of the boards was just DOA.  I "fixed" this by soldering a wire from the 5v out of the working regulator to the 5v out pad of the two dead regulators (after cutting the leg).  It works but the remaining regulator gets really hot but has so far been fine.

EDIT -- added some wiring information
The wiring from the pololu socket to the TB6560 board is as follows
Pololu TB6560
STEP $\to$ CLK+
DIR $\to$ CW+
EN $\to$ EN+

Connect the CLK-, CW- and EN- together (as you don't really need anything too fancy) and then run that to any ground pin on the pololo sockets.

EDIT 2
To help clear up the necessary wiring, I have bashed together an example wiring diagram for replacing the y-axis pololu driver with one of these TB6560 boards.  Please excuse the shoddy diagram, its 1.30am in the morning :P

Wednesday, 12 October 2011

Battle Blimp Boards. Motor Drivers

Last Sunday  we ran the second part of the aerospace club board building workshop.  Again it went pretty well, I was rather pleased at the turn out given how busy everyone is at this time of year.   We finished up most of the megamini boards and made good progress on the Battle Blimps Shield.  (We really need to crystallize on some consistent names for these things)

This afternoon I wrote a partial port of the Adafruit motor driver library.  Once it compiled, it worked first time!  That never actually happens in real life.


From Battle Blimps Boards.
See, it can even drive a motor backwards and forwards.

I'll try  add some photos to the album over the next few days but sadly it looks like we all worked hard on Sunday and didn't actually take any pictures of the build :P

Monday, 3 October 2011

Building the MegaMini






On Sunday the canterbury aerospace club populated the first of 2 PCB's for the battle blimps competition.  Hanna took some great photos and video of the build day.

It went reasonably well and we got the maple bootloader onto a few of the boards.  Next week we will run the second half of the workshop where we build the battle blimps shield which we will be using for communications and motor driving on the blimps.   We will also finish up the few boards incomplete megamini boards

It was great fun to use the pick and place machine and looking at solder paste under a microscope is amazing.  It looks like a pile of ball bearings, I strongly suggest you try it some time :)

Quite a number of the group had never even soldered before and I think throwing them in the deep end and starting with surface mount has been quite good.  There seems to be a perception that surface mount is really hard when actually it isn't that bad. 





Friday, 2 September 2011

Rockoon Flight, CAA preliminary approval.

Me and Hanna went up to Wellington last week to try and convince CAA to let us fly the microprize rocket from a balloon without a transponder.   Looks like they are going to let us do it :)   There are some provisions we have to meet, but I anticipate no big problem with them.

We were planning to fly in the Canterbury plains but due to all the controlled airspace there we are going to have to move the flight to Southland.  At the moment I'm roughing out flight predictions centered around a small town called Tinkertown, which seems appropriate :)    We will also have to start the flight at night to avoid as much air traffic as possible and there are a lot of flight zones we must keep out of at all times (such as around Queenstown).  This should all be doable and with the rocket launching at or just before dawn should make for some spectacular photos from the top.  

Battle Blimp Boards, PCBs

The PCBs for the battle blimps boards have finally arrived.  We got them on the Dorkbot PCB group order and they have taken ages to arrive.  I think they got lost in the postal system as the PCBs from dorkbot have always arrived much faster than this.





The battle blimp boards are based on the Leaflabs Maple.  The PCBs on the left are the microboards with the ARM cortex chip, the ones ont he right are the motor/radio shield.  In all we got 18 PCB's of each made up.

We will have one spare which we can use to test the current handling of the motor driver chips and the high power Fets.   As the traces are only 1ounce per square inch they won't handle that much current before exploding so we will investigate roughly what that point is.  We have a work around for people who want to sink heaps of current with the fets.

I'll order the parts from Digikey this evening and then we will run the SMT assembly workshops once they arrive :)


Monday, 25 July 2011

Battle Blimp PCB

One of the projects I'm involved in running is the University of Canterbury Aerospace Club.  Our big event this year is Battle Blimps :)

The plan is for people to battle their blimps until the other blimp is no longer capable of flight.  The simple version of the rules is as follows:

100 gram weight limit. (including envelope)
No flame weapons.
No untethered projectile weapons (Unless you are prepared to demo its safety int he usual fashion)
No intentional jamming of opponents controls.

Other than that people can do what they like.   I designed a pair of battle blimp boards, a micro board and a battle blimps motor board.  The micro board is based strongly off the tested mini rocket flight computer board (http://andre.team9.99.org.nz/2011/07/microprize-flight-microaltimeter.html) but with better separation between the analog and digital sections.   The motor/high power board is a pair of TB6612FNG dual H bridges and 4 30 amp NFets as low side switches.  It also has a RMF12B transceiver with a  library based on the JeeLabs JeeNode code: http://jeelabs.net/projects/hardware/wiki/JeeNode

Obviously the traces will horribly explode if someone tries to draw 30 amps though the board but we have a work around for that.  Not that I can think of a battle blimps need for 30amps but people can then use the boards to drive little robots etc.

The design will be licenced as open hardware.


The Microcontroller board with ARM cortex M3

The Battle Blimps high power/motor shield with the RMF12B transceiver

Microprize flight micro/altimeter.

We have been having some pretty good success with the flight computers we have been building.   They are based on the excellent leaflabs maple.
The Front of the board.  This shows the72MHz ARM Cortex M3 (STM32F103RB) with 20k ram and 128k flash.  It also shows the currently unpopulated voltage regulator.

The back of the board with the SD card socket, 200 g accelerometer (unpopulated in the pic) , BMP085 pressure sensor and two dual channel N-fets for ejection charges (4 channels total)

The board is only 18mm wide and as such will serve as a development board with the larger flight computer.  The larger flight computer has more sensors and a set of lower g accelerometers for dead reckoning in case the gps fails.

The GPS we are using is the venus module from sparkfun.  The breakout board just fits on the top of the board using header pins.  I considered using the module without the breakout board but I'm not that confident that I can design the high frequency bits of the circuit well (you have to make sure your antenna feed traces are 50 Ohm impedance etc)  Basically I decided to trust sparkfun on this one.  Plus it gave us one less thing to debug.

Obviously the 200 g accelerometer is pretty overkill and doesn't have much resolution in the range even rockets work in.  In fact the noise in its signal is about +-0.3 g  (one standard deviation) with a fair degree of oversampling and simple digital filtering.    This isn't too far from the chips stated RMS noise of 0.28g so I'm pretty happy with that.    The main reason for this is to test some launch techniques and to estimate shock loads.  (parachute openings etc.)