Jump to content

Hoping someone can help me out here Fr


G+_James Hughes
 Share

Recommended Posts

Hoping someone can help me out here Fr. Robert Ballecer, SJ . I'm working on a project controlling a stepper motor direction with a double pole rocker switch, an Arduino and a l293d motor controller. Problem is the l293d gets really hot so I'm thinking about switching to a l298n. I'm okay with sticking with a switch to control the direction but would like to see if maybe I could use a potentiometer or digital encoder.

Link to comment
Share on other sites

I'm going to go ahead and assume that the potentiometer/encoder is for controlling speed (since you never mentioned what they'd be for).

Simplest would be a potentiometer hooked up to an analog pin (pretty sure this was covered in the arduino 101 series). Then use the map function to convert it into a delay length between each step of the motor. You could (with some trial and error) set a zone in the middle as off and also control direction with it.

Slightly more complex would be the encoder (I'm assuming there's a library to make it easy). Watch for it moving (and which way) to update a variable for the delay time (thus controlling speed). If you want to loose the switch again then when this variable crosses zero change direction and be careful of how you calculate the delay.

Link to comment
Share on other sites

Robert Gauld I'm sorry I wasn't clear. The current setup uses a rocker switch to control the direction of the motor. I'm okay with using a similar setup but a potentiometer would be more desirable (I think). I may have found some code I can adapt. My real question/concern is the heat. After building the current circuit I noticed that the l293d would get quite warm. Since the l298n has a heat sink and other circuitry on board I'm hoping that it will run much cooler. (I guess I shouldn't post when I'm overtired lol)

3037%20-%20IMG_20170925_055204.jpg

Link to comment
Share on other sites

James Hughes best to gather any and all data you can find about the components you have(data sheets from manufacturers are best). In this case pay particular to current draws, handling capabilities and supply requirements. Being that you mention the controller is getting hot you may have to upgrade the controller or downgrade the stepper.

Link to comment
Share on other sites

James Hughes: the spec sheet you posted for your stepper says that it draws 0.9 amps (900 milliamps) at 3.6v.

 

The spec sheet I found for L293D says that it is rated for 600 milliamps sustained ( 1.0 amps peak), so yes I would expect that running 900 milliamps thru it would cause it to run hot.

 

users.ece.utexas.edu/~valvano/Datasheets/L293d.pdf

 

The L298N will drive 2 motors at up to 2.0 amps each, so I would say that of the two, the L298N is the way to go.

 

https://tronixlabs.com.au/robotics/motor-controllers/l298n-dual-motor-controller-module-2a-australia/

Link to comment
Share on other sites

 Share

×
×
  • Create New...