Introduction: Arduino Lego Technic Racer 42065 + PS2 + Wireless 2.4GHz NRF24L01
More photos here
Things used in this project (bought on AliExpress):
- 1x Arduino Nano for TX
- 1x Arduino Pro Mini for RX
- 1x DRV8833 H-Bridge Motor Driver
- 2x PCB board 5x7cm
- Some wires 0.2mm thickness
- Paper box for TX
- 1x PS2 Pad (not original) with PS2 plug (not USB)
- 1x orange LEDfor TX status
- 2x power switch
- Hot melt glue gun
- 3x resistors 1k for transistors base (LEDs)
- 1x resistor 2k red taillights LEDs
- 1x resistor 200 white side beams LEDs
- 1x resistor 2k white front beams LEDs
- 2x transistors for LEDs current as switch on/off
- 1x buzzer for Lego Vehicle horn sound
- 1x LiPo 7,4V 1300mAh for Lego Vehicle Racer. It should be more, max 10V (DRV ratings)
- 1x Lipo 7,4V 700mAh 2S for TX
- 2x Lego Motor size M
- 1x Lego Technic Racer no. 42065
NRF library: http://tmrh20.github.io/RF24/
PS2 library: https://github.com/madsci1016/Arduino-PS2X/zipball/5d2be701af64d826d268301d83119a6d2ad04f15
Step 1: Transmitter - PCB for PlayStation2 Controller
- First we should find some small box for all elements inside of TX.
- Take PCB 5x7cm.
- Prepare PCB and pin headers for Arduino Nano or Pro Mini.
I move it to the end of PCB because of space between Arduino and PS2 connector inside of a box. Arduino is flipped upside down.
Step 2: Connections PS2 Pad / Arduino
- Buy some Chinese PS2 Controller from ex. AliExpress.
- All connections You can find here: http://www.techmonkeybusiness.com/using-a-playstation-2-controller-with-your-arduino-project.html
- I choose a cheaper solution and wired it straight from plug to Arduino.
I can recommend You to stick some notes to wires about what is what.
- Put glue on the wires and open pieces of solders just to isolate it and make connections stronger due to often taking out a battery to charge.
Step 3: Transmitter - Final Look
- You see orange LED applied next to power switch.
It's for transmitter status.
Blinking - TX is powered on, but doesn't have established connection with RX (Receiver in Lego Technic NRF24L01 module)
Constant - TX is powered on and has a connection with RX
- At the top of a box is placed NRF24L01 module with power adapter under the hood :)
- Black rubber band is to hold it tight in one piece.
Step 4: Battery Basket
- Try to make a basket from Lego placed in chassis frame at the bottom.
Step 5: Lego Receiver - Wires, LEDs & PCB
- I placed PCB at the end of a vechicle. It's the best place for it. Thanks to this it looks like a real working engine :)
- All wires between LEDs and PCB are going through chassis under the hood.
Elements used for LEDs:
- 2x transistors
- Resistor 1k for base in transistors
- Resistor 2k for front LEDs
- Resistor 200 for side LEDs
- Resistor 2k for taillights LEDs