Go Down

Topic: 12vDC Sevromotor directional and speed control question (Read 1 time) previous topic - next topic

mixthetricks

Please see H-bridge drawing attached. Hi, I was wondering, instead of controlling my output (12v DC servomotor) with a potentiometer to control the speed and a switch (in this case a SPST switch "SW1") to control the direction. Could I simply "tell" the motor to run full speed for x number of revs/m and is there a counter to have it to stop and start say 5 times in X direction, then 5 times in the opposite direction. Thanks, Newbie

JimboZA

Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

mixthetricks

Lol,,, Hi Jim. sorry, yea got the lingo wrong again. But I want to use a servo for ease of directional control with the H-bridge

JimboZA

You don't use an h-bridge for a servo.... it's + and - are always connected to + and -, never reversed like with a dc motor.

A servo's movement is controlled by the signal on the third wire: for a normal servo, that signal sends it to a particular position between the 0 and 180 stops; for a continuous servo, that signal gives direction and speed, but with no positional control over how many revs it's done and where it stops.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

mixthetricks

So for the positional control I can use a photosensor to control the motor to stop. Can I do this X times, and after the nth time to go the opposite direction?

JimboZA


So for the positional control I can use a photosensor to control the motor to stop. Can I do this X times, and after the nth time to go the opposite direction?


In principle yeah, I guess so.... but LDR's are not fantastically excellent. If you expected it to, say, be on or off depending on a reflection from the poster being there or not, that won't be too reliable, and subject to ambient light. You'd be better off with something like one of these which has its own light source and is not distracted by ambient. You would need to make sure your poster had (say) a white spot it can rely on in a sea of dark as the marker.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

mixthetricks

Yes I seen that alright. But it has a Distance = 1mm from the poster. that too isnt very reliable either. Thing is, we've to use a servo motor for this project....hence the reason Im stuck with it :( Sorry for getting you to spell everything out here for me. First year engineering student. total green horn. So what you reckon is my best bet, baring in mind that a the posters would be white with black dots as appose to lining the length of each poster with a black strip with a gap at the end of everyone. You know what I mean. Im still up for the gmail or skype thing..... just typing....no phone calls or anything. i would put you under that kinda pressure ;)

JimboZA

I can't see how you'll use a servo to do what you want, not a "normal" one anyway, a "continuous" servo might work... but the motor you gave the specs of in your other thread, isn't a servo in the first place.

So, first thing you need to do is, say what model of servo you have to use, and then we'll see if we can take it from there.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0

Go Up