HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Oct 01, 2008, 02:32 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
Discussion
how to convert PWM servo signal to DC voltage

hello everyone

i what to convert a normal servo signal or pulse to proportional DC voltage how can i do this ? some thing like a ramp generator with a proportional DC out for given pulse time or length in this case .8 msec to 2.2 msec!!

or is there any simple PWM SIGNAL TO DC CONVERTER CIRCUIT ?

please help and any info is appreciated !

thanks

sahil
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Sign up now
to remove ads between posts
Old Oct 01, 2008, 03:17 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
sorry for opening a new thread ! i found the answer all i need is integrator and S/
H circuit
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Old Oct 01, 2008, 03:19 AM
Registered User
vintage1's Avatar
East Anglia, UK
Joined Sep 2002
29,705 Posts
The trouble is there is no PRF standard..you probably want a two stage thing like a ramp up and a sample-and-hold to hold it.

It gets complex enough that a PIC is probably simpler and cheaper hardware wise.
vintage1 is offline Find More Posts by vintage1
Reply With Quote
Old Oct 02, 2008, 12:56 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
Quote:
The trouble is there is no PRF standard
.

is 50hz not the standard rate ? and how can i implement this using pic ?

thanks
sahil
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Old Oct 02, 2008, 03:08 AM
Registered User
AleG's Avatar
Bangkok
Joined Oct 2007
1,633 Posts
Quote:
Originally Posted by sahilkit
.

is 50hz not the standard rate ? and how can i implement this using pic ?

thanks
sahil
Disclaimer, I'm not a PIC user, I'm an AVR begginer.

Well, from a conceptual point of view you could feed the servo signal to a PIC input, and just measure how long the high pulse lasts without bothering with the overall frequency of the signal. Once you have a measurement of the pulse you could output the corresponding values to a digital potentiometer and leave it like that, or in turn use the pot to control a variable voltage regulator to change the voltage. I don't know if any PIC micro has inbuilt digital potentiometer or voltage regulator...
Another way, probably easier would be to use the pulse length to control the duty cycle of a PWM signal, then you should use a resistor and cap (at least) to even out the ups and downs and get a nice, constant voltage out of it.
AleG is offline Find More Posts by AleG
Reply With Quote
Old Oct 02, 2008, 03:51 AM
Registered User
vintage1's Avatar
East Anglia, UK
Joined Sep 2002
29,705 Posts
Quote:
Originally Posted by sahilkit
.

is 50hz not the standard rate ? and how can i implement this using pic ?

thanks
sahil
No. Many tx's will send the pulses and then add a fixed width sync pause, so PRF varies as the sticks do..

Conceptually how to do what you want in software is something like this.

Set up interrupt on level change on the input wire.

On level change
IF level is high, reset counter and start counting up.
ELSE transfer counter value to output memory location, scale as necessary, and write to DAC.

That's basically all you have to do.

The scaling and writing to DAC could be done in the main loop rather than interrupt, if preferred.

THE DAC output will be a series of constant voltage plateaux with steps marking the changes in input value to the unit. Cleverer software could smooth those out.
vintage1 is offline Find More Posts by vintage1
Reply With Quote
Old Oct 02, 2008, 04:08 AM
"MAYONNAISE"
Acetronics's Avatar
Le Treport, France
Joined Jun 2004
1,416 Posts
Hi, Sahil

http://www.sonelec-musique.com/image...nsion_001b.gif

Alain
Acetronics is offline Find More Posts by Acetronics
Reply With Quote
Old Oct 02, 2008, 11:46 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
hi alain

thanks for the circuit diagram, after a bit of searching i also found similar circuit diagrams ,both are from EDN !

1. http://www.edn.com/article/CA46255.html
2. http://www.edn.com/article/CA178105.html

the whole point of this exercise was to make a crude servo amplifier system in which i give the output DC voltage to another op-amp comparator circuit whose other pin is connected to the feedback pot and then give op-amp output to the motor directly ! ( small 1-2 gram servos something like the one proposed in the given link )

http://www.rcgroups.com/forums/showt...=160689&page=3

thanks for all the replys

sahil
sahilkit is offline Find More Posts by sahilkit
Last edited by sahilkit; Oct 02, 2008 at 12:17 PM.
Reply With Quote
Old Oct 02, 2008, 12:16 PM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
hi vintage1

Quote:
No. Many tx's will send the pulses and then add a fixed width sync pause, so PRF varies as the sticks do..
i was referring to the decoder output servo signal ! and if i'm not wrong ur talking about encoder output signal ?? so what i said about 50hz PRF is right or varies some what +- 10hz to 50hz ??

