P2 controlling 27 MHz radio controlled F150 toy truck

TubularTubular Posts: 4,049
edited 2019-01-03 - 21:37:03 in Propeller 2
Spent an hour yesterday arvo proving the P2 could transmit commands to a $20 toy RC truck, using nothing more than a 14.6" bit of wire attached to P0

This truck uses a 27.145 MHz xtal osc, modulated with 2500 Hz on-off keying of that osc. Command was 60 bits long before repeating

Early days yet, at the moment only one command implemented in a long unrolled loop, but eventually will get all the commands and combinations implemented. It was just fun to see it work, and a pleasant break from PLL wobbles. Longer term, we should be able to get P2 to 'record' RF commands, like universal remotes do with IR, to make it work with anything 27MHz

800 x 480 - 53K
4608 x 3456 - 3M
3456 x 4608 - 2M
4608 x 3456 - 2M
4608 x 3456 - 3M

Comments

  • jmgjmg Posts: 14,477
    Tubular wrote: »
    This truck uses a 27.145 MHz xtal osc, modulated with 2500 Hz on-off keying of that osc. Command was 60 bits long before repeating
    That's nifty.
    How did you generate 27.145MHz, and how close did you get ?
    Looks like 20M/2 then *19, and a /7 can get to within 79ppm, which is likely good enough ?
  • TubularTubular Posts: 4,049
    edited 2019-01-03 - 21:49:08
    Thats it, but running at 108.58 so can use 'drvnot' inside rep loops to perform the oscillation
    So 20 / 7 * 38 / 1 = 108 MHz, /4 (inside rep loop) generates 27.143 MHz

    Everything happens in 400 uSec blocks, so the on off keying code looks like this for a burst on then off
    		rep #1,##43428		'13 double high (OOK="on") burst at 27.145 MHz for 400 uSec
    		drvnot	#0
    
    		waitx	##43428          'single low (OOK="off") for 400 uSec
    
  • jmgjmg Posts: 14,477
    Tubular wrote: »
    Thats it, but running at 108.58 so can use 'drvnot' inside rep loops to perform the oscillation
    So 20 / 7 * 38 / 1 = 108 MHz, /4 (inside rep loop) generates 27.143 MHz

    Everything happens in 400 uSec blocks, so the on off keying code looks like this for a burst on then off
    		rep #1,##43428		'13 double high (OOK="on") burst at 27.145 MHz for 400 uSec
    		drvnot	#0
    
    		waitx	##43428          'single low (OOK="off") for 400 uSec
    

    I was thinking of a smart pin PWM /7, but there is something seriously cool about SW bit-banging a 27.143 MHz carrier !!
    Shows the power of the REP opcode :) (and the PLL choices)
  • Cool Tubular! Didn't take long to get a P2 mobile.
  • Yes, bitbang RF ftw

    Other micros might do bluetooth, wifi, but we can bitbang 27MHz

    Reminds me that we really must have a go at 13.56 MHz RFID
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,705
    edited 2019-01-03 - 23:27:05
    @Tubular

    Great work, I just may have to buy a toy to try it LOL
    Reminds me that we really must have a go at 13.56 MHz RFID

    That would be real handy :) Just got my board today , now I'm excited . :)

  • Thats it Bob, get excited. Lots of amazing stuff to try

  • @Tubular
    Thats it Bob, get excited. Lots of amazing stuff to try

    For sure, it will keep us all busy for quite a few years. there's still tons to be explored in Pop1 :)
  • Nicely done Tubular :smiley:
  • Hey thats a great doc, thanks Beau. Gee we could do with something like that for P2.

    Before I dived in, I found a site that mentioned about the commands being simple a number of cycles in between two headers. The protocol for this truck was slightly different, some of the On and Off delays are double-width (800 uSec duration). But I went through the same procedure as you with the scope

  • Beau,

    I have an old /cheap rc car (no RC-steering just fwd / rvs).

    It's only marking is "08AT1"

    I punched in your demo code from the pdf and amazingly the car did respond !

    However it only goes in reverse for any of the commands(reverse,forward,etc).

    I even tried varying the signal from 0 to 1000.

    The only thing that happens is the motor just stays on longer for higher values of 'signal'.

    I don't have the transmitter handy , and even if I did,the only 'scope' I have
    is the *spinscope* :)

    I tracked down the id of the receiver from the FCC #

    It is an :

    Artin Industrial R/C Toy Receiver 43910R FCC ID L9G43910R
    Frequency Range
    49.82-49.9 MHz


    ...and indeed it does respond to the propeller from ~49 700 000 to ~50 000 000 !

    Do you have a guess on what is needed to make the car go forward?

    Mike
  • This is neat stuff. Somehow think I missed it...
  • Hmm,

    Maybe this car only goes forward .....and I got a defective one with the motor wired / connected backwards :)

    Still trying to track down info on it.

    There's a ton of info on "bitcharger conversion" type cars on rcgroups
  • very very very cool but can u read a signal sent from a prop2
  • The RC truck reads the signal sent by the P2

    Did you mean could a second P2 read a signal from a transmitting P2? Not at this stage
Sign In or Register to comment.