View Full Version : Discussion Need help with rc system
fm_head
Aug 16, 2008, 03:43 AM
Hello,
I am trying to build an AM rc system for my self. Can some body help me out. I have attached two waveforms that i get from my encoder and the other one is the output of the receiver, are they correct?? will a ppm decoder be able to decode this signal??
thanks!
P.S. sorry for the bad english
robin andrew
Aug 16, 2008, 04:12 AM
looks pefectly OK to me, Robin Anbdrew, UK
KEEP up the good work
phil_g
Aug 16, 2008, 05:11 AM
Is the rx output generated from this decoder as the rx pulse widths seem different to the encoder output - maybe I'm misreading the scope settings.
The pulse train looks fine, I assume this feeds a slicer to square-up the rx pulses before they are fed to the decoder (maybe a comparator or schmitt-trigger?)
Just as a matter of interest, I wonder why only 3 channels and what you are using for RF?
Good luck
Phil
fm_head
Aug 16, 2008, 05:20 AM
looks pefectly OK to me, Robin Anbdrew, UK
KEEP up the good work
Thanks a lot!
fm_head
Aug 16, 2008, 05:30 AM
Is the rx output generated from this decoder as the rx pulse widths seem different to the encoder output - maybe I'm misreading the scope settings.
The pulse train looks fine, I assume this feeds a slicer to square-up the rx pulses before they are fed to the decoder (maybe a comparator or schmitt-trigger?)
Just as a matter of interest, I wonder why only 3 channels and what you are using for RF?
Good luck
Phil
Yes the scope settings were different for the two readings. But I dont understand, if everything is fine then when i connect the servos to the decoder they start moving on their own (I can even feel them vibrate upon touching the outer case). I am building a rc system for the first time so to make it less complex i used a three channel encoder, i will expand for more channels once i perfect this. I will mention again the scope readings are for the rec o/p which will be fed to the decoder. will a schmitt trigger help here and i am using a RF circuit similar to the one in the tx2/rx2 ic datasheet (ones used for toy car).do u think the signal at the o/p needs conditioning and amplification? if so how do i achieve this??
thanks!
P.S. i am using a superregen rec on 27mhz.
phil_g
Aug 16, 2008, 06:42 AM
I think perhaps your channel timing is too long, so the servos could jammed at one end of their travel, maybe stalled against the stop. This would account for the vibration & jittering.
Looking at your second trace, channel one seems to read 2ms, channel 2 reads 2.5ms and channel 3 reads nearly 3 ms. Over 2ms is too long for standard servos. At rest with the controls at centre I would expect to see 1.5ms spacings between the pulses, with the controls changing the spacing by half a ms either direction.
The other possibity is that your decoder isnt clocking cleanly from the rx output. Is is a shift-register or a processor? The rx output as shown in your second trace isnt clean enough to drive the decoder directly, it will need to be squared. PICs have schmitt-trigger inputs, if your decoder is a different processor maybe you could see if that is an option for inputs. Otherwise say a cmos 4093 between the rx & decoder?
Super-regen is an unusual choice of receiver, is 27mhz fairly quiet in your locality?
Cheers
Phil
fm_head
Aug 16, 2008, 11:33 AM
I am using a 4017 encoder for my system. I would like to diagnose the problem step by step. I am attaching the waveforms for different pot positions (1ms,1.5ms,2ms and then the 20 ms delay) This is standard for any rc system right?? .If these waveforms (at encoder output) are correct then tell me i will take the output at the receiver end and compare that way I will be able to find out the problem. I am using a superregen because i am learning and this is my first system. I am studying communication techniques at engineering college so I thought that this would be a good exercise for me and i also wanted to build my own rc system.
thanks!
phil_g
Aug 16, 2008, 11:38 AM
Thats perfect. However the RX output (in your first post) shows different timing - how is this possible? :)
Phil
fm_head
Aug 16, 2008, 11:42 AM
I think perhaps your channel timing is too long, so the servos could jammed at one end of their travel, maybe stalled against the stop. This would account for the vibration & jittering.
Looking at your second trace, channel one seems to read 2ms, channel 2 reads 2.5ms and channel 3 reads nearly 3 ms. Over 2ms is too long for standard servos. At rest with the controls at centre I would expect to see 1.5ms spacings between the pulses, with the controls changing the spacing by half a ms either direction.
The other possibity is that your decoder isnt clocking cleanly from the rx output. Is is a shift-register or a processor? The rx output as shown in your second trace isnt clean enough to drive the decoder directly, it will need to be squared. PICs have schmitt-trigger inputs, if your decoder is a different processor maybe you could see if that is an option for inputs. Otherwise say a cmos 4093 between the rx & decoder?
Super-regen is an unusual choice of receiver, is 27mhz fairly quiet in your locality?
Cheers
Phil
The decoder I am using is the 4 channel PIC version on bruce abbot's web site. There are not many fliers where I stay and 27mhz is free freq. Please explain in a littel detail how to square and amplify the pulses at the rec o/p. and can I use an audio amp (lm386) to amplify the signal before giving it to the decoder??
thanks!
fm_head
Aug 16, 2008, 11:43 AM
Thats perfect. However the RX output (in your first post) shows different timing - how is this possible? :)
Phil
Thanks phill, these were new readings I just took. I will take new o/p readings from the receiver for the same pot positions and compare.I will post the wave forms in some time.
thanks!
phil_g
Aug 16, 2008, 11:50 AM
Sorry I was editing my post as you replied. See my previous post with the rx timing query!
Will look at new traces when you're ready!
Cheers
Phil
fm_head
Aug 16, 2008, 01:37 PM
phil,here are the receiver outputs for 1ms,1.5ms,2ms and 20ms delay. They correspond to the encoder outputs posted before .Are they correct ? If so what signal conditioning will be required for feeding these pulses to the decoder?
thanks!
fm_head
Aug 16, 2008, 01:45 PM
sorry,forgot this one!!
phil_g
Aug 16, 2008, 03:10 PM
Thats better, the channel timing is spot on.
You need to get rid of the underlying capacitive voltage effect, it looks like the negative-going pulses are only about a volt superimposed on that curve. I'd try just a pull-up first, say 10k then 1k, just to see if the output can be cleaned easily, as it could be just a high impedance floating voltage that will disappear when even a small load is applied.
If not I'd suggest a comparator set to just above the minimum voltage of the negative peaks. Is the test point connected to the decoder when you take these traces? If not, try that, the decoder input may load it sufficiently to discharge that capacitance.
The pic can optionally have a weak pull-up programmed on pin 4, I'm not sure if Bruce implemented that. Unfortunately it cant be set as a schmitt trigger when acting as GP3 input so we need a clean pulse train at logic voltages.
Cheers
Phil
fm_head
Aug 16, 2008, 03:40 PM
here are the results with the 10k pull up res. a change is noticed in the amplitude of the received signal but it is still not clean enough to be fed into the decoder.The test point is connected to the rx o/p and not the decoder's o/p.
phil_g
Aug 16, 2008, 04:17 PM
Just checking, the scope input needs to be set to DC coupled, not AC, is that what you're using? If AC it could be the scope input capacitor causing that curve...
phil_g
Aug 16, 2008, 04:20 PM
Is the test point connected to the decoder when you take these traces?
Sorry what I meant was, is the rx output connected to the decoder input at the point where you are taking these traces, or is the rx output 'floating' ie not feeding anything?
fm_head
Aug 16, 2008, 04:21 PM
I am using a soundcard scope on my computer.How do I check whether it is dc ao ac coupled?
fm_head
Aug 16, 2008, 04:21 PM
Sorry what I meant was, is the rx output connected to the decoder input at the point where you are taking these traces, or is the rx output 'floating' ie not feeding anything?
Yes the rx output is floating
phil_g
Aug 16, 2008, 04:39 PM
I am using a soundcard scope on my computer.How do I check whether it is dc or ac coupled?
Ah, then its AC coupled. There may be no problem, other than the logic levels....
Does it still fail to drive the decoder? Those levels need ideally to be near the supply rails... ie 4.8v and ground... I think a comparator/schmitt might be necessary after all... just looked at Bruces site, he shows an example, chip 'A47' in the diagram down the page.
I'd try an LM311 with one input to the wiper of a 10k pot across the power rails (with 0.1uF decoupling), and the other to the rx output. Move the pot to find the switching point just above the most negative value of the pulses. The LM311 output will drive the decoder ok. By switching the inputs around you can invert the output if necessary (not sure if Bruce needs positive-going pulses or negative)
Phil
fm_head
Aug 16, 2008, 04:47 PM
ill try connecting the decoder and see what happens
fm_head
Aug 16, 2008, 04:59 PM
According to the working description of bruce's decoder when a steady signal is detected the led will remain lit, now when i connected the decoder to the receiver output directly, the led remains on but tends to go off for a very short interval in between. I connected one servo and it worked but again the servo was vibrating as if a very noisy signal was being fed into it. I will get the lm311 on monday and try what u mentioned also ill try to use the oscilloscope at college for testing
fm_head
Aug 17, 2008, 10:06 AM
Ok, this is the ckt of the superregen I am using, the point at which I am taking the output to feed the decoder is shown. One can see thet the point at which the signal is fed to the decoder and the supply to the circuit is the same, could this be the reason why I am not getting the proper waveform to drive the decoder (I mean vcc is being superimposed onto my signal?). what is the solution to this problem??Will a schmitt trigger work??
thanks!
phil_g
Aug 17, 2008, 10:46 AM
That point is too early in the circuit, superregens are easily upset by loading & may either stop oscillating or move way off frequency.
Try pin 1 of the RX3 chip, as at that point the recovered signal has been filtered and buffered. Can you show a scope trace at pin 1, I think that might be clean enough to drive the decoder directly.
Cheers
Phil
fm_head
Aug 17, 2008, 10:53 AM
That point is too early in the circuit, superregens are easily upset by loading & may either stop oscillating or move way off frequency.
Try pin 1 of the RX3 chip, as at that point the recovered signal has been filtered and buffered. Can you show a scope trace at pin 1, I think that might be clean enough to drive the decoder directly.
Cheers
Phil
i will take the reading ASAP and post
fm_head
Aug 17, 2008, 11:33 AM
here is the output on pin 1
phil_g
Aug 17, 2008, 11:44 AM
Strange - nice clean pulses up to the last one!
Ok, try pin 15 which is the output of the first amplifier.
Lets backtrack a little - your tx, does it transmit carrier continuously other than the 4 pulses, ie pulse=no carrier or the other way around, each pulse is a pulse of carrier?
The former is normal. Just looking for clues as to why the last pulse should not return to deck...
Cheers
Phil
fm_head
Aug 17, 2008, 11:46 AM
Strange - nice clean pulses up to the last one!
Ok, try pin 15 which is the output of the first amplifier.
Lets backtrack a little - your tx, does it transmit carrier continuously other than the 4 pulses, ie pulse=no carrier or the other way around, each pulse is a pulse of carrier?
The former is normal. Just looking for clues as to why the last pulse should not return to deck...
Cheers
Phil
ill try to find a ckt diagram similar to my tx and post
fm_head
Aug 17, 2008, 12:27 PM
this is a very similar circuit to what I am using
phil_g
Aug 17, 2008, 01:31 PM
Ok so with positive-going pulses from the encoder, that circuit gives continuous carrier with the pulses as breaks, thats ok its the normal way around.
Did you try the scope on pin 15?
Phil
fm_head
Aug 17, 2008, 02:01 PM
here is the wave form on pin 15, still no luck
phil_g
Aug 17, 2008, 02:42 PM
Thats a good waveform to slice on though, much better. The signal at that point is the best yet. Its reading only between 1 and 1.8 v on your scope trace though, is it?
You could either experiment with the 2nd inverting amplifier between pins 16 & 1, or go with an additional comparator as we said before (LM311) fed from pin 15.
The second amp in the RX3 chip is set for a gain of about 10, so it should clip, and your trace in your 'pin 1' post shows that is whats happening, I just dont understand why the last pulse floats back to ground rather than being pulled cleanly back. Its AC coupled but why it only affects the last pulse is weird - its spot on other than that capacitive drifting effect.
Maybe the module you have their doesnt follow the suggested circuit in the datasheet, are there any large capacitors around the two amplifiers (pins 14-15 and pins 16-1)?
Dont despair you're almost there, I'm sure a 311 will square up that pin15 signal ok.
Phil
fm_head
Aug 19, 2008, 07:31 AM
I put the output signal from the receiver through a series resistor and capacitor and gave the input to a not gate and this is what I got at the output. Is this signal good enough to drive the decoder??
(phil_g pls check ive sent u a PM)
phil_g
Aug 21, 2008, 07:14 PM
Its still not rail to rail, it looks like about a 1.8v peak, I wonder if its your scope thats reading low. All this capacitive drifting could just be down to your scope being ac coupled only. So, did you try the decoder, did it work any better?
The 311 idea I would put a pot across the rails so the wiper sees anywhere from zero to supply volts, set it half way and connect to your 311 input (2 or 3). The rx output goes to the other pin (3 or 2). output to the decoder is on 7, 1 is ground, 8 is supply. The rest are unconnected. If you set the pot to half the pulse peaks it should square it up perfectly.
Phil
fm_head
Aug 22, 2008, 03:41 PM
I made the LM311 circuit as shown below. The output I got is shown in figure 1 :( . I also tried using an inverter (7404)the output I got is shown in fig 2.
So the lm311 did not square up the signal, I will try giving the receivers o/p to the decoder and see what happens.
Robert_A_S
Aug 23, 2008, 11:37 AM
I believe the LM311 has an open collector output so you need to put a pull-up resistor between the output and Vcc. The value depends on how much current you need to source, I would try 4.7K to start.
fm_head
Aug 25, 2008, 02:01 PM
It works!!!!
First of all I want to thank phil_g for helping me out and answering all my noobie questions :) I also would like to thank Robert A S for giving me the final solution to my problem. The Tx and Rx work, not tested the range yet, but bench test results are positive :) :) !!! I have attached the final wave form showing the output of the receiver. Thank you for all your help once again!!
regards.
phil_g
Aug 25, 2008, 02:15 PM
Well done that man!
Congratulations for sticking at it, sorry I've not been around all weekend - we had a race meeting (Teeside Autodrome).
Brilliant, well done.
Phil
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.