r/ArduinoProjects • • Aug 28 '21

Rover Update: Hardware complete. Most systems working.

158 Upvotes

25 comments sorted by

7

u/JimBean Aug 28 '21

Apologies for the focus in the close ups, I needed another pair of hands.

Time for a quick project update on the rover. Very happy to state that I have completed all the hardware I had intended to, and then some.

Last update, I had these things to do:

ESP32-CAM. ( mounts on the pan/tilt servo control )
How does it work. How do I use it. How do I use its information in the rover ?

I have The ESP32-CAM mounted and working well. I did the external antenna mod for longer range and it certainly makes a huge difference. Totally impressed with the signal from this, my first ESP32. Programming the CAM is a pain, so I have mounted it on a board with a micro USB plug and a switch for uploading. I have made an FTDI adapter that plugs right into the CAM now. Easy.

I can take photos remotely and they are saved to the SD card. I can stream video into VLC or on a browser with a full web camera interface. Really quite impressed with this little CAM. Wish it had a faster CPU tho, and some more memory. Only JUST managed to squeeze all my code on. I also put an async server on there to host my own js files off the SD card as well as the massive OpenCV library, which would have required me to be on line and download an 8 meg file every time I wanted to nav with the cam. (I'm still developing the OpenCV stuff, read next)

THEN

How to find the way outside and back without GPS ?

For this solution, I have used OpenCV (on a different port.) on the cam and told it to track the blue colour of tape on the floor to create a line following system. OpenCV tracks the blue line and if it moves left or right of centre, I use the X coordinates received from OpenCV to move my bot left or right to get back on track. It's working but requires some finessing. Like, how to find the line to begin with, and calculating how much to turn based on the 'X' data. Maybe a PID system ?

Also, I've had an idea to make coloured target 'beacons' around the house for navigation. I could tell the cam to look for them and what they mean. Create a kind of intelligent rhoomba mode. Maybe I'll be able to use OpenCV to calculate a position, based on LiDAR distance from target and triangulation. I could even lluminate them with a laser or infra-red pulse with data. A simple TV remote control protocol would do it and I already have a functioning infra-red sensor on board my bot. Or, I could put a laser on my mast (or the camera pan/tilt so it moves with the cam) and aim at the target and confirm the target with the cam. So much to think about. And loving it.

Pathfinding solution:

I have installed an ESP8266 with the 'A Star' algorithim. This is working and providing me with a solution using pseudo data. Some work required to get my LiDAR array to it, but that's just software. I have used the serial port that the ultrasonic sensor was using and converted that to a PWM input system. It's MUCH faster now. In serial mode, the ultrasonic sensor in front only has a baud rate of 9600, slowing everything down. Plus, you had to send a query string to it to tell it to send data. No good. But the PWM system it has is instant feedback, into a GPIO.

LineOfSite Ground Control Station.

Complete and working. Need some software work on the menu system but the remote control is really working well. With 2 NRF24LO1's. One for radio motion control and pan/tilt control and the other for telemetry and switching. There is also an ESP which will have a web interface and send serial data over TCP, for whatever.. (future) In the video, I am controlling the bot with this. I'll post pics of this project if anyone is interested in that.

I also have working now (besides the GCS 2 micros) 7 micros on my bot. I would not have thought it would be this way. But, it's a cool brag. ;) If I think about how many a modern car has, "it's not a lot on my bot". I remember, tho, thinking about the planning stage, and only catering for one micro. Huh.

So, that completes the hardware. Still much software work to do but no more guessing how I'm going to do anything now.

I have to say, I wonder if I knew how much work this would be, if I would do it again. I mean, I've loved the journey and the knowledge gained. And it is really satisfying to see it almost complete but the challenges have been quite hectic.

A salute to the Internet and every soul that took time to help or suggest things, without which I could NEVER have built this.

Thank you.

Next update:

Let's hope it's a video of my bot pathfinding. That's my last hurdle. And one I'm actually looking forward to it as I know what I'm doing there now.

Questions welcome.

Later.

3

u/[deleted] Aug 28 '21

This is where i feel limited. Be able to get work multiple sensors and motors together in perfect harmony like you did. I’m jealous… I know how hard is what you did. Really impressive! 🙂

5

u/JimBean Aug 28 '21

That's kind of you, thank you. Yes, I don't think many peeps realise just how much work it is. But, when it's finished, it's a really great feeling of accomplishment. And also, a stick in the eye to those that told me it couldn't be done, or I would never finish it.

;)

