วันจันทร์ที่ 20 กุมภาพันธ์ พ.ศ. 2560

How to Control Tracked Robot Via Joystick NRF24L01 Module Arduino Part2 Rx

 
 

      The instruction will describe the method how to build Receiver(Rx) on Tracked Robot for Transmitter(Tx) in the instruction "How to control Tracked Robot via  Joystick NRF24L01 Module Arduino Part1 Tx".
      More information : www.instructables.com 
Materials & Tools
Materials
1. 1 - Arduino controller - Nano










2. 1 - NRF24L01 module











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









4. 1 - LED 5 mm.


5. 1 - Resistor 1 kOhm. 1/4 watt.













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. Dupont cable














12. Female pin header












13. 1 - L298N Arduino module











14. Electrical wires










15.Heat shrink tube 1.5 - 10 mm.








16. PCB - DIY circuit board



17. Battery Lipo 7.4 V. 500-1000 mAh








18. Velcro tape










19. Tamiya track and wheel set


20. Tamiya dual geared box


21. Tamiya plastic perforated plate


22. 2 - pairs of JST plug













Tools
1. Soldering gun.
2. Soldering wire.
3. Soldering paste.
4. Screw driver.
5. Plier.
6. Hot glue gun.
7. Miscellaneous screws ,bolts and nuts.
Electronic parts Installation
 

DIY PCB Building
Connecting electronic parts on PCB according to circuit diagram and solder them.


Arduino Nano pin to L298N
Pin No :
3 - ENA
4 - IN1
5 - IN2
6 - ENB
7 - IN3
8 - IN4
GND - GND of L298N
L298N module
Vcc - Battery positive pole
GND - Battery negative pole - GND of NANO
MotorA - Left motor
MotorB - Right motor
nRF24L01 module Socket Adaptor to Arduino Nano
Pin No :
Vcc - 5 V. supply (Do not connect 5V. directly 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.

Software Installation
Arduino sketch and Library :


1.Down load file .ino and library zip file GitHub.
2.Add library zip file to Arduino IDE.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 succeed matching the frequency ,we can upload Rx sketch  Rx_2CH_robot_V13_ NANO_for_remote_NANO_V2_public2 to Nano controller.
5.Test Receiver(Rx) with Transmitter(Tx).See serial monitor showing the print out data as attached video clip.






How to control Tracked Robot via Joystick NRF24L01 Module Arduino Part1 Tx


          The prerequisite instruction introduce the method how to build dual joystick transmitter(Tx) to control Tracked robot via NRF24L01 Arduino 2.4G wireless module.
More information : www.instructables.com
Materials & Tools
Materials
1. 1 - Arduino controller - Nano








2. 1 - NRF24L01+PA+LNA SMA Antenna module









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












4. 1 - LED 5 mm.










5. 1 - Resistor 1 kOhm. 1/4 watt.













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. 2 - Joystick for Arduino












12. Dupont cable.













13. Female pin header












14. Electrical wires









15. Heat shrink tube 1.5 - 10 mm.







16. PCB - DIY circuit board












17. Battery Alkaline 9V. or Lipo 7.4 V. 500-1000 mAh
18. Velcro tape










19. 1 -Potentiometer B10K












20. 2 - pairs of JST plug


21. 1 - Old toy remote/Electrical box(For making transmitter body)












Tools
1. Soldering gun.
2. Soldering wire.
3. Soldering paste.
4. Screw driver.
5. Plier.
6. Hot glue gun.
7. Electrical Drill.
8. Files.
9. Plastic cutter.
10. Miscellaneous screws ,bolts and nuts.

Parts & DIY PCB Installation 

  Modify old remote body for installing electrical parts.
DIY PCB Building
 Connecting electronic parts on PCB according to circuit diagram and solder them.

Arduino Nano pin to Joystick
Pin No :
A0 - Left Horizontal pin (X-Axis)
A1 - Left Vertical pin (Y-Axis)
A2 - Right Horizontal pin (X-Axis)
A3 - Right Vertical pin (Y-Axis)
Arduino Nano pin to Potentiometer
Pin No :
A4 - Signal output pin
nRF24L01 module Socket Adaptor to Arduino Nano
Pin No :
Vcc - 5 V. supply (Do not connect 5V. directly 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.
*You can use other electrical plastic box to be remote frame.(This instruction use old RC toy car remote.)
Software Installation
Arduino sketch and Library :
1.Down load sketch file .ino and library zip file for nRF24L01 module from GitHub.
2.Add library zip file to Arduino IDE.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 succeed matching frequency ,we could upload Tx sketch Tx_2CH_robot_V3 _public.ino to Arduino Nano.
Remarks : For this instruction using data[0] and data[1] of Left Joystick only.







วันอาทิตย์ที่ 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.