linuxworks
Member of the Trade: Sercona Audio
- Joined
- Oct 10, 2008
- Posts
- 3,456
- Likes
- 69
I've started doing some development on using motor pots as 'zoomable valuators'. what that means is that you'll be able to use a motorized single-gang linear pot as an input 'valuator' (level setter), grab the knob and turn it and the digitally controlled volume engine (PGA or whatever) will follow the user's hand. turn the knob and the volume goes up, etc.
the hard part that I'm still working on is having the motor 'catch up' if you now try to use the IR remote. that part is mostly working in my alpha test code but sometimes the motor fights you as you try to turn the pot and IT wants control over the pot. some tuning is needed but its mostly working right now.
its an evolution of the non-motor pot valuator code I wrote a few days ago. for those that want to use a regular linear non-motor pot for input-only, that works fine right now. for those that want to use MOTOR pots as input and output valuators, its almost ready.
note that I'm not really planning on using the pot to DO volume leveling; no analog signals will run thru the pot; the pot is there just for control purposes and to give the cpu another i/o device to show the current or desired volume level.
the tricky part was to try to detect when the user twisted the pot and not the system twisting its own pot (lol). for now, I settled on a mutex style arrangement where, if the pot is in motion due to the cpu itself moving it, the user is not allowed to grab it since the system is still 'in control'. however, once the pot has come to rest, control goes back to the user and he can grab and twist the pot and the system will 'listen' to that and not fight it. the new value from the manual pot twist is updated on the display and the new volume is 'set' and used.
then, if the user updates the value via the IR remote (a nudge up or down with the arrow keys) the system knows that the last input was via IR and not a 'twist' and so the system takes control again and zooms the pot over to that exact spot and then leaves it there. as you use the arrow keys and leave the knob alone, the knob zooms back and forth as the arrows are pressed up and down. even when you go into mute, the pot zooms down to zero. and as you switch inputs or outputs, it restores the last-used level for that input and the pot zooms to THAT location, too
this is a very experimental and very optional part of the LCDuino system but if you can get hold of a single gang linear motorized pot, it could be fun to play with and try to fine tune the code so that it works well enough to be production quality. for those that want a valuator input but don't need or care about the motor-pot part, the code is still in a state that it can use a non-motor single gang linear pot just as well.
I wasn't sure this idea was worth doing, but I now think it is
its kind of cute to have the physical pot always stay in step with the lcd bargraph display. and since the pot is just 'advice' to the cpu and not a real actual attenuator, even if it takes the pot a while to zoom over to the new location, the volume engine has no lag and it goes right to the user's vol setting even if the pot is a bit laggy in getting there
anyway, another progress update. the thing is becoming more and more usable with each week that goes by, even if I do say so myself
the chip hanging on the small perf board is the l293d h-bridge chip for motor control.
update: I added a short video-capture of the device, in motion:
http://www.netstuff.org/demo_vid/mot...r/P1000389.mp4
(from a pocket digicam in video mode; .mov converted to .mpeg4 format)
I'm using the IR remote to select between 2 output devices and each one has a 'last used' value that is stored. each output change causes the volume to be changed and this, in turn, causes the motor pot to 'catch up' or chase the value around. I also click up and down a little bit on the arrow keys to bump the volume up and down. the motor pot chases that value, too.
the hard part that I'm still working on is having the motor 'catch up' if you now try to use the IR remote. that part is mostly working in my alpha test code but sometimes the motor fights you as you try to turn the pot and IT wants control over the pot. some tuning is needed but its mostly working right now.
its an evolution of the non-motor pot valuator code I wrote a few days ago. for those that want to use a regular linear non-motor pot for input-only, that works fine right now. for those that want to use MOTOR pots as input and output valuators, its almost ready.
note that I'm not really planning on using the pot to DO volume leveling; no analog signals will run thru the pot; the pot is there just for control purposes and to give the cpu another i/o device to show the current or desired volume level.
the tricky part was to try to detect when the user twisted the pot and not the system twisting its own pot (lol). for now, I settled on a mutex style arrangement where, if the pot is in motion due to the cpu itself moving it, the user is not allowed to grab it since the system is still 'in control'. however, once the pot has come to rest, control goes back to the user and he can grab and twist the pot and the system will 'listen' to that and not fight it. the new value from the manual pot twist is updated on the display and the new volume is 'set' and used.
then, if the user updates the value via the IR remote (a nudge up or down with the arrow keys) the system knows that the last input was via IR and not a 'twist' and so the system takes control again and zooms the pot over to that exact spot and then leaves it there. as you use the arrow keys and leave the knob alone, the knob zooms back and forth as the arrows are pressed up and down. even when you go into mute, the pot zooms down to zero. and as you switch inputs or outputs, it restores the last-used level for that input and the pot zooms to THAT location, too
this is a very experimental and very optional part of the LCDuino system but if you can get hold of a single gang linear motorized pot, it could be fun to play with and try to fine tune the code so that it works well enough to be production quality. for those that want a valuator input but don't need or care about the motor-pot part, the code is still in a state that it can use a non-motor single gang linear pot just as well.
I wasn't sure this idea was worth doing, but I now think it is
anyway, another progress update. the thing is becoming more and more usable with each week that goes by, even if I do say so myself
the chip hanging on the small perf board is the l293d h-bridge chip for motor control.
update: I added a short video-capture of the device, in motion:
http://www.netstuff.org/demo_vid/mot...r/P1000389.mp4
(from a pocket digicam in video mode; .mov converted to .mpeg4 format)
I'm using the IR remote to select between 2 output devices and each one has a 'last used' value that is stored. each output change causes the volume to be changed and this, in turn, causes the motor pot to 'catch up' or chase the value around. I also click up and down a little bit on the arrow keys to bump the volume up and down. the motor pot chases that value, too.