Hackster is hosting Hackster Holidays, Ep. 2: Livestream & Giveaway Drawing. Start streaming on Friday!Stream Hackster Holidays, Ep. 2 on Friday!
Michael Lamersfexdev
Published © MIT

Bluetooth remote controllable (Lego) cars

(Lego) Car remote control focused on combining Physical Web with WebBluetooth

IntermediateShowcase (no instructions)Over 1 day1,839
Bluetooth remote controllable (Lego) cars

Things used in this project

Hardware components

RedBear Duo
×1
RedBear BLE Nano
×1
Microchip ATMega32 16PU
×1
DIP 40 socket
This socket is needed to lift the ATMega a bit so that the crystal and the capacitors fit underneath it. Additionally using a socket the ATMega can be removed easily to be used in another project
×1
Pololu 5V, 600mA Step-Down Voltage Regulator
×1
Pololu DRV8801 Single Brushed DC Motor Driver Carrier
×1
SparkFun Motor Driver - Dual TB6612FNG (1A)
SparkFun Motor Driver - Dual TB6612FNG (1A)
This one is optional. If you don't plan to drive additional motors for features (like trunk or front lights) then you can simply ignore this motor driver
×1
14.7456 MHz Crystal
×1
Capacitor 100 nF
Capacitor 100 nF
×2
470 Ohm resistor
We have chosen to use the same resistor for all LEDs to be flexible on the color side. If you want to get the most out of your LEDs then you have to solder different resistors for each LED color (based on 5V)
×15
A bunch of Dupont housings, male and female headers
The amount of each item depends of the way the electronic parts will be connected.
×1
LED (generic)
LED (generic)
5mm LEDs will fit perfectly through the Lego Technic holes. 3mm LEDs will fit into hole plugs (like the blue ones that only stand out a few mm). The mainboard supports: 2x front light 2x back light 2x fog light 2x reverse driving light 4x blinker lights 1x status LED (RGB)
×13
14500 or 18500 Lithium battery (3,7V, !!PROTECTED!!)
This one depends on the batteries you already have or prefer. The lego motors normally (under "Lego conditions") are driven with 9V. So you can also use a 9V battery. We found 3 serial 3,7V Lithium batteries to work best as they provide a little extra power to the car and the motors as well as the motor drivers work well under this condition. If you want to use Lithium batteries we strongly suggest to use protected ones as the whole electronics don't have any protection mechanism for the power supply. 14500 batteries have the big advantage that they fit into AA housings so it is very easy to find a suitable housing (with switch) for this kind of battery.
×1
DC motor (generic)
Depending on your Model (how much space there is and how heavy it is) we would recommend a original Lego M or L motor.
×1
9g Servo
The mainboard implements the PWM signal for a 9g servo. Maybe another servo will also work
×1
Cables
Cables for connecting the LEDs, Mainboard and Control board and maybe the motors (if the built in cable is too short)
×1
Male-Header 36 Position 1 Row- Long (0.1")
Male-Header 36 Position 1 Row- Long (0.1")
Used for the LED, motor, servo, flash and control board connections
×2
Female Header 20 Position 1 Row (0.1")
Used for the motor drivers, the voltage converter and the power connection
×2

Software apps and online services

Arduino IDE
Arduino IDE
Code Editor for C
Any Code editor will do the job for editing the ATMega C code. We used Visual Studio Code for this task. Compilation is done via the Terminal and a Makefile
Android Studio
Android Studio
For editing the Android app and Android Wear app

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Crimping tool (generic)

Story

Read more

Schematics

Mainboard schematics

Fritzing file containing a functional PCB layout

Control Board schematics

Fritzing file containing two variants for boards holding RedBear DUO and BLE Nano (self-wired)

Code

Github RemoteLego project

Credits

Michael Lamers

Michael Lamers

1 project • 0 followers
fexdev

fexdev

1 project • 0 followers

Comments