View Full Version : updated schematic
hadihf
Apr 05, 2004, 06:52 AM
again..
szastoupil
Apr 05, 2004, 11:23 AM
OOPS! You might want to post it in the FM RX thread.
Scott
Marion
Apr 05, 2004, 03:39 PM
Looks like a 3 channel receiver. Yes?
hadihf
Apr 06, 2004, 01:29 AM
Yes...I think I over cliked the mouse button:D
anybody can suggest improvements...before I post the pcb files..
Regards
hadihf
Apr 12, 2004, 08:15 AM
Hmmmm, nobody is interested :rolleyes:
vintage1
Apr 12, 2004, 09:07 AM
Gimme a break. Only on first cup of coffeee...
Looks a bit like a hitec feather at first glance. No ttning on teh frnt end - but what the heck.
Should work, but probably will be prone to orher transmitter interference with a cheapo ceramic and only one at that.
Is that a PIC decoder? If so some fancy software in there should helo the odd glitch to be rejected...ignore pulkses that are suddenlty vastly different from the last one etc..
hadihf
Apr 30, 2004, 02:25 AM
the signal from 3361 is weak ... Please add a 10k pull up resistor from PPM line to 3.3v. :D
Regards
JMP_blackfoot
Apr 30, 2004, 04:40 AM
the signal from 3361 is weak ... Please add a 10k pull up resistor from PPM line to 3.3v. :D
Regards
The problem arises from using pin 14 of the MC3361 as an output. It is an open collector.
An external load must be connected to some positive voltage source.
Either an extra resistor to V+ as you advise, or simply change the configuration of the PIC to enable internal pullups (OPTION,6 = 0). Another simple option is to take the signal from pin 13 of the MC3361, and change the PIC program for opposite polarity input pulses (depending on the actual program, it may well work directly).
Also, the input circuit is probably taken directly from an application note. The values are for resonance at near 49 MHz. Replacing the 0.22 µH inductance with a 0.39 µH will bring resonance close to 35 MHz as intended.
mmormota
May 02, 2004, 03:31 PM
You probably know Bruce Abbot's great Pic decoder sw: http://homepages.paradise.net.nz/bhabbott/decoder.html
I built it, working as written. The source is there too, clean and well documented, so further modification like more then 4 channels is possible.
Bruce Abbott
May 04, 2004, 06:44 AM
The 12C508 only has enough pins to do 5 channels. The 12F676 has 14 pins, so it can do 6 channels or more. I hope to have 5/6 channel code working soon.
Meanwhile, I have a couple of MC3361CD's that need a workout ;)
hadihf
May 04, 2004, 09:32 AM
Here is the whole project... :)
mmormota
May 04, 2004, 04:18 PM
The 12C508 only has enough pins to do 5 channels. The 12F676 has 14 pins, so it can do 6 channels or more. I hope to have 5/6 channel code working soon.
I almost finished the code to send out pulses same time (without IT), it should fit to your existing code. If your code is not ready yet and interested, I send it to you. The basic idea: sorting the pulses on length, starting all of them nearly same time, stop them one by one. (I need some days to debug it)
Bruce Abbott
May 05, 2004, 03:55 AM
I have almost finished my code too, but I am still interested to see how you did it.
Unfortunately my code won't fit in the 12C508, as there are too many variables. I may be able to squeeze it into a 12C509, otherwise it will be for 12F629/75 only.
JohnnyB
May 05, 2004, 06:37 AM
Bruce and MMorota,
Have you seen the IR tx/rx thread in the indooor models forum? I am wondering if your code would be suitable for an IR rx?
Also have you seen the Didel MIR4? this takes the output from several pins of a 16F84 in parallel to drive 70 ohm actuators and motors (supposedly it saves on parts because a bridge is not needed, what does the term bridge mean?). Are you able to explain how in principle this could be coded?
Thanks,
Johnny
JMP_blackfoot
May 05, 2004, 07:52 AM
Also have you seen the Didel MIR4? this takes the output from several pins of a 16F84 in parallel
Are you able to explain how in principle this could be coded?
Some manners to change the state of more than one output together are :
Say you want to toggle GPIO,4 and GPIO,5 together (8-pin PIC as an example), without changing the other outputs :
movlw b'00110000' (or: movlw .48)(or: movlw H'0030')
xorwf GPIO,1
Say you want to force GPIO,4 and GPIO,5 to 1 :
movlw b'00110000' (or: movlw .48)(or: movlw H'0030')
iorwf GPIO,1
Say you want to force GPIO,4 and GPIO,5 to 0 :
movlw b'11001111' (or: movlw .207)(or: movlw H'00CF')
andwf GPIO,1
JohnnyB
May 06, 2004, 12:44 PM
Does it also need a TrisA or TrisB instruction to send it to the port? Sending/setting the bits to is the instructions that certain pins are for input and others for output.
A question really. Am I correct?
Thanks,
Johnny
JMP_blackfoot
May 06, 2004, 12:58 PM
Does it also need a TrisA or TrisB instruction to send it to the port? Sending/setting the bits to is the instructions that certain pins are for input and others for output.
You do TrisA or TrisB to configure the port bits to output (0) or input (1).
For example :
movlw b'00111000'
TrisA
makes the bits 0, 1, 2, 6 and 7 outputs, and 3, 4 and 5 inputs.
Usually, this instruction is done only once for each port at the beginning of your program (unless your program requires that a bit changes from input to output or the other way around).
robin123
Mar 06, 2007, 04:24 PM
End Of Report
JimDrew
Mar 07, 2007, 01:02 AM
I almost finished the code to send out pulses same time (without IT), it should fit to your existing code. If your code is not ready yet and interested, I send it to you. The basic idea: sorting the pulses on length, starting all of them nearly same time, stop them one by one. (I need some days to debug it)
An even easier method is to start them one by one (longest to shortest), and stop them all at the same time. Use the compare interrupt to start each one and the TMR1 interrupt to stop all of them. Since the frame rates can vary without affecting the servo position, this works perfectly. This eliminates the need to calculate how much overhead the code needs to start/stop them.
mmormota
Mar 07, 2007, 02:56 AM
The final version is a variation of the principle. This code sends out 3 servo pulses, but no problem with any more channels. It's resolution is the instruction time, 1 usec on a 4MHz Picmicro. Tested, working.
;------------------------------------------------------------------
; Servo pulse output
;------------------------------------------------------------------
;
; The codesends out the servo_l, servo_r, servo_m pulses
; simultaneusly.
; First it starts every pulse with a delay of the remainder modulo
; 16, then stops them in a 16 usec loop.
; Input: servo_l_lo, servo_l_hi etc, the value means useconds.
; There are PCL manipulations, keep this code on the first 256 bytes code space!
pulse_out:
; ------------- initial corrections -------------------------------
movlw d'71' ; the pulse length values has to be
subwf servo_l_lo,f ; trimmed with the inherent delays
skpc ; of the algorythm
decf servo_l_hi,f
movlw d'49'
subwf servo_r_lo,f
skpc
decf servo_r_hi,f
movlw d'27'
subwf servo_m_lo,f
skpc
decf servo_m_hi,f
; ------------- servo_l pulse start -------------------------------
movf servo_l_lo,w ; compensation, the whole process
andlw 00fh ; length has to be independent of the
addwf PCL,f ; pulse length value
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
bsf GPIO,servo_l
movlw 0ffh ; the smaller the lower 4 bit,
xorwf servo_l_lo,w ; the longer the jump, therefore
andlw 00fh ; the the faster the pulse start
addwf PCL,f
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
; ------------- servo_r pulse start -------------------------------
movf servo_r_lo,w ; compensation, the whole process
andlw 00fh ; length has to be independent of the
addwf PCL,f ; pulse length value
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
bsf GPIO,servo_r
movlw 0ffh ; the smaller the lower 4 bit,
xorwf servo_r_lo,w ; the longer the jump, therefore
andlw 00fh ; the the faster the pulse start
addwf PCL,f
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
; ------------- servo_m pulse start -------------------------------
movf servo_m_lo,w ; compensation, the whole process
andlw 00fh ; length has to be independent of the
addwf PCL,f ; pulse length value
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
bsf GPIO,servo_m
movlw 0ffh ; the smaller the lower 4 bit,
xorwf servo_m_lo,w ; the longer the jump, therefore
andlw 00fh ; the the faster the pulse start
addwf PCL,f
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
; ------------- multiply the pulse lengths by 16 ------------------
rlf servo_l_lo,f
rlf servo_l_hi,f
rlf servo_l_lo,f
rlf servo_l_hi,f
rlf servo_l_lo,f
rlf servo_l_hi,f
rlf servo_l_lo,f
rlf servo_l_hi,f
rlf servo_r_lo,f
rlf servo_r_hi,f
rlf servo_r_lo,f
rlf servo_r_hi,f
rlf servo_r_lo,f
rlf servo_r_hi,f
rlf servo_r_lo,f
rlf servo_r_hi,f
rlf servo_m_lo,f
rlf servo_m_hi,f
rlf servo_m_lo,f
rlf servo_m_hi,f
rlf servo_m_lo,f
rlf servo_m_hi,f
rlf servo_m_lo,f
rlf servo_m_hi,f
; ------------- the 16 cycle pulse stop loop ----------------------
movlw max_sp_length / 010h
movwf out_counter
out_cycle:
decf servo_l_hi,f ; The cycle time is 16 usec.
btfsc STATUS,Z
bcf GPIO,servo_l ; It stops the servo pulses.
nop
decf servo_r_hi,f
btfsc STATUS,Z
bcf GPIO,servo_r
nop
decf servo_m_hi,f
btfsc STATUS,Z
bcf GPIO,servo_m
nop
nop
decfsz out_counter,f
goto out_cycle
bcf GPIO,servo_l
bcf GPIO,servo_r
bcf GPIO,servo_m
goto proba
JimDrew
Mar 07, 2007, 09:37 AM
Have you tested this routine when all of the servo position values are the same (1500us for example)? We needed 250ns resolution to get 16 bits of resolution with our system so I had to use the hardware interrupts for everything, along with a pretty interesting sort routine. Running at 16MHz also helps.
mmormota
Mar 07, 2007, 11:12 AM
Have you tested this routine when all of the servo position values are the same (1500us for example)? We needed 250ns resolution to get 16 bits of resolution with our system so I had to use the hardware interrupts for everything, along with a pretty interesting sort routine. Running at 16MHz also helps.
Yes, of course I tested it. Working.
The trick is:
- start the pulses with 1 cycle resolution
- stop the pulses (even same time) with 16 cycle resolution, 16 cycle is long enough to handle same or different length
;)
robin123
Mar 19, 2007, 03:14 PM
End Of Report
MatC
Mar 19, 2007, 05:33 PM
What does the signal look like? Can't you amplify it a bit?
plane_spotter
Mar 20, 2007, 12:43 PM
You need to pick up the ppm signal from either pin13 or pin14. I use pin 13 on my homebuilt rx's and it works fine.
Hope this helps.
Ash
robin123
Mar 20, 2007, 02:24 PM
Yes
Bruce Abbott
Mar 21, 2007, 07:09 AM
The CD4015 needs a digital signal to work properly. You can use the MC3361's Squelch circuit (input on pin 12, output on pin 13) to 'square up' the audio signal. The MC3361 also has an open collector output on pin 14, which can be used to create the sync pulse. Here's an example:-
MatC
Mar 21, 2007, 09:31 AM
JMP_blackfoot: read-modify-write operations are not recommended for outputs. The problem with using OR (and similar operations) to set two bits, is that if the previous output has not settled or is being overridded, it will read in the wrong value and incorrectly set the output accordingly.
The recommended solution is a shadow register: so you modify the shadow register each time and copy all 8 bits across in one set operation, avoiding all read-modify-write operations on the ports.
Having said that it will probably work just fine :)
robin123
Mar 21, 2007, 12:32 PM
The CD4015 needs a digital signal to work properly. You can use the MC3361's Squelch circuit (input on pin 12, output on pin 13) to 'square up' the audio signal. The MC3361 also has an open collector output on pin 14, which can be used to create the sync pulse. Here's an example:-
Thanks a lot Bruce! Studying by comparation the MC3361, 3371 and 3372 datasheets I also find out that the audio signal level depends on the quad filter damping resistor connected on pin 8. Also as per these datasheets the ceramic filter on this pin is not very "orthodox" (only for MC3372). So now I know how to deal with the problem. The next step will be decoding with PIC12F675 as you did... :)
It's amazing anyway to have a response from "the other side of the Earth" 17321 km away!
robin123
Mar 24, 2007, 03:31 AM
Thanks ONLY to Bruce
plane_spotter
Mar 24, 2007, 06:56 PM
Hi Robert, you will require the correct shift file for the PIC depending on the shift of your transmitter. Here in the UK I need to use the positive shift file like you have, driving the PPM from pin 13. I have no clue what shift tx's in Romania use. As the 12f675 is reprogrammable it may just be worth trying the negative version. Have a look at this pdf of my circuit it may be of help to you. Report back and let us all know how you progress.
Ash
robin123
Mar 24, 2007, 08:33 PM
Hi Robert, you will require the correct shift file for the PIC depending on the shift of your transmitter. Here in the UK I need to use the positive shift file like you have, driving the PPM from pin 13. I have no clue what shift tx's in Romania use. As the 12f675 is reprogrammable it may just be worth trying the negative version. Have a look at this pdf of my circuit it may be of help to you. Report back and let us all know how you progress.
Ash
Your schematic is a great piece of work! The crystal is precisely 35 MHz? I think you should use 3 or 4 band-pass 455KHz filters in series not to disturb the M.O.D.
-----END OF REPORT-----
JimDrew
Mar 25, 2007, 03:36 PM
Does the MC3361 have the ability to accept a direct 35MHz connection from another transmitter's output instead of using an antenna? An example of this would be for a two-wired tethered application.
MatC
Mar 25, 2007, 04:54 PM
What does the signal look like at pin 13? Correct polarity? Good and square?
robin123
Mar 26, 2007, 11:52 AM
@ MatC
No, "Black & White"
robin123
Mar 26, 2007, 01:43 PM
Does the MC3361 have the ability to accept a direct 35MHz connection from another transmitter's output instead of using an antenna? An example of this would be for a two-wired tethered application.
Why don't you just try? Let us all know what is your progress!
Kutej
Oct 16, 2007, 05:18 AM
The circut diagram of receiver is originaly designed for crystal 10.245 MHz. The 35 MHz crystal will oscillate on its base frequency, about 11.6 MHz and sensitibility will be low.
I wired oscillator in another way so that it works really at 35 MHz. The schematic of my receiver is on http://www.mp222.wz.cz/rcprijimac.htm. It works quite well.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.