Notifications
Clear all

Need help with nrf24L01

69 Posts
10 Users
12 Likes
5,333 Views
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

I'm trying to duplicate the "Wireless joystick for Arduino robot car with the nrf24" and my client keeps giving me a text saying it cant initialize. Even if I switch boards it doesn't change the server seems to be transmitting though. I'm new to this and it might seem easy to some of you, but trust me I'd be pulling my hair out if I had any left any help would be greatly apricated. 


   
Quote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@gkar2287

I assume you are trying to duplicate this:

https://dronebotworkshop.com/nrf24l01-wireless-joystick/

I have not built that actual project but have used the nrf24l01 to communicate between two computers.

https://forum.dronebotworkshop.com/introductions/hello-everybody-rclawn-arduino-robot-car-with-nrf24l01/paged/4/

You say "the server seems to be transmitting". Why do you think that?

Are you following the exact wiring and using the exact sketches?

We are unable to check your wiring or if it is powered correctly nor can we see the code you are using with it.

Adding some serial debug output may help you identify where your issues are hiding

 

https://forum.dronebotworkshop.com/help-wanted/init-failed-rc-n24-project/

https://forum.dronebotworkshop.com/introductions/nrf24l01/

https://forum.dronebotworkshop.com/help-wanted/nrf24-and-nano-rc-car-project/#post-26803


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

I have successfully built this project. Do you still need some help? Have you gotten 2 NRF-24 radios to talk back and forth without the robot car and joystick? Are you using the Radiohead Reliable Datagram code?


   
ReplyQuote
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

@robotbuilder Hi thanks for getting back to me. I'm running the example code that Bill used from the Radiohead library. My pinout is CE = pin 8 CSN= pin 53 SCK = pin 52 MOSI= pin51 and MISO pin 50 . I'm using a Mega board purchased through Amazon or eBay I can't remember which. Also I checked after you asked I thought it was transmitting because I saw the board flashing a light it appears that its the RX light flashing. Also I not sure how to use that serial debug or where to find it? When I run the serial monitor on the server one board it says init failed. On the client board it says No Reply is server Nfr24 running sending to nrf24 server. Also the client board is the one flashing.


   
ReplyQuote
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

@eliza Hi Eliza thanks for taking the time to answer me. I'm trying to get the two boards to communicate with each other its not for this project I'm trying to build a control system for my Terex boom lift and I basically need a wireless control option.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@gkar2287 

 I'm trying to get the two boards to communicate with each other

If you have another computer then you might try this setup I used.  You then can use the Serial Monitor to send and display data on each computer.  I will try and find the actual sketches I used and post them if you like.

To enlarge image right click image and select Open link in new window.

 

3536 connected

 

NRF24L01

 

 


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

@gkar2287 I have been able to get 2 NRF 24 radios talking both with and without the Radiohead library. One project uses 2 Arduino unos and one uses a mega and an uno. I'm using the 8 pin adapter that Bill recommends.

I had problems getting the pins correct and calling the constructor for theReliable Datagram, so I can help out with that part of it, as well as coding.

I attached the file for the client/transmitter just to test adding a file to my forum chat. This code is for a mega with radio connected to pins 9, 50, 51, 52 53

Let me know how I can help.

 


   
ReplyQuote
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

Hi Guys sorry I'm late getting back to everyone I have limited time to try fix this stuff. I tried to change out both of antennas and adapters I bought extras for other projects down the road.  Eliza I tried to copy that program and it wouldn't run because it's missing a library keypad.h I tried to download it and no luck I'm including pictures of my current setup.

20220413 120112
20220413 120250
20220413 120255

 


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

@gkar2287 My project uses a 16 key keypad, but you obviously don't need that. Just comment out anything related to the keypad. I was just trying to illustrate how I used a mega with NRF24. I changed the pins I used and called Reliable Datagram constructor with different parameters to get it to talk to those non default pins. Do you understand this? If not we can start there.

Question 1, do you have 2 radios talking to each other, regardless of other parts? That is step 1. I see from the photo that both Arduinos are megas. Don't worry about how long it takes to get back to me. It took me quite a while to get this right. I'll take it one step at a time with you.

This post was modified 2 years ago by Eliza

   
ReplyQuote
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

Hi thank you Eliza because its spring here I'm doing a lot of projects outside as well. Unfortunately I'm not that up to speed with these Arduinos I just started playing with them. My electronic background is very limited, I watched Bills tutorial and thought this should be a good place to start. Maybe I should start with what these are going to be used for I have a 60 foot Terex Boom lift and all the controls are shot you cant get any parts for the controls and if you send them to be repaired its a thousand dollars US and they don't work that long. Because the machine is driven by simple hydraulic solenoids I figured that I could use the Arduinos to control it. The newer machines use a wireless control system and I was hoping to integrate it in my machine. I should also say that in the basket 5 controls use pwm joysticks to control the speed of the hydraulics in essence pulsing the on off of the solenoids to slow the oil flow but the base controls are just simple double throw switch's.  My goal was to have a master Arduino in the base to start the motor monitor the sensors oil presser and temp and of course emergency stop switches. Then to have two other Arduino's one in the base and one in the basket to run the functions from the there. Because the base controls are mechanical switch's I would just leave them alone.


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

All that you propose is possible and practical. What is your starting place? Have you gotten an arduino to control LED lights? If not, that is always the starting place.

If you can control LEDs, can you control a relay? That would allow you to turn some of your equipment on and off. That could be a good starting point.

If you can control a relay then you would probably next want to control some of your equipment with a joystick, but without the radios.

Connect the radios last, after you have some other components running. OR, start with a simple 2 radio communication system that doesn't do anything else, except light up LEDs showing "message sent" and "message received"

Let me know what you choose as your starting goal.

Thanks,

Steve A


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@gkar2287 

Maybe I should start with what these are going to be used for I have a 60 foot Terex Boom lift and all the controls are shot you cant get any parts for the controls and if you send them to be repaired its a thousand dollars US and they don't work that long.

One of these? 

http://manuals.gogenielift.com/operators/English/TerexAerials/Terex%20Aerials/17149.pdf

I imagine there would be safety issues if they are modified?

 

 

 


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

@robotbuilder Ok. I looked at what you posted. You are working with a boom lift. I'm here to help you with arduino. If you can answer the question, "What have you done with arduino so far?" That will determine our starting place. I can offer no help with a boom lift. Have you even used an arduino to light up a LED?


   
ReplyQuote
(@gkar2287)
Member
Joined: 2 years ago
Posts: 19
Topic starter  

@robotbuilder I do have the schematics and manual for the lift and actually none of the safety devices have to be disabled. Since the machine was designed with a simple microswitch control system they can continue in that function. The only difference is I want the ability to control it remotely from a control box on the ground that I would have in my hand the newer lift units all have this capability and again all the safety devices are still in play because if any of them trip it locks out certain functions from operating. 


   
ReplyQuote
(@eliza)
Member
Joined: 2 years ago
Posts: 81
 

@gkar2287 Hi Gkar, I am still happy to help you. You can control the micro switches with an arduino. You can use another arduino to send radio signals to the arduino that controls the switches.

Please answer this question. Have you used an arduino to turn a led on and off yet?

If not, that is the place to start. Once you can control a led you can then use a relay to control another circuit.


   
ReplyQuote
Page 1 / 5