The Godfather talking
You may crack software. How about me?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 14, 2024, 06:37:52 06:37


Login with username, password and session length


Pages: [1]
Print
Author Topic: rc model servo control from pc  (Read 4533 times)
0 Members and 1 Guest are viewing this topic.
hsny
Guest
« on: September 03, 2007, 09:09:25 21:09 »

I have a remote control . I want control from pc by 4 data bit over parallel port.One for forward,one for backward,one for left and one for right.
this rc remote not have push buttons for directions.It has two B5k pots that control servos.
I use uln2003(but not sure must I use)between parallel port and pots. I connect data pins to pots middle port. But  always servos turn only one direction.
Servos turn 1 ms for one direction and 2ms for another direction.
So if it has 0.5V for 1ms it must have 2*0.5=1V for 2ms.Is this true?
If its true how can I apply this to B5k pots?
Logged
edaudo
Junior Member
**
Offline Offline

Posts: 42

Thank You
-Given: 55
-Receive: 95


« Reply #1 on: September 16, 2007, 04:24:21 04:24 »

Hi,

I think that's not true. If you assume the pot is connected to a reference voltage and GND and gives a voltage at the middle contact, your calculation might be right, but it depends on how the circuit is designed and works. The pot can be part of a RC time giving circuit, it might float over ground or lie in the loopback of an OPamp, therefor you cannot simply assume a GND referenced DC voltage of level 'A' will make the servo move right and a voltage of level 'B' will make it move left. If it is an analog circuit it is probably that you shortcut (disable) the RC timer by pulling the middle connector to GND, the time constant of the circuit will be reduced to the lowest value possible and that makes your servo move in one direction only - but as result of an error not as a result of applying the right voltage level.

You need to further analyze the circuit to understand what the right solution might be. Replacing the pots with digital types in any way should work but isn't cheap at all.

edaudo
Logged
user112
Junior Member
**
Offline Offline

Posts: 85

Thank You
-Given: 6
-Receive: 139


Salut tuturor(hello to all)


« Reply #2 on: September 16, 2007, 10:56:33 10:56 »

you can try to implement a litle motor to  pots I see this in an old radio( for volum control)
Logged
hsny
Guest
« Reply #3 on: September 17, 2007, 02:20:08 14:20 »

edaudo, this was a good explanation.thank you very much...
As you say it doesnt work.but in the rc remote there was two reverse buttons of each directions(one for forward/back one for left/right). I use these buttons with extra data pins of parallel port.
But now I want to turn servos proportional from pc.I cant do this with pots.Each time it turns left/right fully.
Is there any example of digital pot? how can I get proportional turning?

Implementing a little motor to pots seems a good idea but not useful for me.
Logged
user112
Junior Member
**
Offline Offline

Posts: 85

Thank You
-Given: 6
-Receive: 139


Salut tuturor(hello to all)


« Reply #4 on: September 17, 2007, 03:07:57 15:07 »

look DS1267 dual digital pots it is also in Proteus library sow you can simulate but has serial comunication
http://pdfserv.maxim-ic.com/en/ds/DS1267.pdf  I d'ont know if you can find chips for paralel programming
here Parallel Port Controller http://electronics-diy.com/parallel_port_controller.php
Controlling Stepper Motor with a Parallel Port http://electronics-diy.com/stepper_motors.php
if you want something to bay http://www.analog.com/Analog_Root/static/pdf/techSupport/AD5273_Eval_Board_User_Manual_Rev_A.pdf
or something i think good digital pots contriled with push button you can use a transistor comended on paralel port instead http://pdfserv.maxim-ic.com/en/ds/DS1802.pdf
Logged
frasenci
Translator
Active Member
***
Offline Offline

Posts: 171

Thank You
-Given: 142
-Receive: 84


« Reply #5 on: September 17, 2007, 08:05:41 20:05 »

I want to help you guys , lets see if I can make myself clear :

To operate an standard RC Servo you need 3 connections , look at the servo wires :

1.- Red wire for power ( up to 6 Volt DC )
2.- Black wire for ground ( common ground with Battery and any other control circuit )
3.- White ( or yellow ) wire for pulse control.

The servo itself contains an electronic circuit wich will control the servo actuating motor according to THE LENGHT of the pulse received on White wire . Attention to this.
Furthermore , the electronics INSIDE of all this type of servos , needs this pulse ( pulse length ) to be updated at an standard frequency , normaly 50 Hz , that is every 20 ms (ms =  miliseconds ).

