วันอาทิตย์ที่ 19 กุมภาพันธ์ พ.ศ. 2560

How to Hack RC Car Receiver via 2.4 GHz NRF24L01 Arduino Part 2

    

   This is the continued instruction of "How to Hack RC Car via 2.4 GHz nRF24L01 ArduinoTransmitter Tx part1"
More information : https://www.instructables.com/id/How-to-Hack-RC-Car-Receiver-Via-24-GHz-NRF24L01-Ar/
Materials & Tools
Materials
1. 1 - Arduino - Nano
2. 1 - NRF24L01 module


3. 1 - Socket adapter for NRF24L01(For protect & stabilize NRF24L01 module)









4. 4 - LED 3 mm.(Option for car decoration)
5. 2 - Resistor 1 kOhm. 1/4 watt.(Option for car decoration)
6. 1 - Capacitor 0.1 microF /50V.
7. 1 - Capacitor 1 microF /50V.
8. 1 - Capacitor 100 microF /50V.
9. 1 - Diode 1N4001
10. 1 - 7805 IC Regulator 5V.
11. 1 - Relay HRS1H-S-DC3V(Option for dumper driving )



12. 1 - Metal gear servo size 9g.(Option)(It will be needed when RC car use steering motor drive)


13. 1 - ESC 30A for car with reverse function













14. Dupont cable













15. Female pin header













16. Dupont Jumper Cable Housing Male Pin Connector












17. Dupont Jumper Cable Housing Female Pin Connector











18. Male JST Battery Pigtail









19. Female JST Battery Pigtail
20. JR Servo Lead Male extension cord(For servo and ESC connection)










21. Heat shrink tube 1.5 - 10 mm.


22. PCB - DIY circuit board

23. Velcro tape










24. Battery Lipo 7.4 V. 1000 mAh


25. 1 - Any RC car (Front Steering wheel + Rear wheel Drive)
Tools
1. Soldering gun.
2. Soldering wire.
3. Soldering paste.
4. Screw driver.
5. Plier.
6. Hot glue gun.
7. Epoxy glue.
8.Fixing material screw,bolt,nut.
Electronic parts installation

Steering Servo installation(Optional for Toy grade RC car)
Toy grade RC cars use steering motor drive.First ,it needs to modify steering housing to install Metal gear servo and fixed by hard epoxy.
Remove existing electronic board an other unnecessary devices.
Making DIY PCB
Building DIY PCB according to circuit diagram.

Arduino Nano pin No :
D3 - Steering servo signal(Use JR male plug)(There are three wires- Sig , Vcc , GND - Yellow , Red , Black)
D4 - Relay 3V. - Dumping motor(Option)
D6 - Electronic speed control(ESC)(Use JR male plug) - Driving Motor
nRF24L01 module Socket adaptor to Arduino Nano
pin No :
Vcc - 5 V. supply (Do not connect 5V. direct to nRF24L01 module,it's supplied only 3.3V.)
GND - GND
CE - 9
CSN - 10
SCK - 13
MO - 11
MI - 12
IRQ - 2
*If you have communication problem,you can change connection from pin 13,11,12 to pin SCK,MOSI,MISO of Nano programming pins.
*It's necessary to add 0.1 microF to nRF24L01 module pin Vcc/GND because the module needs stable current and voltage.Also solder a small wire at the antenna to increase control range.
Steering servo
Connecting servo's JR female plug to :
Signal(Yellow) - Nano D3
Vcc(Red) - 5V.supply
GND(Black) - Ground
Electronic Speed Control (ESC)
Connecting ESC's JR female plug to :
Signal(Yellow) - Nano D6
Vcc(Red) - 5V.supply
GND(Black) - Ground
Power JST male plug connect to Lipo Battery .
Relay 3V.(Optional)
Connection Pin :
2 - 5V.supply
3 - Ground
4 - Nano D4
5 - Dumper motor terminal(Another motor terminal connect to Ground)
Decoration light(Optional)
1. Install LED lights at front and tail. Fixed by hot glue.
2. Wire LED positive poles parallel to supply 5V.
3. Wire LED negative poles serial to Resistor 1 kOhm. - Ground.
*Before connecting main supply , check out to find short circuit points on DIY PCB.Otherwise it can smoke and burn everything.(Be careful of Lipo battery , it's high current supply , short contact will spark fire)
Software installation
Arduino sketch and Library :
1.Down load library zip file from GitHub.
2.Add library zip file to Arduino IDE.(After added you will see new library RF24-master in Examples menu.)
3.Before using new nRF24L01 modules,we shall burn the modules by uploading default sketch pingpair and GettingStarted for tuning up frequency otherwise it will has uncommunication problem.(Use another Arduino Nano and nRF24L01 modules for pairing)
4.After matching the frequency ,we can upload code sketch Rx_Board_V7-public.ino  to Receiver's Arduino Nano.
If communication complete ,serial monitor will show data as video clip.If not,go back to check hardware installation.
The received data will be scale back 10 times to get actual data.The Steering code between 150 - 910 and ESC code between 170 - 900 will be mapped to 0 - 180 and write value on servo command.To stabilize neutral position,we need if command to filter exact value for servo otherwise it will have jittering problem.The neutral value stay around 89 - 95 depend on each ESC brand , it should be calibrated and update the sketch.
Test playing RC car with transmitter a period for running in.











ไม่มีความคิดเห็น:

แสดงความคิดเห็น