Maker Pro
Maker Pro

Please Hep with autobalancing motor project

mikester26

Feb 5, 2013
4
Joined
Feb 5, 2013
Messages
4
Hi All, I am really stuck with this project and would really appreciate some help

Ok so I have a simple 12v Dc motor with both red and black wires

And I have a device which when detects movement on the x-axis give a +12v on a yellow wire when tilted to the left and +12v on a blue wire when tilted to the right.

Its the motors job to automatically rotate the device left or right (forwards, Backwards) when movement is detected.

Im having trouble figuring out how to wire this thing up, I can only seem to move the motor one way, without physically switching the red and black wires around, what device should I use, thanks
 

mikester26

Feb 5, 2013
4
Joined
Feb 5, 2013
Messages
4
I basically need it wired both these ways at the same time
 

Attachments

  • level.png
    level.png
    12.1 KB · Views: 95

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
You may be able to do this using two power supplies, with no other components. It depends on what the "device which detects movement" is.

It would be very helpful and save everyone a lot of time if you would:

1. Describe the parts of the project in detail. Give part numbers and URLs of data sheets if you have them.

2. Describe exactly what you want to achieve with the project. I get that you're using a motor to control something, and something else to monitor its position or rotation, but my crystal ball is in the shop this week, so you'll need to explain it better than you have done.
 

mikester26

Feb 5, 2013
4
Joined
Feb 5, 2013
Messages
4
Ok sorry, I understand.

So the device which gives the 12v outputs is this http://oceancontrols.com.au/SRS-048.html

And basically it is going to be used to autolevel a camera attached to a tray, pivioting on a central shaft.. The tray is adjusted by the dc motor, clockwise or anti clockwise depending on the outputs from the above device.

So these are really the only 2 components I have, any suggestions are welcome
 

Laplace

Apr 4, 2010
1,252
Joined
Apr 4, 2010
Messages
1,252
I would suggest two 12V SPDT relays. One relay would be activated by the blue line, the other by the yellow line. The first relay pole would be connected to the '+' motor terminal while the second relay pole would be connected to the '-' motor terminal. The inactive relay throw switches to GND, whereas the active relay throw switches +12V. So when both yellow and blue lines are inactive, both motor terminals are grounded. When either the yellow or blue line is activated, the corresponding motor input is given power. If something should go horribly wrong and both yellow and blue lines are activated at the same time, then both motor terminals are powered up and no current will flow through the motor. Depending on how intense the switching activity is you may want to consider a snubber for the relay contacts.
 

KrisBlueNZ

Sadly passed away in 2015
Nov 28, 2011
8,393
Joined
Nov 28, 2011
Messages
8,393
OK, thanks for the description and the link.

Have you bought the inclinometer yet? It seems very expensive. You can probably get the G sensor IC that's inside it for a fraction of the price. Analog Devices make a range of them; go to http://www.analog.com and look for MEMS accelerometers. But I think you already have it, right?

Laplace's suggestion sounds reasonable. You can't drive the motor directly from the outputs of the inclinometer; it can only supply 500 mA on each output. You will need a reverse-connected diode across each relay coil to protect the transistors in the inclinometer against back EMF from the relay coil. Actually the inclinometer probably already has diodes in it for that purpose, but better safe than sorry.

I think you're going to have a problem with overshoot. At least, you need to gear the motor down very heavily, so it adjusts the tilt only very slowly. As soon as the tilt gets within tolerance for the inclinometer, and the relay turns off, the motor needs to slow down and stop pretty quickly without overshooting the correct position.

Some suitable relays (12V coil)
http://www.digikey.com/product-detail/en/1461069-5/PB1321-ND/3318145
http://www.digikey.com/product-detail/en/G5LE-1 DC12/Z1015-ND/280366

Diode for back EMF protection (one per relay)
http://www.digikey.com/product-detail/en/1N4001/1N4001FSCT-ND/1532742
 
Top