erwincoumans
100 W
- Joined
- Apr 2, 2015
- Messages
- 141
Torqueboards asked me to help with a simple open source controller, so here is one very affordable example setup using two Arduino Nano's using nRF24L01+ transceivers.
I'll update this post over time to make it a easier step-by-step process. Originally, my post described an BLUNO Beetle using Bluetooth BLE, but it is not fully rock solid (drops connection easily). The nRF24L01+ is more 'rock solid' so that is used instead. (Below in quotes is the old Beetle description, for someone who still wants to check it out)
Bill of Material:
This RFDuino with Nano and nRF24L01+ would be compatible with the same setup too: https://rfduino.wordpress.com
The receiver has a safety mechanism, if it looses connection for 0.5 seconds it will go to neutral servo PWM.
The Arduino scripts for transmitter and receiver, there is a 'Download' button at the right side of the page:
https://github.com/erwincoumans/ArduinoServoTxRx
The Arduino scripts assume the following pin connections:
Note that some wireless KAMA Nunchucks can be directly used with VESC, but this Arduino solution can be customized (bi-directional communication, show battery level etc in the future) and has a more 'rock solid' connection.
Enjoy!
I'll update this post over time to make it a easier step-by-step process. Originally, my post described an BLUNO Beetle using Bluetooth BLE, but it is not fully rock solid (drops connection easily). The nRF24L01+ is more 'rock solid' so that is used instead. (Below in quotes is the old Beetle description, for someone who still wants to check it out)
Bill of Material:
- 2 Arduino Nano (around USD$ 10 at Amazon.com. I got the version without header for easier soldering of the nRF24L01+ (http://www.amazon.com/Lucksender-Atmega328p-Controller-Development-Compatible/dp/B00N9WVXMK/ref=sr_1_5?ie=UTF8&qid=1433746451&sr=8-5&keywords=arduino+nano) but there is a Arduino Nano I/O shield that has a socket for nRF24L01+. I'll test the I/O shield soon (http://www.amazon.com/gp/product/B00BD6KEYC?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00)
- 2 nRF24L01+ (around USD$ 7 per pair at Amazon.com, see http://www.amazon.com/nRF24L01-Wireless-Transceiver-Arduino-Compatible/dp/B00E594ZX0/ref=sr_1_1?ie=UTF8&qid=1433746522&sr=8-1&keywords=nrf24l01%2B )
- Wires, potentiometer of your choice (I re-used the pot of a Karma)
- Enclosure of your choice, I used a stripped-down Kama Nunchuck. USD$ 18.36 at Amazon, http://www.amazon.com/Wii-Kama-Wireless-Controller-Colours-Nintendo/dp/B0012R58LG
This RFDuino with Nano and nRF24L01+ would be compatible with the same setup too: https://rfduino.wordpress.com
The receiver has a safety mechanism, if it looses connection for 0.5 seconds it will go to neutral servo PWM.
The Arduino scripts for transmitter and receiver, there is a 'Download' button at the right side of the page:
https://github.com/erwincoumans/ArduinoServoTxRx
The Arduino scripts assume the following pin connections:
Code:
Transmitter has a potentiometer pin on Analog 3
Receiver has the servo PWM pin on D3
The nRF24L01+ transceiver is connected to both Tx/Rx Arduino Nano as follows:
VCC -> 3.3v
GND -> GND
CE -> D9
CSN -> D10
MOSI -> D11
MISO -> D12
SCK -> D13
IRQ -> not used/not connected
Enjoy!
Here is old Bluno Beetle description, for someone who still wants to check it out. I prefer the Arduino Nano + nRF24L01+, its connection is more rock solid.
A pair of the new Bluno Beetle is a tiny Arduino with built-in Bluetooth 4.0 BLE make a great controller/transmitter and receiver for an electronic skateboard PWM servo signal: it is really small. The setup is very simple and only requires a tiny bit of soldering:
- 3 wires for the receiver (ground GND, 5V and digital PWM pin D3)
- 2 wires for the transmitter battery (ground GND and VIN), and 3 wires for the potentiometer (ground GND, 5V and analog pin 3)
Bill of Material:
You need to setup one Beetle as Bluetooth CENTRAL and the other Beetle as Bluetooth PERIPHERAL, using the Serial Monitor of the Arduino IDE.
- 2 * Bluno Beetle at USD$ 14.90 each, see http://www.dfrobot.com/index.php?route=product/product&product_id=1259#.VXNIeuv6VF4
- 1 3.7V LIPO batteries (Beetle accepts <8V), USD$ 6.99 for 4 batteries and a charger, I am using a single 3.7V 600mAh, 20C battery, see http://www.amazon.com/gp/product/B00LK0DY3O?psc=1&redirect=true&ref_=od_aui_detailpages00
- Wires, potentiometer of your choice (I re-used the pot of a Karma)
- Enclosure of your choice, I used a stripped-down Kama Nunchuck. USD$ 18.36 at Amazon, http://www.amazon.com/Wii-Kama-Wireless-Controller-Colours-Nintendo/dp/B0012R58LG
This only needs to be done once, and it will keep the setting.
See http://www.dfrobot.com/wiki/index.php/Bluno_SKUFR0267#Configure_the_BLE_through_AT_command
Code:+++ AT+ROLE=ROLE_CENTRAL
Code:+++ AT+ROLE=ROLE_PERIPHERAL