Notifications
Clear all

What kind of uC do you prefer/advise to control a bot

20 Posts
5 Users
0 Likes
781 Views
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

So here an general question as the topic title says...what kind of controller do you prefer or advise to use to controll a robot. State why you prefer the one you advise and what are the benefits of using that particular one.

My little experience is only ESP32 and Arduino but I see many use Raspberry Pi's. With the experience I have I can only say ESP32 is a good one to begin it is easy to start using sensors and actuators but it has its limitations. Most examples are based on just one sensors or actuator but when the code starts to be more complicated it gets a bit more tricky IMHO (probably also due to my limited experience with programming....I have only basic knowledge) But I'm curious to see how other people think about this subject so therefore I open this subject and see how other people think. It's a free and openminded topic.

Grtz,
Ray


   
Quote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Posted by: @electricray1981

So here an general question as the topic title says...what kind of controller do you prefer or advise to use to controll a robot. State why you prefer the one you advise and what are the benefits of using that particular one.

I thought it was clear to me what uC meant to you until I saw the Raspberry Pi.  I was assuming uC meant "User Control" as in the remote control that a person would be holding to drive the robot.  At the RaspPi mention, I now think you mean the primary brains on the robot although I don't know what the uC stands for in that context.

So I'll throw out and see what sticks...  (realize there will be many different opinions on this forum and this is just mine) Don't want to get into a flaming war.

I prefer the divide and conquer.  RasPi being a pre-emptive multi-process, multi-tasking environment is not well suited (IMO) to actually handling the motion.  It can pause and switch to another thread while it was moving some stepper motor.  I see it all the time when I used a RasPi Zero W on a 3D printer.  The printer would pause mid stroke for a fractions of a second and then continue.  Anyway, I would see RasPi as the ring-master that makes global decisions based on input.  The AI if you will.  It would then tell microprocessors where to move, but the micros would handle the real-time duties of actually counting the steps, moving the servo, counting the encoders and powering regular motors.  Same thing for the input side... things like lidar, radar, vision systems might be running on a micro and accumulate the data into a pre-processed "chunk" and pass that to the RasPi brain.  It would be the RasPi that would combine the various inputs to feed into its AI. 

On the micro processor side, I'm a big fan of the ESP8266 mainly because of my web server library, but also because its simple, cheap and can handle quite a few digital I/O duties.  When it gets overloaded, simply add another ESP8266.  The ESP32 is arguable superior, but in the grand scheme of things being 4x faster doesn't equate into 4x more servos, motors, steppers and sensors it can handle reliably.   

If you are simply saying uC is just the remote control of the human telling the robot to move turn and stop, then I prefer again the ESP8266 and use a laptop or phone to be the transmitter to drive it around like an RC car.  This also can be scaled up to far more powerful by using said laptop/phone as the AI having it make the decisions based on telemetry coming from the bot with simple ESP8266 handling the sensors and motion controls.

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


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

@inq 

Need a keyboard to type μC instead of uC 🙂

Essentially I agree the μC (micro controller) is useful for faster low level time critical functions and the RPi for the AI controller.

 


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

@inq 

Thanks you for your well explained answer/opinion

To take any misunderstanding away I will first explaine what a uC is for me ( that may be for other people different). uC is for me a micro controller, u is used instead of the greek letter mu and the C comes from controller as one would have guessed. For me (im pretty new to robots so forgive me if I make any mistakes here) the uC is the brain of the robot. It controls the bot it could be via remote control (radio or WiFI or any other wireless communication that exists today).

Now a specific choice of what I would like to that is offcourse a good question, At the moment im bussy with a project that should be able to control the bot via the pc on a GUI. But this post is more in general what I mean with this is what would be the "best" (taking in count we are doing this as a hobby) the best brain for a robot.

 

For my personal project for the moment what I like to accomplisch is to control a bot via the pc using a GUI. I personally think that is cool to do. That is offcourse a opinion other people mught think lets build a bot that is self learning and drive around etc etc. But the topic here I tried to open is more to find out what people use as "Brain"(instead of using uC) for their bots. Just as curiousity and learn from others opinion.

 

I hope this clarifies a bit my original post

Grtz,
Ray


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

@robotbuilder 

Posted by: @robotbuilder

Need a keyboard to type μC instead of uC 🙂

Essentially I agree the μC (micro controller) is useful for faster low level time critical functions and the RPi for the AI controller.

 

Your comment here makes me think that a RPI is not a micro controller. So now we arrive at some interesting learning stuff. because (sorry for the silly comment) for me a Arduino, ESP and RPI are all uC's (micro controllers). Which I consider as the brain of a robot. But reading the posts above I might be wrong......

Grtz,
Ray


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

 

Posted by: @electricray1981

But I'm curious to see how other people think about this subject so therefore I open this subject and see how other people think. It's a free and openminded topic.

I guess I'm one of those who used the rpi as the controller for my outdoor bot.  For me, one of the main reasons is that I find it much quicker to develop the code in python.  Of course if your skills are in C++ rather than python I would not see a compelling reason to use the rpi instead of some other board such as the esp32 or teensy4.1 for example.  Of course the rpi can be programmed in C++ if you wish too. 

But python for me, means I can get a prototype up and running, whilst I'd still be debugging my C code.  For robot use I've been mindful that python runs a lot slower than C and thought that moving on from the prototype phase I may have to use C on the rpi or on uC's to speed things up.  This has not proved necessary, but then maybe my bot is a slow mover 😀     An talking of uC's then a nod to the huge improvements to micropython that runs on some uC's such as the ESP32's. It relatively easy to include C modules for some tasks into the micropython runtime, and also to get micropthon to compile some routines into native machine code (not sure it this is for all boards on which it runs, but certainly for the rpi pico board this is possible)

