View Full Version : Imported L298 Arduino Modules

30-07-2012, 11:14 PM
Wishing to experiment a little with some surplus unmarked stepper motors I've recently obtained an L298 Arduino module similar to http://www.ebay.co.uk/itm/L298N-Dual-Stepper-Motor-Driver-Controller-Board-Module-/180695560006?pt=UK_BOI_Industrial_Automation_Contr ol_ET&hash=item2a124b6f46 and http://www.ebay.co.uk/itm/320927678318?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649
The plan is to use this driven by its usual partner, an L297.
Inspecting the variant of the PCB I have I'm a little surprised to find pins 1 and 15 taken straight to ground thus leaving no ability to provide a "Sense" drive to the L297 and thus, presumably, completely loosing the ability to control the chopper circuit via the Enable pins.
Other than the obvious of changing the module or snipping and lifting of pins 1 and 15 from ground (which, fortunately. is just possible) and installing a pair of "Sense" resistors, has anyone got another suggestion for controlling the current in low ohm stepper motor windings.

30-07-2012, 11:32 PM
at a fiver thats nearly cheaper than buying the chip on its own. I guess these are intended for PWM DC motor rather than stepper drives where there is a higher winding resistance and the current regulation isnt needed. You only need sense when the driving voltage is far higher than the motor is rated for... Also, i'd not rely on that heatsink...much too small for anything sensible...

30-07-2012, 11:44 PM
That's rather surprising about both pins 15 and 1 going to ground. You need to regulate the current in each winding independently, so if these pins are both connected to ground this means they are connected together which in turn means you can't obtain separate readings for their current's. Putting resistors from pin 1 and 15 to ground is basically the only way to do it as that's the only 'available' point in the circuit. The voltage across these resistors is then amplified within the L297 and most likely using a comparator with voltage reference is used to chop the current. This is the method I have used, except with a PIC and substituting the fixed voltage reference for a DAC to enable microstepping.

30-07-2012, 11:58 PM
I think irving2008 has hit the nail on the head. My guess is some sellers are not differentiating betwixt modules for PWM of DC motors and what is required for steppers. Bang goes any warranty, I guess I'll be snipping pins 1 & 15. Close inspection shows some modules of this type have the pins 1 & 15 brought out to Berg links. If anyone else buys one of these I'd advise them to check that little bit more carefully than I did.

Ho hum!

I like Jonathon's DAC idea.

31-07-2012, 12:06 AM
I like Jonathan's DAC idea.

Depending on the required micro-stepping resolution and step frequency you may be able to use the microcontroller's own analogue outputs. Alternatively something like TLC7528CN (http://uk.farnell.com/jsp/search/productdetail.jsp?CMP=i-ddd7-00001003&sku=8454647) is fine. I used an 8-bit one connected to a port since that gives enough resolution for microstepping or more fancy stuff later on :smug:. You can make the voltage reference to the DAC variable to enable different motors to be used, but make sure you use a stable reference - not just a simple voltage divider as the output of that will fluctuate too much.