Cheapest motor drivers possible
March 02, 2009 09:20PM
So I am currently close to completing the mechanics of my repstrap machine. I am a college student and thus my goal is to make the entire project as cheap as possible. I am close to $70 with the metal materials for the structure. I salvaged about 30 bipolar stepper motors from old photocopiers and have 3 that fit the bill. I will be running them as unipolar motors by leaving the ground wires unconnected. I also already have an arduino from previous projects. I have been looking into the price of the electronics and that seems to be my big hurdle. So basically, the purpose of this topic is so others can help me brainstorm on how to make an extremely inexpensive motor driver for others building repraps on a budget.

I currently have a picaxe 08M hooked up to a 1 Amp full H-bridge that is capable of powering the motors up to 36V. The full hbridge controls both of the coils and can switch the current direction to allow for full of half stepping by changing the picaxe firmware. From what I can tell, it looks like an average of 2A is the max specified current for the steppers I am going to use. So knowing this, would this method be a simple, cheap was to produce a motor driver? Anyone have any other ideas to accomplish this?
Re: Cheapest motor drivers possible
March 02, 2009 11:14PM
I am using the Step Genie currently and loving it smiling smiley. It uses Hexfets so for about $8 a board you can control steppers up to 35A at 25V... Sounds good to me hot smiley
Re: Cheapest motor drivers possible
March 02, 2009 11:15PM
[www.stepgenie.com]
heres the link if your interested.
Re: Cheapest motor drivers possible
March 03, 2009 06:43AM
Thanks for the info! I checked out the site and there is definitely some potential there! I think this would be great for the average hobbyist who doesn't want to deal with a complicated driver. In trying to reduce the cost further, the price of the StepGenie is $6, but I already have a couple picaxe 14m's lying around that I think I could program to perform the same function. That way I would have a little more control over the modes and could also add the optoendstops into the programming. The idea of using the HEXFET's is a good one though and I think I'm gonna order a few of those grinning smiley
Re: Cheapest motor drivers possible
March 03, 2009 12:29PM
Here's an even better idea. Connect the "ground" wires to +12V, and use 4 cheap MOSFETs (or HEXFETs, or whatever). Each one drives half a coil. You need some flyback diodes, then you're done!

Cheap. Easy. Also, it's the reason that bipolar steppers exist.

Another approach would be to use a ULN2074B. This will be lower current (1.5A) than using discrete FETs, but more integrated.
Re: Cheapest motor drivers possible
March 03, 2009 01:29PM
Annirak, I think you basically just described exactly what the stepgenie does which reinforces my idea that the same thing could be accomplished with an microcontroller for triggering and a set of 4 MOSFET switches to allow current to pass through the various coils. The thing that I find interesting though is that if you look at the stepgenie pdf for the schematic there is a table in there for a high-torque mode. This basically drives the motor as unipolar but energizes two coils at once effectively making it a bipolar motor. Anyone know any reason that this would give any different performance than simply leaving the ground wires for a unipolar motor unconnected and driving it as a bipolar. I feel like it is doing the same thing in essence.

Second question, is there any additional features that we need to include in these motor drivers? The official reprap stepper motor driver has inputs for the min and max optoendstops. I am guessing that these are something we will need to add into the microcontroller programming to avoid driving something through the wall. Also, I am thinking current adjustment could be done by just varying to value of the power resistor as configured in the stepgenie pdf. Then just check the current through each coil with an ammeter to get the value specified for that particular motor. And communication is still through the "step" pin which just steps when it receives a pulse on that line, so that should be fine. Anything else we should add or any better ways to accomplish these extra features?
Re: Cheapest motor drivers possible
March 03, 2009 02:17PM
I found this chip for $6.00.

Just thought I would post it looks cool

[www.stepgenie.com]


Bruce Wattendorf
Re: Cheapest motor drivers possible
March 03, 2009 03:19PM
@cpwebste: The reprap stepper board just passes through the min/max signals to the arduino/sanguino, theres no processing of the signal done by it. I presume this is just to neaten the overall wiring.

The trouble I see with the stepgenie is that it is not easy to modify. The reprap stepper driver board 2 is a one-chip solution that looks a lot better.
Re: Cheapest motor drivers possible
March 03, 2009 03:24PM
Hi Torque mode is just dual coils, rather than single coils. When you pass back and forth between a single coil and two coils, this is known as half-stepping. With the dual coil method, you get sqrt(2) times the torque of a single coil and consume double the power.
Re: Cheapest motor drivers possible
March 03, 2009 08:50PM
It could be done with a microcontroller though there might be significant lag time between when you send the step signal and when the motor steps, depending on the speed of your chips. And HEXFFETs dont need diodes just a tip.


_______________________________________________________________________________________________________

Yes my Avatar is My RepStrap.....Isn't it pretty

For the latest Updates check my main site [www.repstrap.weebly.com] or my blog [www.pingiscoolest.blogspot.com].
Re: Cheapest motor drivers possible
March 03, 2009 08:56PM
Also for some reason HEXFETs were much too slow for my steppers so I switched to NPN switching transistors. They are much cheaper and smaller and mine were faster though I don't know if its supposed to be that way. If anyone know why my HEXFETs are so slow I would really appreciate it. They take almost half a second to turn off much to slow to run a stepper. I dont think thats supposed to happen though. The only disadvantage to the NPN transistors that I know of is the need to use a diode and the need for a resistor on the base pin. (I used 10 ohms if anyones interested I also used Radio Shack NPN switching transistors if anyones interested.) PM me and Ill give you the schematic though I doubt anyone wants it its probably not the best way to go.


_______________________________________________________________________________________________________

Yes my Avatar is My RepStrap.....Isn't it pretty

For the latest Updates check my main site [www.repstrap.weebly.com] or my blog [www.pingiscoolest.blogspot.com].
Re: Cheapest motor drivers possible
March 04, 2009 12:21AM
Ping,
I hadn't seen the TVS's in hexfets before. Very nice.

I'd need to see your driver circuit, but you're right, that's far too long for a fet's recovery time. I've frequently built switching power supplies running at over 100kHz with MOSFET's (fast switching fets, not hexfets, I admit) and I'm quite familiar with the drive circuits needed to make them work.

Brendan
Re: Cheapest motor drivers possible
March 04, 2009 09:51AM
I've been playing with some fets and found a website that recommended a pull down resistor to bring down the charge on the gate. They were using a 100k tied from the gate to ground.

Worth a try.
Re: Cheapest motor drivers possible
March 04, 2009 10:42AM
If you want them to switch off quickly you have to actively drive the gate low. The gate capacitance of power MOSFETs is quite high ~1000pF IIRC. A 1K pull down would be more reasonable.

BTW,
If you are using a 10R base resistor it would take 100's of ma, what are you driving that with?


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 04, 2009 03:12PM
Strangely enough, I typically end up using BJT's to drive my FETs.
Re: Cheapest motor drivers possible
March 04, 2009 09:30PM
nophead Wrote:
-------------------------------------------------------
> If you want them to switch off quickly you have to
> actively drive the gate low. The gate capacitance
> of power MOSFETs is quite high ~1000pF IIRC. A 1K
> pull down would be more reasonable.

OK that worked I did that and it works well now thanks. (Feeling pretty stupid now spinning smiley sticking its tongue out)
> BTW,
> If you are using a 10R base resistor it would take
> 100's of ma, what are you driving that with?
I was using that for my NPN transistors, I'm driving it with my Arduino, not using any resistors with the HEXFET's.


_______________________________________________________________________________________________________

Yes my Avatar is My RepStrap.....Isn't it pretty

For the latest Updates check my main site [www.repstrap.weebly.com] or my blog [www.pingiscoolest.blogspot.com].
Re: Cheapest motor drivers possible
March 05, 2009 04:29AM
The reason MOSFETs are used is because they have very high current gain so the few milliamps available from a logic chip can drive tens of amps.

A bipolar power transistor does not have enough gain to go from a few milliamps to a few amps, so Darlingtons (which are pairs of BJTs), are the old fashioned way of doing it. The problem with them is that because it is a three terminal device the collector voltage of the second transistor cannot be driven lower than its Vbe plus the Vce of the first transistor. That means the minimum voltage drop across them is always > 1V, leading to high power dissipation.

I am confused when you say you used an NPN transistor driven from an Arduino. I think with a 10R resistor you would be overloading the Arduino output. Just as well you got the HEXFETs working!

Yes your RepStrap looks to be coming along nicely.


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 06, 2009 02:44AM
That StepGenie seems promising. I just ordered a few (with Hexfets). Question, did you etch a PCB, wirewrap, or buy the demo board? If you etched a board, do you have the masks that you can upload? No use reinventing the wheel and I didn't want to pay $75 for the boards...
Re: Cheapest motor drivers possible
March 06, 2009 10:38AM
It looks like a fairly simple circuit, why not do point to point on a proto board?
Re: Cheapest motor drivers possible
March 07, 2009 09:44AM
Ok, so my stepgenie and HEXFETs arrived today. I hooked up the circuit and edited the arduino program to have the correct pulse durations and max frequency. I have double checked the circuit a good 5 times and I still cannot get the motor to do anything besides vibrate on the table. The shaft does not rotate at all, it just vibrates back and forth. I tried switching the polarity on one of the coils and it didn't help at all. I determined the pinout of the motor using my DMM so I'm pretty sure I know which wires go to which coil. I also experimentally determined the stepping sequence pinout so I think I'm hooking up ABCD correctly. Any thoughts as to why I can't get this to work? I am also running the whole thing off a 4.5V battery as the stepper can only have a current around 1.0A.
Re: Cheapest motor drivers possible
March 07, 2009 09:55AM
If you try to start with a pulse rate that is too fast the motor will just vibrate rather than start. Try stepping very slowly to start with and then go faster until it fails to start reliably.

This rate is called the pull-in rate. A motor will actually go a lot faster but you have to accelerate after starting below the pull in rate.