So, to end all my drivel, I think maybe the use of rpi for bot control could all down to a preference for programming in python. 


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

@electricray1981 

They can both be controllers.  One is more micro then the other and one has an multi-tasking operating system whereas the other doesn't. You could just use the RPi as the only controller. As the number of i/o increases you would need to add more hardware.

Perhaps compare it with the brain. If you lose some of the lower functions the higher cortex can take over but it has to continually monitor the environment. When I touch type the higher level decides what to type and the lower level types away without the higher level having any idea where to move the fingers. I am a touch typist who has long since forgotten the keyboard layout! Should I lose the lower motor programs and lower level feedback systems due to a stroke but the higher level is still working I could go back to looking for keys and hitting them with one finger by visual feedback.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Posted by: @electricray1981

Arduino, ESP and RPI are all uC's (micro controllers)

I think the distinction (and I may be wrong here)

Raspberry PI as in like 4 with HDMI, USB ports is a microcomputer and mainly is distinguished as having a real operating system on it.

ESP8266, ESP32, Arduino, don't have an OS.  They're programmed directly. 

And as I mentioned... Microcontroller are real time... right now going to do something per your code.  The microcomputer might decide to do something it wants to do because it has pre-emptive multitasking and hundreds of other things going on beside your program.

 

Something like this robot uses a microcontroller ESP8266 to drive the wheels and monitor gyro and accelerometers.  It was eventually going to be self-balancing and lose the training wheels.  There is also no AI brain on-board.  It's all remote controlled from a PC/phone/tablet.  

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

@byron 

So that would mean I should start learning Python instead of C++.....right?

Grtz,
Ray


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

@electricray1981 I believe the industry definition is that a Raspberry Pi 4, and 3 is a Micro Computer and the ESP family are Micro Controllers. Asl, now there is a Raspberry Pi PICO and PICOW. That is a Micro Controller. The Pi for brains and PICO for handling sensors, motors etc is a good combination although you will not go wrong with the esp family as controllers also.

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
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

@inq

Posted by: @inq

I think the distinction (and I may be wrong here)

Raspberry PI as in like 4 with HDMI, USB ports is a microcomputer and mainly is distinguished as having a real operating system on it.

ESP8266, ESP32, Arduino, don't have an OS.  They're programmed directly. 

And as I mentioned... Microcontroller are real time... right now going to do something per your code.  The microcomputer might decide to do something it wants to do because it has pre-emptive multitasking and hundreds of other things going on beside your program.

 

Something like this robot uses a microcontroller ESP8266 to drive the wheels and monitor gyro and accelerometers.  It was eventually going to be self-balancing and lose the training wheels.  There is also no AI brain on-board.  It's all remote controlled from a PC/phone/tablet.  

 

Something like this is like I would like to achieve. I prefer personally more a Rover....for me a Rover is a bot that has 4 or 32 wheel drive around and records its surroundings has a capability to measure things at certain plaes etc. I'd like to be able for example to give it coordinates and it should drive around my house without any help but I could keep monitoring where it is at any moment in time. I dont think that I woll accomplish this in one year and I don;t need to ...so don;t get me wrong I don;t think this is a project I will do easily it will take some time studying testing etc etc and that the fun part of all IMHO

 

@inq

Youre video is awesome I have seen it now a couple of times but it is trully a great accomplishment, Like I said before just the sound of your bot i awesome makes me think of R2D2 youhave done a great job!!!

Grtz,
Ray


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

Posted by: @electricray1981

@byron 

So that would mean I should start learning Python instead of C++.....right?

I do not wish to give such advise, but if you are musing as to whether to invest the time and effort required to lean python, and you have a few hours to invest on doing a little research to see if it may be what you wish to do, then I suggest you have a read of the following introduction to python to see if  you want to go down that route. 

https://thepythoncodingbook.com/

 

 

This post was modified 1 year ago by byron

   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

Posted by: @zander

@electricray1981 I believe the industry definition is that a Raspberry Pi 4, and 3 is a Micro Computer and the ESP family are Micro Controllers. Asl, now there is a Raspberry Pi PICO and PICOW. That is a Micro Controller. The Pi for brains and PICO for handling sensors, motors etc is a good combination although you will not go wrong with the esp family as controllers also.

 

So understanding your comment ( forgive me if I interpret it wrong) is that one should use different approaches. I mean to say use e.g. a esp32 or esp 8266 for sensor handling and a RPI a the "main controller"for a better lack of words?
What you are saying is that one should combine both....am I right?

 

Grtz,
Ray


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

@byron 

Thanks for sure I will have a read if it is what I need/want. I always appreciate adives from others and it is all subjective so anybody can give his/her opinion.

My ultimate goal is just to make a awesome rover and I'm not in a hurry I love to learn new things and I'm not affraid to jump into something new as long it is worth the time. Therefore this topic just to see how others think about this all.

Grtz,
Ray


   
ReplyQuote
ElectricRay1981
(@electricray1981)
Member
Joined: 1 year ago
Posts: 119
Topic starter  

Posted by: @zander

@electricray1981 I believe the industry definition is that a Raspberry Pi 4, and 3 is a Micro Computer and the ESP family are Micro Controllers. Asl, now there is a Raspberry Pi PICO and PICOW. That is a Micro Controller. The Pi for brains and PICO for handling sensors, motors etc is a good combination although you will not go wrong with the esp family as controllers also.

 

This would be a awesome tutor for the dronebotworkshop IMHO. How to make communicating your esp32 (or arduino uno) with your RPI. If it doenst exists allready.

 

Grtz,
Ray


   
ReplyQuote
Page 1 / 2