2

u/[deleted] Aug 28 '21

And you did. So fuck them congrats and never stop to be creative in your way. You’re really good, and who know’s where all this can take you! 😉

2

u/GloomyMusician24 Aug 28 '21

How'd you make the lidar sensor and is there a tutorial on making a linear sensor?

1

u/JimBean Aug 28 '21

I bought the actual LiDAR sensor, which is the 2 lenses in the middle. The 2 RGB LED's are just status lights. The head is interchangeable and reconfigurable but while I develop the system, I use them for "what's hapenning".

The mast, stepper motor and slip-ring assembly I made myself by heavily modifying and old fax machine paper feeder. The slip-ring was off the shelf and I removed one of the gears on the paper feeder and replaced it with the slip-ring in the middle by turning the inner gear to fit the outer slip-ring.

Linear sensor ? Could you clarify or did you mean the sensor itself ?

In terms of making a LiDAR sensor, I wouldn't try. The electronics that measure time of flight for light are beyond my expertise, not to mention the optics in the lenses. The sensor was cheap enough to warrant its use on my bot.

FYI, you can purchase small LiDAR systems with built in turning motors that use my same sensor. I wanted more.

2

u/Repulsive_Video_2521 Aug 28 '21

Awesome

2

u/JimBean Aug 28 '21

Thanks kind person. :)

2

u/theonlysithleft Aug 28 '21

This is amazing! Do you have any documentation for it? I'm just starting out with Arduino and hope someday I can build something as cool as this. This is so inspiring, well done!

1

u/JimBean Aug 29 '21

Thank you. I have docs but really just my notes and drawings. Nothing anyone could follow. It's all in my mind.

You will build something better. ;)

2

u/theonlysithleft Aug 29 '21

Sure! Thank you so much! 😁✌🏼

2

u/sharvinramkumar Aug 31 '21

Was thinking about making something like this for my final year project, but thought it was impossible for me. Thanks to you I feel even I can do projects like these. All the best for making this and thanks.

2

u/JimBean Aug 31 '21

My pleasure. And it doesn't HAVE to be so complex. You can make it as complex as YOU like.

2

u/More-Ad-2259 Apr 02 '23

This is impressive 👏 7 micros lol.. I've a pi and a nano, but it's jittery.. maybe splitting up the works would help.. the espcam is pretty good are you getting good latency? I used uv4l & picam. I'd definitely need more to add lidar, cool setup and nice recycling ♻️ job

1

u/JimBean Apr 02 '23

Thanks man. Yes, splitting them up was the key to making it all work. Especially the stepper motor for the LiDAR. It has its own micro, just for positioning and stepper control.

The ESPCAM is excellent. Others have had issues, not me. Latency is low. But you must use an external antenna. The built in ones are shitty. And you must have a good 5 V supply able to deliver 1 A.

LiDAR is cool to play with. I have a web interface that displays the data and I can click with the mouse and it will go to that angle to measure. It was a fun project.

1

u/JimBean Aug 30 '21

Thank you, kind people, for the awards. Sincerely appreciated. :)

1

u/Okami_Engineer Jan 02 '22

This is amazing! What kind of battery did you use to power the entire system? Looks like 18650 lithium ions? Or

2

u/JimBean Jan 02 '22

Thank you. ;)

Yes, 18650's. There are 4 inside, then another 4 on the outside that are auxiliary batts which I can switch on anytime. It feeds through a MOSFET to regulate the volts/amps.

2

u/Okami_Engineer Jan 02 '22

I see! I need to learn how to use lithium ions, seems like a good power source for projects! Do you have any recommendations to learn how to use these safely? Maybe a youtube tutorial you used?

2

u/JimBean Jan 03 '22

I don't. Not a tube fan. But there are SO many resources available for that. But, FYI, I use a proper, expensive charger for them. Originally I used a regulator on the rover to charge them but it was not a good move.

1

u/Okami_Engineer Jan 03 '22

Noted! Thanks!

2

u/More-Ad-2259 Apr 02 '23

That's pretty cool 😎.. Nice work

15

u/[deleted] Aug 28 '21

[removed] — view removed comment

6

u/JimBean Aug 28 '21

Thank you. ;)