Edited 1 time(s). Last edit at 03/07/2009 10:54AM by nophead.


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 07, 2009 05:22PM
Good call nophead. The code that I took from the Reprap Stepper Driver page had a delay that incremented to show the effect of changing the speed, but all of the delays that were in there by default were too fast. I found a delay of around 2200 microseconds to be the cutoff and anything less than that and the motor would not turn.
Re: Cheapest motor drivers possible
March 07, 2009 05:31PM
Yes unfortunately cheaper means slower, less torque and lower resolution with stepper drivers.

Edited 1 time(s). Last edit at 03/07/2009 05:33PM by nophead.


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 07, 2009 09:23PM
nophead Wrote:
-------------------------------------------------------
> The reason MOSFETs are used is because they have
> very high current gain so the few milliamps
> available from a logic chip can drive tens of
> amps.
>
> A bipolar power transistor does not have enough
> gain to go from a few milliamps to a few amps, so
> Darlingtons (which are pairs of BJTs), are the old
> fashioned way of doing it. The problem with them
> is that because it is a three terminal device the
> collector voltage of the second transistor cannot
> be driven lower than its Vbe plus the Vce of the
> first transistor. That means the minimum voltage
> drop across them is always > 1V, leading to high
> power dissipation.
>
> I am confused when you say you used an NPN
> transistor driven from an Arduino. I think with a
> 10R resistor you would be overloading the Arduino
> output. Just as well you got the HEXFETs working!
>
> Yes your RepStrap looks to be coming along nicely.

Yes Well I was using the NPN transistors before I was able to make the HEXFETS work, I will probably switch to the HEXFETs sooner or later but the next step is control software smiling smiley, Thanks about the repstrapspinning smiley sticking its tongue out and for your help.


_______________________________________________________________________________________________________

Yes my Avatar is My RepStrap.....Isn't it pretty

For the latest Updates check my main site [www.repstrap.weebly.com] or my blog [www.pingiscoolest.blogspot.com].
Re: Cheapest motor drivers possible
March 12, 2009 08:08AM
So I've made some good progress with these motor drivers. I know basics about electronics, but I ran into one thing I had a questions about. In the stepgenie schematic there are power resistors between the positive voltage motor and the motor coils. I can't really figure out why these are there. My motors have a resistance of about 9 ohms and if I am using +12V as the motor supply voltage and I want about 2 Amps then I shouldn't use a power resistor right? My HEXFETs were getting a little hot when running the circuit without the power resistors so I figured I should ask before I continued.
Re: Cheapest motor drivers possible
March 12, 2009 08:17AM
I = V / R so you will only get 1.3A with a direct connection. You would need 18V to get 2A.

The original circuit must have been for motors with a lower voltage than the supply. Using a high voltage supply and limiting the current with resistors is the simple way of getting higher speeds. It wastes a lot of power. The modern way is to use a chopper like RepRap.

I am surprised your FETs get hot at only 1.3A. Are you sure you have enough gate voltage to turn then on fully? What is the part number of your HEXFET.


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 12, 2009 10:36AM
Here's the description of the HEXFETs I'm using:

IRF540N Power MOSFET (International Rectifier) Case TO-220AB, 100v 33A, Ultra Low On-Resistance

Link to the datasheed: [www.irf.com]

I am using a +4.5V from the microcontroller to toggle the gate. The HEXFETs are rated for FAR above what I am doing so I didn't think I would have any issues but even with one 1.3A pushing through they were getting hot. If I keep having problems and no one else can think of anything I'll post a pic of the setup incase someone can find something I screwed up cause I already double checked and saw nothing.
Re: Cheapest motor drivers possible
March 12, 2009 10:55AM
If you look at Fig 3 you will see that 4.5V is not enough to pass 1A. The ultra low on resistance is quoted at 10V VGS. The gate threashold is 4V, meaning that is the point where it just starting to turn on.

To drive MOSFETs direct from a logic pin you need ones designed for logic drive, which have a lower gate threashold. With these you would need a small signal transistor, or an open collector logic buffer like 7406, to convert the logic signal to a 12V signal to drive the gate.


[www.hydraraptor.blogspot.com]
Re: Cheapest motor drivers possible
March 12, 2009 12:24PM
Am I correct in reading the figure that +5V would be able to run ~27Amps which would be more than enough? I can easily change my power to the microcontroller to be 5V if it would solve this problem. And you definitely explained the heat problem with the HEXFETs because now that I think about it the power to the microcontroller was more like 4.3V because my 3 AA battery pack was getting a little low. Hopefully changing to +5V logic will solve this problem.
Re: Cheapest motor drivers possible
March 12, 2009 12:43PM
All the fig 3 graph shows is that with 5V it would pass 27 A with 50V across it for 50uS, so that would be dissipating 1350W for a very short time!

For some strange reason the datasheet does not have a graph of on resistance against VGS, which is what we are interested in here and is normally on a MOSFET datasheet. All we know is that the FET is off below 4V and down to 0.044 ohm at 10V.

Increasing the drive to 5V will certainly help. Sometimes a pull-up resistor to 5V will pursuade an output go a bit higher than otherwise. But certainly the MOSFET will not run at its coolest unless you get near 10V.

At 0.044R they would be completely cold at 1.3A, it is uncertain how hot they will be at 5V.


[www.hydraraptor.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login