Ok.

We need a device that sends EVERY 20 ms , a pulse of a certain length .

The length of this pulse is standarized too , from 1 to 2 ms lenght.


EVERY 20 ms a pulse of 1 to 2 ms in length ( can bee rising ord falling edge ) depends on radio system.
( If you take more time for repeating the pulse , the servo will jitter about ,.... )

The varying LENGTH of the PULSE will deflect the servo arm in one or other direction , beeing Center at 1.5 ms length.

All this can be accomplished with an programed CPU like PIC for example , or if you want to use a simpler way and use Potentiometer  with an 555 timer IC , with output to the servo pulse wire.

Normal Voltage for pulses are up to 6 Volt n.

Thats it.

If you could hook an Occilloscope to the signal of the transmitter of your remote control system you could see that all it transmits is a " train " of pulses that repeats every 20 ms. This " pulse train " contains the pulses ( and its lengths ) for every chanell ..... ( And that is the way all those channels are coded into a single radio signal,... heee ).


Greetings
Francisco


 
Logged
edaudo
Junior Member
**
Offline Offline

Posts: 42

Thank You
-Given: 55
-Receive: 95


« Reply #6 on: September 18, 2007, 07:59:14 19:59 »

Hi hsny,

let's take a look at the resitor (the potentiometer) it's a passive component, you put it in your circuit and wherever you put it, by its properties, it controls the current that flows through regardless whether you swap the pins or whatever other component or level it is connected to, its function is definde by Ohms Law, not more, not less.

The BJT (bipolar junction transistor) is an active component, it needs an additional control signal to tell the BJT what to do and the BJT has a polarity. There are several conditions in which range the voltage levels of B-C-E and the currents C-E and B-E must be for a desired function.

Besides somewhat complex linear operation it's quite easy to make the BJT switch, nevertheless it does not behave like a mechanical switch.

To your ULN200x, the integrated BJTs are of NPN type therefor it only works as a switch if C is on higher level than E and the level at B is at least 0.7 Volts higher than the level at E. As E is tied to GND you can only pull a higher level to GND. If you replace a switch that was designed to do the same, the transitor switch will function as the mechanical switch did before. But if you replace a switch that was designed to switch a node of the circuit to a higher level e.g. VCC your attempt fails.

If you want the BJT to be a variable current controller (same as the potentiometer), you need to apply variable current at the base, you can only get analog output from analog input.

If you don't have a schematic and don't really know how the circuit works, it might be best to repace switches with integrated analog switches(e.g. CD4066) and potentiometers with either digital potentiometers or a switched resistor network.

The DS1267 is nice, but it useses serial communication, good if you have a MCU or serial port or USB-to-serial converter, Maxim has 2-wire devices too and an application note how to use the parallel port to control these devices.


App Note 3230
How to Use a PC's Parallel Port to Communicate with 2-Wire Devices
h**p://pdfserv.maxim-ic.com/en/an/AN3230.pdf


Finally it is a question if you need the RC transmitter or not and if you specially need the transmitter you already have or not.

edaudo
Logged
hsny
Guest
« Reply #7 on: September 19, 2007, 06:05:55 18:05 »

Hi edaudo,
thanks for your replies.
Actually I dont want to remove pots.I cant trust the other pots work like I want.and I dont know about digital pots at all.
So I tried to have variable voltages from just data pins.I use visual basic.And just D0-D1 pins for 2 bit r-2r dac(r=1k,2r=2k) input pins and connect its output one of the pots middle pin.remove the uln2003.
When I write code
Out &H378,1  D0 on and has 2,3V - dac output 0,82V
Out &H378,2 - D1 on and it has 2,24V -dac output 1,64V
Out &H378,3- D0 and D1 on -dac output 2,48V
Without connecting remote controller to these,I get in the middle position 2,54V-max 2,89V-min 2,19 V from pot.
A friend suggested the coming voltage from dac output to pots middle pin must be between 2,89V-2,19V.And if I dont want remove pots,must use buffer with output and pot.Is these suggestions right?How can these voltage levels turn proportional?And why must I use buffer?

sorry but I cant understand last sentence exactly from my poor English:"Finally it is a question if you need the RC transmitter or not and if you specially need the transmitter you already have or not."

greetings
hsny
« Last Edit: September 21, 2007, 01:10:24 13:10 by hsny » Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC