View Full Version : Simple Joystick to Servo Circuit?
Terrormaster
02-21-2009, 06:21 PM
I'm looking for help from the electronics guru's here in creating a very simple control circuit for servo's without using a microcontroller.
I know I'm gonna need to set up a 555 timer to send the pulses to the servo to move it. What I wanna do is take it a step up.
Essentially the servo would stay at the center 90 degree position. If input switch 1 is closed the servo moves to the 0 or lowest degree position. If input switch 2 is closed the servo moves to the 180 or highest degree position. Basically functioning like a left/right joystick input.
My only problem is what would happen if a situation were possible (based on the type of switch attached) that both switches are closed at the same time. I would imagine some sort of logic in the circuit would be needed to keep the servo at 90 degrees.
Any help would greatly be appreciated.
Thanks,
-TM
bradbaum
02-21-2009, 06:47 PM
The easiest way to do this would probally be with a PROP-1
Just tie the four switches on the joystick to input ports and then drive the servo with an output port.
You could also look at the PICAXE chip
Terrormaster
02-21-2009, 10:32 PM
I want to do this WITHOUT a microcontroller involved.
What I'm thinking of is using a standard servo control circuit such as the one used by Ahmet Onat (http://www.geocities.com/BourbonStreet/3220/servobasics.html) and replacing the 10k pot (P1) with a digital pot that has pushbutton control such as the Dallas DS1669 or Intersil 9511.
What I'm trying to do tie in a pushbutton type controller such as the Midify (yes I'm fired up that board) or other source to a simple device that will in the end be totally controller independent.
I really like the Intersil 9511 but I'm having trouble finding anyone that sells it, may be too new. I know that JameCo doesn't have it in their Intersil stock and AllElectronic doesn't carry any DCP's (Digitally Controlled Potentiometers) that I'm aware of.
EDIT: Found some on DigiKey, $3.04/ea
The Dallas DCP looks pretty comparable function wise but it's amost 7 bucks a chip.
-TM
Scottzilla
02-22-2009, 01:40 AM
Have you thought about using that 555 circuit you linked to but instead of the pot hook up your joystick so that it switches in different resistors? Or if you had an analog joystick it will have pots built in and it could be a direct replacement for the pot in the circuit.
If you want to move it using digital control signals you could get one of those analog switch ICs and use it to switch different resistors into place.
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=CD4066BCN-ND
That one's only 45 cents.
Terrormaster
02-22-2009, 06:56 AM
Ultimately I wouldn't be moving it with a joystick per se but actually with the Midify. But I want build the interface open-ended so that if I later wanted to use a different control mechanism other than the Midify I wouldn't loose the vested interest in the board. Think push-buttom volume control.
Now imagine such a device wired to the Midify and a skull mounted to a pan/tilt servo kit. On your MIDI keyboard controller D and D# would pan the skull left and right while E and E# would tilt the skull up and down.
I'll probably order some parts soon as I'm done working up the schematic and play with it to see if I get the desired effect.
If not, then I will look into a simple microcontroller. The idea is to build a modular board that's extremely cost effective without the dependency on an existing controller board product yet is completely independent in function and can be controlled by anything or anyone novice or pro.
-TM
Sickie Ickie
02-22-2009, 08:54 AM
psssst. It would have to be E/F, since there is no E# on the keyboard. :p
bradbaum
02-22-2009, 10:12 AM
Have you thought about using that 555 circuit you linked to but instead of the pot hook up your joystick so that it switches in different resistors? Or if you had an analog joystick it will have pots built in and it could be a direct replacement for the pot in the circuit.
I was thinking about that last night, but couldn't get around the fact that the buttons would need to be interlocked or latched. so that means adding flipflops to the circuit. by the time you add the flip flops you might as well just use a PIC.
Terrormaster
02-22-2009, 03:38 PM
Okies, got my schematic whipped up. Can any of you super electronics guys (Otaku, Morbius, etc.) take a look and see if my logic is sound based on what I want to do?
http://necropolismanor.com/thegallery/tm-btn-servo-dvr.gif
Probably gonna order parts soon.
The next step will be to reverse the button setup. Currently the way the ISL9511 is designed you have to pull pins 1 or 2 low to utilize the buttons. What I want to do is control those buttons from an external source that's coming in high instead of low. I'm thinking either a transistor to reverse the polarity or the easy way out by using a relay.
Any additional help would be great.
Thanks,
-TM
hpropman
02-22-2009, 08:52 PM
Terror master after reading the data sheet for the 9511 it looks like you you have it connected correctly. That seems to be a nice chip I will have to order a few to play with. they do not need pull up resistors on the inputs and the longer you hold the inputs the faster the wiper moves up or down changing the resistance. It should do exactly what you need. Also remember to place the cap on the 9511 as close to the power pins as possible to avoid noise and strange chip behavior. BTW what is your aversion to microcontrollers they make everything so much easier and simpler. They are very easy to use. I can help get started with them if you want to learn.
Terrormaster
02-22-2009, 10:26 PM
Terror master after reading the data sheet for the 9511 it looks like you you have it connected correctly. That seems to be a nice chip I will have to order a few to play with. they do not need pull resistors on the inputs and the longer you hold the inputs the faster the wiper moves up or down changing the resistance. It should do exactly what you need. Also remember to place the cap on the 9511 as close to the power pins as possible to avoid noise and strange chip behavior. BTW what is your aversion to microcontrollers they make everything so much easier and simpler. They are very easy to use. I can help get started with them if you want to learn.
Thanks HP, probably gonna order tonight or tomorrow, just gotta finish sourcing the rest of the parts. Yeah that chip was pretty cool and I had no idea it existed. Just thought about what concept might work best, did a search and stumbled upon it. I think that there's a lot that can be done with it here in our community in the right hands.
As for microprocessors, no aversion whatsoever - I AM a software engineer hehe. This project though is only a small part of a larger whole which once all the testing and prototyping is done I'll reveal more. I will say this, my ultimate goal involves making it easy as plug-n-play to switch out components between props and projects for myself and perhaps others ;-)
Was wondering though, if I use a 2N2222 transistor would I be able to flip the low pull on pins 1 and 2 to a high pull?
Here's my initial thoughts on wiring that way:
Base to switch, switch to pin 8;
Collector to pin 1;
Emitter to ground.
Wondering if that would work the way I think it would, it's just basic transistor switch logic right? In the final the base would be connected to an external input source that fed the high signal in instead of to a switch and pin 8.
-TM
hpropman
02-22-2009, 11:32 PM
Yes that is correct. I would put the emitter to pin 1 and the collector to ground. It will work your way also because the transistor is acting as a switch. In most circuits or books the emitter is normally the output. once you verify operation with the switch the midify board output will work fine if outputting a high. If the midify is outputting a low then drop the transistors. you can also use an inverter chip such as (74AC14N) but if you are only using the two inputs I would stay with the transistors. sound like an interesting project if you want some help with the design pm or email me. I would be glad to help. No strings.
How about using a kit 102, which is 4 servo controller and substuting the analog pots for digital ones.
http://www.circuitspecialists.com/prod.itml/icOid/6361
4nntt
03-11-2009, 10:42 AM
Does anyone know of a good source for potentiometer joysticks?
hpropman
03-11-2009, 11:25 AM
Yes Happ controls sells them, also Amamzon and Ebay have them as well.
Here is the Happ link:
http://www.happcontrols.com/joysticks/joysticks_amusement.htm
Terrormaster
03-11-2009, 07:02 PM
Man got all my parts together except the PICAXE - Ordered from HVW cause their prices were a little cheaper than Sparkfun - but man are they sloooooooooooooooooowwwwww...
Also did some redesigning and I have another kewl wicked awesome idea brewing for the PICAXE in vein of a keybanger but unlike anything we've seen so far. I'll save that for another topic. HP I might need some help on that one in regards bit-banging via SPI to an EEPROM, having trouble finding working examples of code.
JonnyMac
03-11-2009, 07:08 PM
Having recently designed a commercial Touch Controller(tm) using an SX chip I will be watching with interest. My life has been in product development and I'm always excited to see what others come up with.
Here's my design (I did the circuit and code, my business partner the PCB layout and manufacturing); will show at Transworld and be in production soon:
-- http://www.efx-tek.com/php/smf/index.php?topic=994.0
I've not played with the PICAXE because I spend so much time with the SX chip; it looks enticing, though, and being a PBASIC copy-cat I'm sure I wouldn't have any trouble with it. Maybe I should buy a couple to play with....
Hopefully the PICAXE will allow you some sort of interrupt construction so you can have precise timing during recording and playback. If you can create a timer using an interrupt the rest of the process becomes fairly straightforward -- accessing an I2C EEPROM is a breeze. In my case I have to do a bit of trickery during the record cycle as I have to read the present show data, mask out the selected channel, apply the new data (based on RECORD button), then write that to the outputs and back to the EEPROM. This is where having a background timer helps; you wait for the timer to say "time to go!", do your thing, then wait for the timer again. I use 33ms (30fps) timer so there's plenty of time to do the read, mask, modify, write-back cycle.
The SX is like a very fast PIC so I'm using the ISR to do other things, including managing a bi-color LED (color and flashing are handled in the ISR) and serial IO buffering.
Again, I'm looking forward to see what you come up with using a PICAXE.
hpropman
03-12-2009, 01:50 PM
Looks like we have some work to do TM. I have not played with SPI yet but the picaxe has a great support forum and any trouble we can get into I am sure can be worked out on the forum. Time to do some reading and see what what we can do with the picaxe. We may have to go the 28x1 chip. Johhny will be watching us so lets see if we can can make him proud of us. Johnny thank you for your candid sharing of information you have always been there to support the haunting community.
JonnyMac
03-12-2009, 02:24 PM
Well, you know that if you decide not to roll-your-own you can always buy an EZ-8 and reprogram it (you'll need an SX-Key or SX-Blitz). While we can't -- for obvious reasons -- divulge the full source for the EZ-8, I can give you all the core routines which include I2C EEPROM access, buffered serial communications, input debouncing, and bi-color LED control.
FWIW, most of the EZ-8 is written in SX/B, a free BASIC compiler from Parallax (I helped create it when I worked there and continue as part of the development team). There is Assembly mixed in to handle time-critical processes (e.g., frame timing, serial, LED modulation), but that stuff is pre-written and you don't have to understand it to use it.
Going the PICAXE route... while you can find SPI EEPROMs the more common interface is I2C. I don't know enough about the PICAXE to know if it supports I2C but would be a surprise to me if it didn't. The only concern I have is the lack of true interrupts. If I understand the PICAXE it's like a BASIC Stamp (uses tokens) but is a little faster because the tokens reside internally instead of externally (in an I2C EEPROM!) in the case of the Stamp. If it uses "polled interrupts" like the BS2p series this may not give you repeatable timing which makes doing this kind of project a little tricky.
Good luck and have fun!
Terrormaster
03-15-2009, 11:59 PM
Woohoo! I got the button servo controller working with the PICAXE and I must say I'm happy indeed. The circuit was pretty simple to build, the PICAXE easy to setup and work with, and PIC Basic was a breeze to pick up (well, having 20 years+ of BASIC programming experience did make the transition easy).
I just wanted to say MUCH MUCH thanks to HPROPMAN for turning me on to the PICAXE chip. Programming something that can affect things in the physical world and not just on the screen has been far more rewarding that the last 10 years of web design and application development.
JM, thanks again for sharing and being candid about some of the inner workings of your new board (well, as much as legally possible without me having to sign an NDA). It's been much appreciated and the insight very helpful. In retrospec I've learned that the PICAXE series has an EXCELLENT I2C interface which they've abstracted lovely into three simple instructions and by far is WAY easier and more powerful than SPI (which PICAXE does not support natively so I'd be eating valuable bytes of programming memory in implementation).
Thanks again everyone for all your help and support.
-TM
hpropman
03-16-2009, 11:08 AM
I predict many great projects ahead with the picaxe even for those who are electronics challenged. Good Job TM. Looking forward to see what you do next.
bradbaum
03-16-2009, 02:29 PM
I bought a picaxe chip recently and was impressed with it as well, I particularly liked the simulation feature in the programming interface.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.