G+_James Hughes Posted September 25, 2017 Share Posted September 25, 2017 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 More sharing options...
G+_Robert Gauld Posted September 25, 2017 Share Posted September 25, 2017 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 More sharing options...
G+_Black Merc Posted September 25, 2017 Share Posted September 25, 2017 I did not see anywhere that you state the holding current, or the coil current ratings, or if you are employing high current transistors to isolate high current from logic. Link to comment Share on other sites More sharing options...
G+_James Hughes Posted September 25, 2017 Author Share Posted September 25, 2017 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) Link to comment Share on other sites More sharing options...
G+_James Hughes Posted September 25, 2017 Author Share Posted September 25, 2017 Black Merc it's all running at 5v . Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 25, 2017 Share Posted September 25, 2017 James Hughes even so.. All the variables I was looking for will translate into heat if not properly addressed. Link to comment Share on other sites More sharing options...
G+_James Hughes Posted September 25, 2017 Author Share Posted September 25, 2017 Black Merc I'm somewhat of a noob. How can I reduce the amount of heat? Link to comment Share on other sites More sharing options...
G+_James Hughes Posted September 25, 2017 Author Share Posted September 25, 2017 Black Merc Here is the info on the stepper that I'm using. Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 25, 2017 Share Posted September 25, 2017 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 More sharing options...
G+_Black Merc Posted September 25, 2017 Share Posted September 25, 2017 James Hughes yes, there you have it ~2amps of current through that controller. Verify that the controller can handle that large amount. That's around 10watts of power. No wonder the heat sink. If controller spec. say it is rated for 10 or more watts I'd say it's normal. Link to comment Share on other sites More sharing options...
G+_John Sullivan Posted September 26, 2017 Share Posted September 26, 2017 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 More sharing options...
G+_James Hughes Posted September 26, 2017 Author Share Posted September 26, 2017 cosmic Ray thanks for the input. Now I need to find some time to get the new setup working. Link to comment Share on other sites More sharing options...
Recommended Posts