Simple 3D-printed NRF remote - Arduino controlled

You have to select UART in vesctool as communication protocol. And in UART settings you have to use a baud rate of 115200. This is because Arduino is talking to the vesc via UART at a default speed of 115200 baud.

1 Like

@solidgeek Are you still selling the PCB ? https://solidgeek.dk/produkt/firefly-receiver/

I canā€™t get the remote working. I have uploaded the firmware for RX and TX.TX LCD lights up but I see the Voltage as 0. I also canā€™t control the motors.

  1. I have selected UART under ā€œAPP to Useā€ and UART is set to 115200 under the UART tab. Do I still need to follow the ā€œInput Setup Wizardā€ ? If not, how do I pair TX and RX ?
  2. I can enter the remote menu by holding down the switch and powering on the remote, but I donā€™t know how to change settings there.
  3. Do I need to power on the TX first and RX second?

Vesc : 4.12 with FW3.40
firmware : https://github.com/Pryside/FireFly-Esk8-NRF24/blob/master/libraries
VescUart Lib : https://github.com/SolidGeek/VescUart

1 Like

anyone? :frowning:

You could try to enable the debug feature on the transmitter or receiver, and use the serial monitor in the Arduino IDE to see if the transmitter and receiver are talking to each other.

If you enable the debug feature on the transmitter, you can only see if the connection with the receiver is successful.

If you enable the debug feature on the receiver, you have to disconnect the Arduino from the vesc. Then in serial monitor you can see the throttle value and if the trigger is being pressed.

Also, make sure you have connected rx-tx right on the vesc and receiver. Arduino Rx -> vesc tx / Arduino Tx -> vesc Rx.

I think someone mentioned, a few posts back, that the development build is the latest build of the firmware, and is optimised for vesc 3.xx firmwares (correct me if Iā€™m wrong). The debug feature for the receiver is available in the development build.

1 Like

You are a life saver. I had a terrible problem. I had to swap an NRF and also erase the EEPROM. Debugger was showing the same address ā€œe8e8f0f0e1ā€ even though I changed it and re-uploaded it. I erased the EEPROM using the below sktech. Feel free to message me if you need help setting this up.

Here is the sketch

#include <EEPROM.h>

void setup()
{
  // write a 0 to all 512 bytes of the EEPROM
  for (int i = 0; i < 512; i++)
    EEPROM.write(i, 255); 
 // turn the LED on when we're done
    digitalWrite(13, HIGH);
  }

void loop()
 {
 }

First of all the brackets are missing in the for loop, and you will turn on the LED immidetly should be

for (int i = 0; i < 512; i++) {
    EEPROM.write(i, 255);
}
digitalWrite(13, HIGH);

Although stylistically I agree add braces for clarity donā€™t need a GOTO fail bug :slight_smile:

Wow diddnt know that, great info !

The code runs without the braces too.

I got the remote working but why does the connection Icon on the remote LCD keep blinking?

Isnā€™t it supposed to not blink when the connection is established ?

I think the nrf24 is not getting enough power. Powering the Arduino via a pc usb port is limiting the current. It is also advised to place a small capacitor over the power terminals (watch the polarity) of the nrf24 to make sure there is always sufficient power available for the nrf24.

both RX and TX are connected to battery and not USB. I have installed a capacitor to filter the 5V input to RX. There is already a 3.3V regulator on Arduino. Do you think the cap is necessary on the nrf ?

I think the cap is useful to prevent packet loss. I still think the nrf is getting not enough power delivered by the Arduino. Because If Iā€™m powering the the Arduino via pc usb, the connection icons keeps blinking, although I can control the vesc.

good to know. What size cap do you use?

1 Like

Iā€™m using a 10 nanofarad cap that I have salvaged from an old motherbord. Probably a bit overkill.

1 Like

WTF!! My new remote loses connection left and right. I have shielded both TX and RX and installed a giant capacitor (470UF) on both NRFs. RX has a 100MF capacitor on the 5V rail.

  1. Do I need to install a cap on the TXā€™s 5v?
  2. Could it be a bad NRF ? Iā€™m using these https://de.aliexpress.com/item/SMD-NRF24L01-1100-meter-long-distance-NRF24L01-PA-LNA-SMD-wireless-modules-1100meters-in-stock-fast/32367254718.html
  3. Can I use these modules instead? Are these modules compatible with the code? https://www.amazon.com/dp/B00O9O868G/ref=twister_B07434GZWL?_encoding=UTF8&psc=1

Its important that you do not Shield the antenne, only the electronics. And yes a capacitor om the receivers 5V is essentiel as the VESCs 5V power supply can be a little unstable.

2 Likes

So, I have problem with receiving data here is receiver: 1 transmitter: 22

when I restart the transmitter it sends dataā€¦ unfortunately just one package. Already have cap on 5v receiver 3.3v receiver antena. (GettingStarted.ino code works great when added radio.setAutoAck(false); //also tried adding it in firefly remote code ā€“ didnt help//, both arduinos are receiving and sending) (I connected Hall data to 5v that is why it is 1023 (if you are wondering)

Iā€™m using these NRF modules https://de.aliexpress.com/item/SMD-NRF24L01-1100-meter-long-distance-NRF24L01-PA-LNA-SMD-wireless-modules-1100meters-in-stock-fast/32367254718.html Can I use these modules instead? Do I need to change anything in the code?https://www.amazon.com/dp/B00O9O868G/ref=twister_B07434GZWL?_encoding=UTF8&psc=1