0
\$\begingroup\$

i'm trying to design a circuit that will control two biopolar stepper motors to scan the temperature of a room.

enter image description here

The mechanism will look something similar to this (minus the gears, and much lighter) but a small IR sensor rather than a camera. The bottom motor will rotate 360 degrees taking measurements every 5 degrees. After the camera has finished a rotation, the top stepper motor will move up 5 degrees. The bottom motor will then begin another revolution until all of the room has been scanned with the sensor looking up at the ceiling.

enter image description here

This is the stepper motor that i will be using it is rated at 12V. However, I plan on running it at 5V to conserve battery life (important as the device is portable and Will send data via WiFi). I was also informed that connecting the battery directly to the drivers enable pin will waste battery life (shown in the figure below) and that I should connect all of them directly to a single GPIO of the micro controller (bearing in mind that I am using two motor drivers, so 1 GPIO to 4 Enable pins).

enter image description here

My first question is does this seem suitable for the application?

Secondly, if all of the enable pins on the drivers are constantly connected to 1 GPIO of the microcontroller, that power has to come from somewhere. i.e the battery, right? How would this method increase battery life? Also, I can't see how you could alternate between switching on the enable pins on the drivers if they are directly connected to 1 GPIO. I seem to be missing some understanding here. Thanks

\$\endgroup\$
  • \$\begingroup\$ You said 'minus gears'. Beware that normal stepper motors will not 'lock' the axis unless you keep them powered. On a battery you do not want that. Your 'vertical' control will need a solution for it not to 'descend'. \$\endgroup\$ – Oldfart Mar 13 '18 at 16:01
0
\$\begingroup\$

You may be a little confused.

The intent of connecting the enables to the micro is so you can turn off the motors when you are not repositioning. That is, the motors should hold position by means of the detent torque of the motors themselves and consume no power while stationary.

That of course assumes the motors will hold position when unpowered. The mechanism should be balanced appropriately to allow for that.

In order to do that you would really need independent control over both motors. The up down motor only needing to be powered briefly at the end of each horizontal scan.

As such, you would need two IO pins for enables and four pins for the winding control pins. (Though since you are only running one motor at a time, you can get away with two pins for this.)

schematic

simulate this circuit – Schematic created using CircuitLab

HOWEVER: A bigger issues you will face is the 293 is not suitable for running things at 5V. The device can not drive close enough to the rails to provide your required drive voltage. See this cross-post

\$\endgroup\$
  • \$\begingroup\$ Thank you for this. Cross-post is very helpful. Just for understanding, if the horizontal was enabled with coil 1 switch on, would the bottom driver be ground? Also is there a driver that you could recommend? DRV8837? Thanks \$\endgroup\$ – Yogi12 Mar 13 '18 at 17:05
  • \$\begingroup\$ @Yogi12 ya the DRV8837 looks a lot better. BUt there are devices specifically intended for driving steppers that may be better. The schematic I showed here is a block diagram not a wiring diagram, you would need to augment it to include the right logic for the individual coils. \$\endgroup\$ – Trevor_G Mar 13 '18 at 18:44
0
\$\begingroup\$

I'd suggest that Nema sized stepper motors of any type would be completely unsuitable for this application. They are heavy and require large currents, which are difficult to supply in battery equipment particularly.
Stepper motors such as these will also NOT be able to move in 5deg steps without microstepping ....and you don't want to go there with a simple controller.

If you really want a stepper motor, then consider the 28YBJ-48 5V stepper (2048 steps per rev), which is readily available at low cost. This really needs to run on 12 V to be effective (because of the voltage drop in the driver) unless you change the ULN2003 type driver to a TPL7407L in which case you can get down to 9 V. The high gear ratio and the fact that it's driven x1 may be enough to hold position when powered down. Though I'd suggest whenever you power up you need to seek a home flag for each axis in the pan and tilt.

IMO you'd be best using something like the Servocity SPT100 or Servocity Servoblocks with an RC servo, You can modify RC servos to span more than 360deg. Or of course you could use two servos for pan and one for tilt to use servos without modification. The standard RC servos have relatively low current consumption in a pan and tilt application. The real benefit here is of course you can turn off the servo completely and even though the mechanical system may move (droop), as soon as you re-enable the servo it snaps back to the position you had set (providing you remember the PWM setting)

\$\endgroup\$
  • \$\begingroup\$ Thank you. Could you clarify the home flag for each axis? \$\endgroup\$ – Yogi12 Mar 14 '18 at 12:33
  • \$\begingroup\$ A stepper motor give no feedback on position. You need at least one known position (a home flag) to know ...if you power off the stepper then you are only guessing until you re-acquire 'home'. \$\endgroup\$ – Jack Creasey Mar 14 '18 at 15:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.