Notifications
Clear all

Hello everybody. RCLawn Arduino Robot Car with nRF24L01+

51 Posts
5 Users
0 Likes
4,692 Views
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

My Name is Mike. I come from an electronics background but I am a coding nobody. I am new to Arduino. I aspire to make "Wireless Joystick for Arduino Robot Car with nRF24L01+"Β  into a rc lawnmower, hence the RCLawn profile name. I did finally get it moving but I need controls for a couple of switches for start and run (it's a gas mower), maybe even lights and a horn...I need help.


   
Quote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
@rclawn

My Name is Mike. I come from an electronics background but I am a coding nobody. I am new to Arduino. I aspire to make "Wireless Joystick for Arduino Robot Car with nRF24L01+"Β  into a rc lawnmower, hence the RCLawn profile name. I did finally get it moving but I need controls for a couple of switches for start and run (it's a gas mower), maybe even lights and a horn...I need help.

Welcome to the forum.

If it's going to eat grass, maybe you should call it an RCSheep πŸ™‚

Do you have any specific questions for us ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
WhitneyDesignLabs
(@whitneydesignlabs)
Member
Joined: 3 years ago
Posts: 99
 

Have you watched Bill's video about the FlySky RC radio? I don't know how far into your build using nRF24L01 you may be. But the Flysky is very powerful and may do everything you need. I am working on a 6wd rover robot using wheelchair wheels. I have see other people automate lawnmowers, by simply adding castors in front, and a pair of wheelchair wheels in back. Might be an option for you. What questions do you have? We can help.

Imagine by thought, create, don't wait, Scott.


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@will

Thankyou for asking.

Β 

The sheep(lawnmower, it does have a place for a bagger ) has a key startΒ  and a micro switch operated by the crossbar. I wanted to replace both with relays. I cant figure out how to add / manipulate the code to add some buttons / relays. I thought someone on the site might help.electrically I can do this if i can get the I/Os to play along.

I thought after a few of Paul's lessons it would be simple to add a couple of inputs and outputs but I'm not getting it.

Not sure if there are reservations about adding bells and whistles(or horns) to RC projects because not everyone has good intentions. I was working with a couple other programs but I haven't found any other projects that I have been able to get working yet, that I don't have to buy more stuff and nearly all would still need to modified the same way.

I was using the code provided in

The nRF24L01 - Wireless Joystick for Arduino Robot Car with nRF24L01+

Thanks in advance for any help you will give


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@whitneydesignlabsΒ 

Thank you for your recommendation.

I did watch it until I saw the receiver connected to Arduino, at that point I may as well buy a speed controller. Also the a cheap FlySky RC radio will cost more than everything I have in this already.

I really was trying to make it work with the Arduino (I'm a cheapskate). The mower and the drive motors from a power wheels are roadside salvage.Β  I got it running and thought it would be neat but if I'm dumping money into it I'll probably fix the self propel and sell it or give it to dad(he's (and me) more likely to use it if it's a toy). it probably a waste of time and effort but I have never heard of one. I did have it rigged up to a cheap rc car rx but that doesn't start it.

I'd really like to add some buttons and relays and a camera and a weather station, lights, horn, GPS......but buttons and relays are the goal.

Mike


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6664
 

@rclawn I think you are starting with much too complex an example. You would be much better off given what you say your experience level is to getΒ  a LED to light when you push a button. Then put a DC relay between the Arduino and the LED, now replace the DC relay with a pair of wireless devices. Now you have a working prototype and the real work can begin of making the prototype work in the real world. BTW, do NOT use Bluetooth, waaaay too unreliable. Also, have you done a very rough cost estimate, nothing worse than getting almost done only to find the cost is beyond your reach. My very rough guess is prototype is between $50 and $100, fully deployed probably closer to $150 to $250 depending on how professional you want it to be.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 

@rclawnΒ 

OK, let's talk switches πŸ™‚

Is this a gas or electric mower ?

What does the microswitch on the crossbar do ?

Have you identified what relays you need/want to use in place of the switches ? Since relays need a fair bit of power to operate, your Arduino won't be able to power them directly, so you'll need to use a MOSFET or transistor to power them and then use an Arduino pin to turn that on.

So, step 1 is to decide what relays you'll need to use and, from their data sheets, determine the voltage and current required to drive them. Then we can talk about what you'll need to use to drive them and then we can decide how to wire them up.

By the way, who's Paul ? As in "after a few of Paul's lessons" ...

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@will

Thank You again,

I do appreciate your help.

The micro switch on the crossbar, based on what I know about gas mowers grounds the coil when released so in the running position NC 12v coil relay energized to open when activated (verified, I couldn't see any ratings on it and they riveted it to the sheet metal mount) . It probably will need a driver transistor probably a diode too. The starter motor will likely need a similar setup. it's using a key switch but I may have to use a starter solenoid from a riding lawnmower(dig through my riding lawn mower parts) Toro was calling for a 40A fuse(the 30A i put in hasn't blown). They soooo don't want you to know any specs on this stuff...

I have a small board i made for the controller module with 2 momentary and 2 latching push button switches. Latching for run and lights, momentary for start and horn. Right now I'm driving the power wheels geared motors(stock 550 size from a child's ride on toy) with a l298n module my plan was to use 1 for each side but it is working for test. 12v lawn or sealed battery to start / drive motors with small dc-dc converter for electronics. I wanted the control part going before I started tearing up the mower. I did get starting with key( I'd never seen a key start push mower prior to this).

Toro Model #: 20031
22in Recycler Lawnmower


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

Paul McWhorter from https://toptechboy.com/arduino-tutorial-1-getting-started-with-the-arduino-for-beginners/

Β 

I did do about 30 of the lessons(since Feb. 2021) for some reason we want run before we crawl...


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 

@rclawnΒ 

OK, if you already have a 12V power supply with a high amp rating, then you're probably better off using MOSFET than a relay. It's a switch capable of controlling high power circuits using low enough power that you can probably control it with the Arduino directly.Β 

They also last a lot longer than relays and use a lot less energy to operate and there's no backlash EMF to worry about.

You'll want a "logic level" MOSFET (I prefer N-Channel which means that they operate of the low side of the load). The "logic" part of the name means that they'll trigger fully on less than 5 volts.

Bill has already dealt with this topic ...

By the way, these can also power your horn, headlights and squirrel prod πŸ™‚

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @rclawn

Paul McWhorter from https://toptechboy.com/arduino-tutorial-1-getting-started-with-the-arduino-for-beginners/

Aha, OK - never heard of him. I'll go check him out.

Β I did do about 30 of the lessons(since Feb. 2021) for some reason we want run before we crawl...

Ah, but a man's reach should exceed his grasp, Or what's a heaven for? (Robert Browning)

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@ronalex4203 Thank You in advance for your help.

I hope this isn't too much.

I agree with the too complex. I'm good up until after the relay part. I did about 30 lessons, including motors, disply sensors, ect. I was really just following along and doing the "homework".

I'm not a programmer. I can hack up code change IDs and ADDresses, text and menus but I was never any good at the the else ifs. that's why I got the starter kit. Don't recall anything in any of the lessons about nrf24l01. So i dug around on YT / google for some code that was already what I needed thinking I could and an LED and a switch. The only place I've seen anyone use the radiohead library is Bill of Dronebot.Most examples use the pipe...rf24.H?

#include <SPI.h> //interface with the transceiver
#include <nRF24L01.h> // transceiver box of tricks
#include <RF24.h> // transceiver other box of tricks

The mower is free, the gear motors are free, i have invested about 35-40 in uno r3 and a pair of nano w/ nrf24l01 adapter and ant(china copies I found out).l298n came with elegoo starter kit. I am trying not to buy another transceiver set but no body seems to use the same spi pins (CE and CSN) and jumpers aren't very reliable for real data. The rest is surplus and scrap / junk. I have do alot of junk. Starter solenoid from old lawn tractor. i have 2 or 3 potter brumfield 5v coil 10A probably120vac.Β 


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

@will I concur. The only issue I have with the fet is I will likely have to buy them and the relay and small BJT I probably have?(2n2222 if it will hold up)Β  I will definitely consider it. I need more exp. w/ FETs(aside from changing it frequently in my benchtop pos ps( i bought 10 for backup)...overload protection my I...doesn't like shorts at all. Took it out with a ryobi tool once too(dustbuster).

How do you feel about IRF3205? / any particular recommendation? i know there is a high current H-bridge out there that uses them. I was looking into L298n contingencies)


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @rclawn

@will I concur. The only issue I have with the fet is I will likely have to buy them and the relay

No, if you use the MOSFET, you won't need the relay, the transistor replaces the relay.

and small BJT I probably have?(2n2222 if it will hold up)Β  I will definitely consider it. I need more exp. w/ FETs(aside from changing it frequently in my benchtop pos ps( i bought 10 for backup)...overload protection my I...doesn't like shorts at all. Took it out with a ryobi tool once too(dustbuster).

If you plan on using 2N2222's, then I suggest you buy them by the pound because I expect they'll pop like popcorn.

How do you feel about IRF3205? / any particular recommendation? i know there is a high current H-bridge out there that uses them.

I've never used them, but the datasheet looks good and you can buy 'em cheap and fast from Amazon ...

"https://www.amazon.ca/s?k=IRF3205&ref=nb_sb_noss_2"

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@rclawn)
Member
Joined: 2 years ago
Posts: 47
Topic starter  

I thought they would hold up for the 5v relay, anticipated problem with a starter solenoid. I must have typed it funny, I didn't mean to use a FET in combination with a relay. BJT+relay or FET.

Never Try, never fail...I'm sure it was some smart guy I've never heard of....thankfully he was quoted by someone I did.


   
ReplyQuote
Page 1 / 4