control a toy remote controlled car using gnuradio and HackRF
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
build
cmake
docs
examples
grc
include/remotecar
lib
python
swig
CMakeLists.txt
HowToWrite.md
README.md

README.md

gr-remotecar

I wrote a GNURadio module to generate control signal for toy remote controlled car, and a Qt(PySide) GUI to listen keyboard press.

detail and source code: http://github.com/scateu/gr-remotecar

blog: http://hackrf.net

Video DEMO

INSTALL

mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

TRY

refer to examples/

examples/WheelPulse/Wheel.py is a simple PySide based controller which you can control your toy car with keyboard direction keys. And it is for RemoteCarIIBaseBand

Just replay it.

on examples/tx.sh and examples/rx.sh , I demo how to capture the car's remote signal and just replay it. And it turns out to make the car run.

cd examples
./rx.sh car.iq
./tx.sh car.iq

and it means:

    hackrf_transfer -t car.iq -f 27000000 -s 8000000 -a 1 -l 30 -i 30 -x 40 

27000000 is for 27MHz, you may find the frequency sign on you car's remote.

Principle

We support two kind of remote car control :

RemoteCarBaseBand

                -->|TIME3  |<--   TIME4
      --------+    +-------+    +-------+    +--------- ... -------+    +---.....
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              +----+       +----+       +----+                     +----+
              TIME0        TIME0        TIME0
           -->|                              TIME2                 |<---


    TIME0 = 520us
    TIME3 = 300us to 1.3ms
    TIME4 = 300us to 1.3ms
    TIME2 = 20ms

TIME3 and TIME4 control car's accelerator and direction.

RemoteCarIIBaseBand

+----------+     +----------+     +----------+     +----------+     +-----+     +-----+                        
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
+          +-----+          +-----+          +-----+          +-----+     +-----+     +-...                     

|<-  3t  ->|  t  |<-  3t  ->|  t  |<-  3t  ->|  t  |<-  3t  ->|  t  |  t  |  t  |  t  |    

and we can simply capture it with HackRF using a AM demode gnuradio-companion workflow.

it is on examples/analysis.grc

Left: n=58
Right: n=64
Forward: n=10
Fast Forward: n=22
Backward: n=40
Left Forward: n=28
Right Forward: n=34
Left Backward: n=46
Right Backward: n=52

t = 0.55 ms

and you can try it with examples/WheelPulse/Wheel.py