Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with motor position feedback

Status
Not open for further replies.

MathGeek

New Member
I made a similar thread in Microcontroller section, but I think the thread should be in Robotics.


So, my small walker robot uses a gearhead pager motor. I need some sort of feedback mechanism so that I know which position the motor is at, so that I know which position the leg is at.

Do you have any idea? I first thought of using trimpots, but lifetime is also a issue, as small trimpots don't last as long.
 
THen don't use trimpots...use regular pots. Trim pots are for very infrequent equipment calibration and as such are DESIGNED to have short lifecycles.

Plus they are hard to mount to anything because they have no shaft and their dial is embedded to prevent accidental calibration changes.
 
Last edited:
IN small robots, with present day technology, lots of things get sacrificed when making tiny robots...perhaps you have to make one here. How accurate do you need leg positioning? It is more likely that you just need to know when the joint has reached it's rotational boundaries. Perhaps a switch on each extreme of the joint so that the robot just knows when to stop or reverse motor direction- just enough to be able to walk. You won't have fine motor control, but it may be a sacrifice you have to make.

How small a pot do you need? This is 1cm, 10 thousand cycles pot:
**broken link removed**
Try looking at specialty manufacturers like Vishay instead of general suppliers like Digikey. Probably not as cheap as you would like though and you may need to get it from the manufacturer (Vishay tells me they sell direct in low quantities for many items, you probably need a few anyways depending on how many DOF your legs have.)

Here are some FAR OUTdeas:
Ever heard of fiber optic whiskers? Read up on it...Now that you have read about it, perhaps you can go beyond simply determining whether or not the photo-sensor output is "not normal" as is used in crash detection...just maybe, just maybe perhaps the readings from the photo-receiver roughly indicate the joint's position...Oh yeah, fiber optic wire might not be able to bend as sharply as you would like it to...but it's a start. Perhaps you can mount the fiber in an unconventional position with respect to the join.

Perhaps you can find a tiny resistive flex sensor. This would save you BUTTLOADS of space and would be the perfect solution...if you can get it to work. Actually, it's really easy to get it to work. You just need to form a resistive divdier with the a fixed resistor and the flex resistor across the uC power supply and read it with an ADC. THe hardest part by far is finding a flex sensor that small. I have only ever seen one kind for sale no matter where I look...and it's pretty big.

Maybe use conductive foam at the joint to form a pressure sensor that change resistance as the leg bends to compress the foam thereby changing resistance...although it seems very little foam would be used because of the joint size and force from the mtor required for compression of the foam. The small amount of foam used may make it only have very small resistance changes.

You might notice all these ideas have less to do with the motor position and more to do with the position of the actual leg...mainly because I can't think of anything simple and small enough to work with a tiny motor.
 
Last edited:
Yes, the position of the leg is the main point. That is all I need to know.


The pot that you linked is perfect. I will look for that for something similar.

Do you need ADC to read the resistance? The only uC I have is 16F628(A), which to my knowledge does not have ADC.

Edit: Is there a way to read values of capacitance with PIC 16F628? It is very easy to make a touch sensor that changes capacitance as it is pressed.
 
Last edited:
Well...pretty much you need an ADC to read resistance...how were you planning to use a pot without an ADC?
 
There are plenty of app notes on the Microchip website about using a RC timing circuit to read a resistance value. The general idea is to switch a pin to output to charge a cap, then watch the pot discharge the cap after switching the pin back into input mode.

Capacitance is a bit trickier - I think you might be able to use some circuits from https://www.qprox.com/ but most other capacitive solutions are pretty big/complex.

Oh, I just took a look at the prev. thread and remembered something - small surplus trackball

https://www.goldmine-elec-products.com/prodinfo.asp?number=G5514

I actually have some of these (from when I bought them ... *7* years ago...), and there are a pair of dinky codewheels with probably 30 or so spokes.
 
Last edited:
so far, opto interrupter is my best bet. I have them with me now, so it is easy for me to experiment.

I think I can make some custom slotted wheels using plastic and paint.

BTW, How would you measure voltage?
 
Last edited:
hjames said:
There are plenty of app notes on the Microchip website about using a RC timing circuit to read a resistance value. The general idea is to switch a pin to output to charge a cap, then watch the pot discharge the cap after switching the pin back into input mode.

Or my joystick tutorial I mentioned earlier in the thread?.

Capacitance is a bit trickier - I think you might be able to use some circuits from https://www.qprox.com/ but most other capacitive solutions are pretty big/complex.

It's no different, you can use the same capacitor charging technique as you use to read a resistor - it makes no difference which is variable, as long as the capacitor is a reasonable value?. Failing that, use it as the timing cap in a 555 oscillator, and measure it's frequency!.
 
Nigel Goodwin said:
It's no different, you can use the same capacitor charging technique as you use to read a resistor - it makes no difference which is variable, as long as the capacitor is a reasonable value?. Failing that, use it as the timing cap in a 555 oscillator, and measure it's frequency!.

The qprox and other sensors like that deal with capacitance changes in the pF/sub-pF range, so things get kinda tricky - synchonous demodulation and guard shields are required.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top