07-20-2009 07:39 AM
Ok, I have a project coming up soon, for which I need to be able to fully control an HS-422 hobby servo from LabView through a USB-6008 DAQ for my control theory class. After spending all night browsing around the web and testing out different VI's for software-generated square pulses(since the 6008 doesn't have a counter output port), i called it quits, and realized that I'll never get the pulse resolution I need to control a servo with a software counter.
There is another option for this, and it's using a not-so-complicated 555 timer circuit I found around the web which controls a servo through the moving of a potentiometer. However, I still need to be able to control this servo though labview, and from there comes my question:
Is there a way to simulate the operation of a potentiometer through a 6008 DAQ and a LabView VI? That way, I could design a VI with a knob on it, which would be doing the function of the potentiometer in the circuit and would effectively let me control the servo through LabView.
Thanks in advance,
Greetings from Panama
07-20-2009 09:38 AM
xDFA,
Can you post a .PNG of the schematic for 555 circuit you want to use?
07-20-2009 10:17 AM - edited 07-20-2009 10:20 AM
Of course, I will be using this schematic:
which is described in http://www.geocities.com/bourbonstreet/3220/servobasics.html
The thing is, I have no idea how to wire up this circuit to "replace" the potentiometer for the DAQ. Any suggestions? is this even doable? Seems way more possible than generating the pulse a servo requires through a software timer
07-20-2009 10:29 AM
xDFA,
P1 is being used to control how fast C1 is charged. I don't see how you could just replace the pot with a DAQ device. I could see maybe using a digital potentiometer http://www.maxim-ic.com/products/digi_pot/ that was controlled by the outputs of a DAQ device.
07-20-2009 10:40 AM
What if I calculated the subsequent voltage drop across the potentiometer vs its resistance value, and set up a LabView VI that would generate said voltage drop accordingly?
07-20-2009 10:44 AM
07-20-2009 12:01 PM
Oh snap... Thanks alot for the input!
Do you by chance have any other idea as to how I could control the pulses through a 6008DAQ? I live in Panama, and digital potentiometers will prove to be a challenge to acquire. And the project is too close to order online
07-21-2009 07:35 AM - edited 07-21-2009 07:35 AM
xDFA,
Best I can come up with is this. I've forgotten a lot of my analog theory, but I think this would work.
Build up a circuit that can generate a ramp waveform at your required frequency. Use a compartor circuit to comare the ramp with an analog output from your DAQ. If done right, the higher the voltage from DAQ, the narrower the pulse on comparitor output. Here is link to similar circuit. Note that in this case the pot can be replaced by a voltage source such as a DAQ. You may need to buffer it.
I suppose I should actually include the link I promised. http://www.maxim-ic.com/appnotes.cfm/an_pk/1960