thanks

sahil
sahilkit is offline Find More Posts by sahilkit
Last edited by sahilkit; Oct 02, 2008 at 12:21 PM.
Reply With Quote
Old Oct 03, 2008, 08:35 PM
Registered User
Sanford, NC
Joined Apr 2007
78 Posts
50hz is correct (1-2ms pulse with 18 or ms pause), servos really are not all that picky about it by the way, as I have driven them to 100hz before they cooked and down in the 20hz range before there became any real noticable loss of force.

But yeah, with a pic measure pulse high time, interpret and mathmatically convert it to something usuable to output.
jppizhere is offline Find More Posts by jppizhere
Reply With Quote
Old Oct 04, 2008, 04:30 AM
Registered User
vintage1's Avatar
East Anglia, UK
Joined Sep 2002
29,705 Posts
Quote:
Originally Posted by sahilkit
hi vintage1



i was referring to the decoder output servo signal ! and if i'm not wrong ur talking about encoder output signal ?? so what i said about 50hz PRF is right or varies some what +- 10hz to 50hz ??

thanks

sahil
Its about 50Hz but there is no guarantee its any particular figure, nor that it will stay constant as the other channels are varied.
vintage1 is offline Find More Posts by vintage1
Reply With Quote
Old Oct 04, 2008, 05:54 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
okay got it ! thanks
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Old Oct 04, 2008, 04:41 PM
Just Keeping UP
United States, ID, Moyie Springs
Joined May 2004
1,773 Posts
I assume your circuit in post #8 is simplified? Without an 'H' bridge drive, you need a split +- power supply to run both directions. Std RC servos were that way about 40 years ago. Without some kind of dead-band allowance, the servo will oscillate terribly. In the end, you're redeveloping a linear servo amp which is available as a COTS product. You'll have the pleasure of doing it yourself, but at a higher cost and weight. Why not just scrounge a servo amp from a cheap servo? Even if you buy the servo new, you'll still save money.

Nick
nfhill is offline Find More Posts by nfhill
Reply With Quote
Old Oct 05, 2008, 02:29 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
Quote:
I assume your circuit in post #8 is simplified? Without an 'H' bridge drive, you need a split +- power supply to run both directions.
It is some what simplified diagram accept for few missing parts which can make it a full circuit diagram ! and as far as h-bridge , split power supply goes you don't need it because the op-amp i have selected is an audio amplifier rated 0.5 - 1 watt which is sufficient to drive the motor directly

Quote:
Std RC servos were that way about 40 years ago. Without some kind of dead-band allowance, the servo will oscillate terribly.
if u can set the gain of the op-amp properly u can reduce the oscillations to a minimum

Quote:
you're redeveloping a linear servo amp which is available as a COTS product. You'll have the pleasure of doing it yourself, but at a higher cost and weight. Why not just scrounge a servo amp from a cheap servo? Even if you buy the servo new, you'll still save money.
yes this is a linear servo amplifier ! and I'm doing it for fun (plus i wanting to do this for a while almost 4 years and now I'm at stage where i can realize it)

and nick as far as cost and weight go , if and when i mass produce this amp boards i this is doing to weigh .250 grams which includes gear box base , electronics-feed back pot and servo wire ! cost will be 1-2 $ if made in the 10000 batch range !

in hope i have answered all your question , i will post some pictures once i start making the actual servo

sahil
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Old Oct 05, 2008, 02:44 AM
sahil
United States, GA, Alpharetta
Joined Aug 2005
183 Posts
wow u guys have to check this out 12mm SMD rotational position sensor similar

to Murata SV01 in dimensions but weight 1/10th of it at 0.0321 grams

and digikey carries it

link to data sheet - see the physical characteristics

http://www.bourns.com/pdfs/3382.pdf
sahilkit is offline Find More Posts by sahilkit
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion How to adjust dc voltage Fishmasterdan DIY Electronics 17 Jan 28, 2007 07:43 PM
Discussion How to control a ESC by DC voltage(like from a potentiometer or microcontroller DAC)? dispatch DIY Electronics 1 Aug 10, 2006 04:55 PM
PWM to servo signal conversion? mcross DIY Electronics 13 Jul 05, 2005 09:48 PM
Tell me how to convert GP Kyosho cap232 to EP Hsin Liu Scale Kit/Scratch Built 9 Jun 20, 2001 09:02 AM
Glow to 400 speed How to convert Jaymz007 Electric Plane Talk 10 Jun 06, 2001 01:29 AM