Nunchuck Schematic NRF SPI

Discuss hardware related to the VESC such as the NRF nunchuk.
Posts: 21
Joined: 19 Dec 2015, 03:45

Nunchuck Schematic NRF SPI

Postby Blasto » 27 Jan 2016, 04:46

I am in the process of debugging my *seem to be* hardware problem. For the life of me I am not able to get the nunchuck to work. I was able to upload the firmware, the little red led turns on for a moment when I hold the C and Z. But nothing seems to be getting to the vesc.

Now I starting looking at the schematic to see where I start probing and I notice that the SPI from the mcu to the NRF doesn't seem to be right...? Shouldn't the SPI connection be direct, NRF_MOSI -> MCU_MOSI, NRF_MISO -> MCU_MISO, NRF_CSN -> MCU_NSS, NRF_SCK -> MCU_SCK
NRF_SPI.png (20.81 KiB) Viewed 5088 times

Is this corrected in the firmware pin definition?

here is how I have the vesc wired to the NRF
VESC_TO_NRF.png (265.51 KiB) Viewed 5088 times

Site Admin
Posts: 280
Joined: 15 Dec 2015, 08:38
Location: Sweden

Re: Nunchuck Schematic NRF SPI

Postby benjamin » 27 Jan 2016, 10:58

I haven't checked all your connections yet, but what I can see right away is that you have to connect CE to VCC on the nrf on the VESC. Also, you should solder a capacitor between vcc and gnd on the nrf. I used a ceramic 10µF cap, otherwise it won't be reliable.

You need to set the app on the VESC to NRF and make sure that the controller ID (in the app tab) is the same as the binary value on the address resistors of the NRF (R7 to R10).

Posts: 21
Joined: 19 Dec 2015, 03:45

Re: Nunchuck Schematic NRF SPI

Postby Blasto » 28 Jan 2016, 02:28

So I added a 10uF cap on the VESC's NRF, added a barnacle from VCC to CE on the NRF.

Taking in account that I populated all of the addr resistors, changed the controller ID to 15 (1111 bin).

hit Z & C, little red led turned on..... and stayed on! Everything seems to work!

I'll take the time to take nice picture when I receive my batteries for the nunchuck and document this whole process with some fancy MS paint schematics.


Posts: 1
Joined: 19 Feb 2016, 18:44
Location: Luebeck

Re: Nunchuck Schematic NRF SPI

Postby Sp4rtan » 19 Feb 2016, 19:10

Thanks for this thread Blasto!
Im starting with assebmling my PCB components soon and in the meantime I wanted to focus on the NRF Receiver for the VESC.

The little question I cant answer myself. Which are the address resistors on the NRF?
I wasnt able to find a layout of the NRF24L01 where they are shown but from the circuit schematic it doesnt seem to have that much resistors.
Sorry, Im a bit confused about that :)
nrf24l01_pin.jpg (134.29 KiB) Viewed 4937 times
nrf24l01-schematic.png (34.64 KiB) Viewed 4937 times

Posts: 86
Joined: 24 Dec 2015, 15:24
Location: Germany

Re: Nunchuck Schematic NRF SPI

Postby hexakopter » 19 Feb 2016, 21:08

The address resistors are on the Nunchuk PCB designed by Benjamin and not on the NRF. :D

User avatar
Posts: 33
Joined: 30 Dec 2015, 23:37

Re: Nunchuck Schematic NRF SPI

Postby Dude » 26 Feb 2016, 19:44

Hi to all of you Nunchuk NRF user,
I also started to assemble my Nunchuk NRF. First of all I soldered the PCB of the Nunchuk with all the SMD's, the Joystick and the cable to the buttons. So far so good - but I am not sure, if everything is working correctly up to this point (only the Nunchuk PCB, I haven't started with the receiver connecting to the VESC). So could someone please comment if the following behavior of the LED's is o.k.:
1. Connected the PCB to USB port, no battery connected to the PCB yet. CP2102 is detected at the USB port. Only the blue LED is constantly on.
2. I do a "make upload" and get the following output

Code: Select all

stm32flash /dev/ttyUSB0 -i -rts,dtr,-dtr:rts,dtr,-dtr -b 1000000 -w "build/ws2812_rf.bin" -v -g 0x0
stm32flash 0.4

Using Parser : Raw BINARY
Interface serial_posix: 1000000 8E
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0420 (Medium-density VL)
- RAM        : 8KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote and verified address 0x08003ba4 (100.00%) Done.

Starting execution at address 0x08000000... done.

3. All LED's are now on, constantly.
4. When I pull out the USB connector and then plug it again to my PC: Only the blue LED switches constantly on.

The question is: is this behavior i.O. (or should any of the LED's blink) and I can proceed or do I have to look for any kind of mistakes I did?

User avatar
Posts: 33
Joined: 30 Dec 2015, 23:37

Re: Nunchuck Schematic NRF SPI

Postby Dude » 29 Feb 2016, 21:25

Need Help from Nunchuk NRF Experts out there!

Up to now I finished the soldering of the Nunchuk NRF PCB and I connected the NRF24L01+ to the VESC HW 4.7 (unsoldered C3, connected CE to 3.3V and 10uF in between GND and 3.3V, CSN to Pin1 Servo etc.). If I press the C- and the Z-button the red Nunchuk LED lights up but goes off after some seconds. Nothing else I have made to happen ... my questions are

1. Do I have to do some additional configuration since I'm using HW4.7?
2. What do I have to fill in each of the 3 adress fields in the BLDC-Tool (4 resistors, 1111b, 15d but I have 3 fields)?
3. What channel is used, where can I find the value to be supplied in the NRF-Menu of BLDC-Tool?
4. What are the other values that have to be supplied in the NRF-Tab in the BLDC-Tool?

Maybe someone can give me some good advice - thanks in advance.

User avatar
Posts: 33
Joined: 30 Dec 2015, 23:37

Re: Nunchuck Schematic NRF SPI

Postby Dude » 02 Mar 2016, 21:23

Is there anybody out there ... no Nunchakas with NRF :geek: ?

Posts: 21
Joined: 19 Dec 2015, 03:45

Re: Nunchuck Schematic NRF SPI

Postby Blasto » 05 Mar 2016, 06:19

Make sure you're running fw version 2.13 on the vesc, when i tried 2.14, it was not working for some reason. I haven't reported this yet.

In the app tab, in general, set you device id to 15 if you have all the res populated. Tick the nrf app, write, then reboot.

The chuck should be solid red when it's paired

User avatar
Posts: 33
Joined: 30 Dec 2015, 23:37

Re: Nunchuck Schematic NRF SPI

Postby Dude » 05 Mar 2016, 11:43

Thanks Blasto,
I will try that. Currently I'm using FW1.16 - think I will do a downgrade. What are your settings in the Channel and the Adess field in the NRF tab?
Bildschirmfoto 2016-03-05 um 12.41.43.png
Bildschirmfoto 2016-03-05 um 12.41.43.png (15.72 KiB) Viewed 4759 times

Return to “Related Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest