PDA

View Full Version : Motor Speed Control via Single Poteniometer?



RossWaddell
- 7th May 2012, 17:48
This may sound crazy, but ... I have a project in which I'd like to control the speed of a motor with a single potentiometer-type device which acts more like a volume control on a modern stereo (i.e. there is no 'stop' at either end since the volume on a stereo/AVR can be controlled by a remote). There would be another button (momentary) which would reset the motor speed to a set default value, and then turning the potentiometer-type device CCW would slow it down while turning it CW would speed it up. At any time if the user pushes the momentary button the motor speed would be set to the default, where the user could then speed up/slow down the motor as they wished.

Is that possible? I haven't even found the potentiometer-type device yet but if I did would anyone be aware of some PBP code examples?

RossWaddell
- 7th May 2012, 17:53
Is it an encoder like this (http://www.mouser.com/ProductDetail/Bourns/3315C-125-016L/?qs=%2fALxmKEvhOIlvVr1IHwYnbPfpbickDjA4BtesCHl8E4% 3d)that is what sits behind modern stereo volume controls?

mister_e
- 8th May 2012, 12:51
Most new sound systems indeed use rotary encoder, mechanical or optical, like the one you linked to. Some also have push switch on their shaft. You see them on car radio, MIDI controllers, mixing consoles, etc etc. Really handy piece of hardware, specially for surfing in a menu...

RossWaddell
- 8th May 2012, 16:15
Based on another example I've order this (http://search.digikey.com/scripts/DkSearch/dksus.dll?x=0&y=0&lang=en&site=us&KeyWords=GH3071-ND)encoder. As far as wiring up to a PIC goes, does this schematic look right?

6476

aratti
- 9th May 2012, 06:07
Yes, the wiring is correct. You could use the code snip given @ http://www.picbasic.co.uk/forum/showthread.php?t=12911
to start counting your encoder pulses.

Cheers

Al.