Open Source Arduino transmitter/receiver for (V)ESC

Tombombadil1988 said:
After cutting the PCB like in the picture of Nordel, will the buttons still work or just the potentiometer?
The Buttons are connected with 3 wires (colored like the letters in the pic [original nintendo nunchuck]) to the potentiometer, I assume they still work, but I don't know.
But i don't know wich one is 5v, gnd or pwm, cause I don't have multimeter atm:/ if someone knows that would be nice

+If you have enough place in your nunchuck I would cut like this: YELLOW
IMG_0303 - Kopie.JPG
 
Nordel said:
But i don't know wich one is 5v, gnd or pwm, cause I don't have multimeter atm:/ if someone knows that would be nice
Pcb seen from below: left + | middle pwm | right gnd

Do the C / Z buttons still work?
 
I've successfully uploaded the code on my receiver arduino.
But when I try uploading transmitter code I get this error:
Code:
Arduino: 1.6.5 (Windows 7), Platine: "Arduino Nano, ATmega328"

Build-Optionen wurden verändert, alles wird neu gebaut

Verwende die Bibliothek SPI im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 

Verwende die Bibliothek RF24-master im Ordner: C:\Users\Rech\Documents\Arduino\libraries\RF24-master (legacy)



C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Users\Rech\Documents\Arduino\libraries\RF24-master C:\Users\Rech\AppData\Local\Temp\build977424018304353579.tmp\nrf24l01_transmitter.cpp -o C:\Users\Rech\AppData\Local\Temp\build977424018304353579.tmp\nrf24l01_transmitter.cpp.o 

nrf24l01_transmitter.ino: In function 'void loop()':
nrf24l01_transmitter.ino:111:71: error: no matching function for call to 'RF24::write(unsigned char [4], int&, bool)'
nrf24l01_transmitter.ino:111:71: note: candidate is:
In file included from nrf24l01_transmitter.ino:2:0:
C:\Users\Rech\Documents\Arduino\libraries\RF24-master/RF24.h:281:8: note: bool RF24::write(const void*, uint8_t)
   bool write( const void* buf, uint8_t len );
        ^
C:\Users\Rech\Documents\Arduino\libraries\RF24-master/RF24.h:281:8: note:   candidate expects 2 arguments, 3 provided
no matching function for call to 'RF24::write(unsigned char [4], int&, bool)'
Unbenannt.png
Please guys, I need your help! Don't want to go with a bulky RC remote-.-
 
Nordel said:
I've successfully uploaded the code on my receiver arduino.
But when I try uploading transmitter code I get this error:
Code:
Arduino: 1.6.5 (Windows 7), Platine: "Arduino Nano, ATmega328"

Build-Optionen wurden verändert, alles wird neu gebaut

Verwende die Bibliothek SPI im Ordner: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 

Verwende die Bibliothek RF24-master im Ordner: C:\Users\Rech\Documents\Arduino\libraries\RF24-master (legacy)



C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\eightanaloginputs -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Users\Rech\Documents\Arduino\libraries\RF24-master C:\Users\Rech\AppData\Local\Temp\build977424018304353579.tmp\nrf24l01_transmitter.cpp -o C:\Users\Rech\AppData\Local\Temp\build977424018304353579.tmp\nrf24l01_transmitter.cpp.o 

nrf24l01_transmitter.ino: In function 'void loop()':
nrf24l01_transmitter.ino:111:71: error: no matching function for call to 'RF24::write(unsigned char [4], int&, bool)'
nrf24l01_transmitter.ino:111:71: note: candidate is:
In file included from nrf24l01_transmitter.ino:2:0:
C:\Users\Rech\Documents\Arduino\libraries\RF24-master/RF24.h:281:8: note: bool RF24::write(const void*, uint8_t)
   bool write( const void* buf, uint8_t len );
        ^
C:\Users\Rech\Documents\Arduino\libraries\RF24-master/RF24.h:281:8: note:   candidate expects 2 arguments, 3 provided
no matching function for call to 'RF24::write(unsigned char [4], int&, bool)'

Please guys, I need your help! Don't want to go with a bulky RC remote-.-

Remove the ,false around line 122. See
https://endless-sphere.com/forums/viewtopic.php?p=1059380#p1059380
 
Thank you!
I soldered everything together and it seems to work fine. Only not sure if I have to power the potentiometer directly from the Lipo or from the Arduino 3,3v/gnd or doesn't matter?

This should also work with other potentiometers? Cause I have some laying around and in mind to design my own controller;)
I'm just bad in electronic stuff :D
 
Nordle said:
Thank you!
I soldered everything together and it seems to work fine. Only not sure if I have to power the potentiometer directly from the Lipo or from the Arduino 3,3v/gnd or doesn't matter?

This should also work with other potentiometers? Cause I have some laying around and in mind to design my own controller;)
I'm just bad in electronic stuff :D

Congrats with your working version. You learn by doing (and failing sometimes).

It works with other potentiometers too. I would use Arduino 3.3/gnd, the lipo drops voltage when discharging.
 
Hey, I finally got my VESC wich was the last part missing for my board. Detection and controlling via BLDC tool worked fine, but I'm unable controlling over Arduino. I soldered everything together and uploaded sketches like it's described in this thread.cant wait no longer anymore.JPG
This is how I set up in the BLDC tool:BLDC App General.pngBLDC App PPM.png
When I click reboot in the BLDC tool (Windows7, firmware 1.1) I get unknown error, after that my VESC is disconnected and I have to connect again manually.BLDC Reboot Error.png
I am very grateful for any help! Can't wait anymore:D
 
Pulsewidth jumps up and down between 55-56%Pulsewidth.png
Triggering the potentiometer doesn't do anything.
 
After uploading sketches everything should work?Or do i have something more to do? Are there any possibility to check the communication between these two on the serial monitor?
(Left) is the transceiver, (Right) the receiver, shouldn't the receiver also give some data?
 
Nordle said:
Pulsewidth jumps up and down between 55-56%
Triggering the potentiometer doesn't do anything.


You should trim the pot to 50% or disable Safe Start.

heres the details behind safe start option when checked.

 
Still doesn't work, its 100% soldered in the right way, tripple checked, and switched both arduinos-.-
Again: Is there any way to check communication betweeen these two on my PC?
 
You should first check if the transmitter reads ok values from the potentiometer, using Serial connection.

In the Arduino IDE,

uncomment line 70+71 Serial.println(potValueA) and upload/run the modified script nrf24l01_transmitter and open
Tools/Serial Monitor using 115200 Baud rate and check output.

You might want to learn more about Arduino first and use the Arduino support forums at
https://forum.arduino.cc
 
See what happens now...
https://vid.me/JkB1
Totally random what happens, even if I set up current with brake (no reverse) motor spins backwards some times. I don't even have to trigger the pot to make something happen, give power to tx is enough.....
:?:
 
erwincoumans said:
You should first check if the transmitter reads ok values from the potentiometer, using Serial connection.

In the Arduino IDE,

uncomment line 70+71 Serial.println(potValueA) and upload/run the modified script nrf24l01_transmitter and open
Tools/Serial Monitor using 115200 Baud rate and check output.
I did, this and it seems that this part is fine.pot serial is fine.png
from time to time.png

Great help
Could you tell me what i have to change to get data from rx into serial monitor?
Edit:
I uncomment line19 //#define USE_SERIAL is that enough?
:?: If it's so, then my two probably does'nt communicate?Uncomment Line 19.png
edit again:
but if so I can't explain the video, the random motor twists begin when i power my tx.
 
Nordle said:
but if so I can't explain the video, the random motor twists begin when i power my tx.
Did you enable 'safe start' in the VESC Applications/PPM options? If not, please do so and reboot VESC.

Indeed, your two Arduino's don't communicate. Did you connect the nrf42L01+ in both Arduinos? Did you try some example sketches like ping-pong?

First make sure the 'pingpair' sketch works, use pin 7 to choose receiver or transmitter (or hard-code it in the script).
If that doesn't work, check your wiring of Arduino and nrf24L01+ and use the Arduino forums for help.
 
erwincoumans said:
Nordle said:
but if so I can't explain the video, the random motor twists begin when i power my tx.
Did you enable 'safe start' in the VESC Applications/PPM options? If not, please do so and reboot VESC.

Indeed, your two Arduino's don't communicate. Did you connect the nrf42L01+ in both Arduinos? Did you try some example sketches like ping-pong?

First make sure the 'pingpair' sketch works, use pin 7 to choose receiver or transmitter (or hard-code it in the script).
If that doesn't work, check your wiring of Arduino and nrf24L01+ and use the Arduino forums for help.
I did enable safe start.
Nrf is connected to both in the right way.
How is it possible that the motor spins random(see video) only if i give power to my tx node? When I don't motor doesn't anything. How is that possible if they don't communicate?
Pin7=d7 ? What do i have to do with this pin? Just wanted to try that sketch but didn't understand.
 
Today I found this awesome guide https://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/, and so I tried the ''getting started'' sketch from the rf24 class.
What I figured out:
My TX recognises the RF24 module TX recognize RF24.png
also my RX recognises the RF24 module Also RC recognize RF24.png
otherwise I would see a lot of zeros instead of the text in the serial monitor
Code:
Maniacbug's guide says:
Instead, if you see a lot of zeroes everywhere, something is wrong with your connections. Double check them all again! In the course of making this tutorial, I even switched two of the wires myself and had to re-solder them. If you hooked everything else up right, you will see numbers just like those above.
But then if i send a ''T'' to one of both (to set it into TX mode)...
...nothing happens, just a lot of fails-.-
I also tried re installing RF24 library cause i have read from a corrupted library but without success.

Any ideas? Really need some help here:(
 
Pedrodemio said:
I had a similar problem if i powered the receiver arduino from USB, lots of connection drop
Ok, gonno try again tommorow while powering rx from power supply. And also my connection does not drop, I don't even get a connection:/
edit:doesn't change anything
 
hi guys, so i have gotten the nunchuk_mod remote that vedder and i worked on to work with the wiiceiver/uno/nano basically this gives the the option for this who don't use the VESC to still use this remote and or use the VESC with ppm but have the arduino receiver to do other functions.

the remote will function the same as a wired or nyko kama with the wiiceiver.

code https://drive.google.com/file/d/0Bym9XrdeViekamhqVHphRmpwdWc/view?usp=sharing
next step is to port code for the remote from chibios to arduino for the stm32f103 line but won't finish this until i have usb bridge from the remote to the esc working (code almost finished)
 
Hi,

Why no one thought about esp8266 chip, you can setup 2 of them ( one as a server inside board and second as a client in controller) than send an infromation over UDP protocol(TCP requiers handshake since that there will be delay between sending and receiving). The connection should be better since this is an Wi-Fi. ESP8266 got possibility to install NodeMCU which allows you to act with chip as an access point, build in ADC I2S and PWM. You can buy this chip for as low as 3 dollars each and some versions are smaller than sd card.

/Sorry for my english/
 
Back
Top