Notifications
Clear all

My first robot.

78 Posts
9 Users
32 Reactions
4,217 Views
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @lee-g

That's the problem with not knowing what you're doing (referring to me), you don't know which is the better way to go.

It is just my opinion and I am in the distinct minority.  I'm not a hardware guy (strictly software).

 

My first robot really sucked.  I didn't even do a topic because I was embarrassed.  I couldn't get it to go in a strait line.  It would sometimes do it at first and it'd warm up and start curving.  I did install DIY encoders, but never really integrated them in software.

1st

 

I've yet to have someone give a logical answer why using motors - brushed or brushless is better.  So far, it seems to always coming down to that is the way it has always been done.  

Here is a later design, before InqEgg.  This video shows a calibrated stepper motor bot.  It was given 4 commands at the beginning.  (Go strait for 50.000 feet, turn 180°, go 50.000 ft, turn 180°)  After that, is was completely autonomous.  It also has no encoders, and no sensing (feedback) of any kind.  Purely dead-reconning.  This took minimal coding on an ESP8266 WHILE hosting a website so that it can be controlled, show diagnostics and accept commands.

Either way, I would root for anyone building any kind of robot... cosmetic, moving at all, talking, listening, sensing of any kind, doing any kind of work (useful or not).  I'll root for yours and cattle prod you if you want.  😎 We're all at various stage of "old" and this playing (using our minds) is the best way of keeping up young-ish.  😊 

Just say the word and I'd be glad to help you in your project.  @davee would definitely be the hardware expert, but I can definitely help on the software side.  C++ preference, but I'm learning Python for my class this Fall Semester.



   
Lee G reacted
ReplyQuote
noweare
(@noweare)
Member
Joined: 6 years ago
Posts: 229
 

I think that's a good result for not using encoders or feedback of any kind. There will always be some difference between the motors that will cause some error.  If you have a mat you could place over the floor to smooth things out maybe that will help.



   
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @noweare

I think that's a good result for not using encoders or feedback of any kind. There will always be some difference between the motors that will cause some error.  If you have a mat you could place over the floor to smooth things out maybe that will help.

Although in the video I was wanting better than the 2 inches.  I would challenge anyone to build a bot WITH encoders and feedback (if they wish) to get better than this 0.167% error.    The point I was making in this context is that stepper motor don't have differences that will cause errors.  You tell them to turn one revolution (200 steps or 3200 micro steps) and they will do that consistently without error.  The error in my bot can only be attributed to differences in the two 3D printed wheels or the floor causing micro-slipping.

This is why I am a strong proponent for stepper motors over any analog type motor.  They're easier to program, and integrate with a microcontroller.  They can be both fast and strong without fancy gearing.  Yes, analog motors can be fast or strong, but not really both and certainly not with the same power constraints of battery run time.

 



   
noweare reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2571
 

@inq 

You might like to ask chatGPT "Why aren't stepper motors used in motorized wheel chairs?"

Stepper motors are simple and accurate for things like robot manipulators and printers (including of course your 3d printer) or little robots on a flat obstacle free surface. Biological controllers use feedback loops for a good reason. Indeed you might say basic control involves comparing actual output with desired output (goal seeking, learning, adaption to change). If the motor stalls or fails in some way feedback will signal a fault. An animal will adjust should its legs be damaged, for that it needs feedback, same with robots in the real world even if you are using stepper motors.

 



   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @robotbuilder

@inq 

You might like to ask chatGPT "Why aren't stepper motors used in motorized wheel chairs?"

Stepper motors are simple and accurate for things like robot manipulators and printers (including of course your 3d printer) or little robots on a flat obstacle free surface. Biological controllers use feedback loops for a good reason. Indeed you might say basic control involves comparing actual output with desired output (goal seeking, learning, adaption to change). If the motor stalls or fails in some way feedback will signal a fault. An animal will adjust should its legs be damaged, for that it needs feedback, same with robots in the real world even if you are using stepper motors.

 

Oh, I completely agree, feedback of the environment is vital.  I wouldn't dare consider the blind-folded robot a final solution.  I (in my vocal minority 😉) believe I can start with a known, consistent, powerful robot with steppers and bypass a LOT of initial complexity.  Many people give up because they start as I did using, plastic geared motors, frying pan hot LM298N and wonder why they go strait sometimes and as they warm up (actually fry eggs hot) run in circles. 

 

The difference in price between junk like my first one:

1st

and InqEgg,

PXL 20231110 160507607

is negligible. 

 

I don't expect to make any converts.  I'm happy to be singing solo from the mountain top. 

 

And as far as wheelchairs are concerned, I'll concede defeat - steppers are inadequate.   

 



   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2055
 

Hi @inq et al,

  Surely the discussion about motor type is usually a function of system cost and 'necessity' requirements. 

  By 'necessity' requirements, I mean those that are 'must have' rather than the 'convenient to have'.

  Most motor driven machines can be probably made to achieve their function using a 'conventional' brushed motor, with enough sensing and clever feedback wrapping to make it do the required task.

A conventional brushed motor can also be used for many applications, with little more than a relatively simple power flow control system, sometimes just a rheostat, when driven by a skilled operator.

By comparison, a 'stepper' motor requires comparatively complex power waveform to make it rotate.

Of course, the development of solid state power control devices over about the last 50 years has progressively made the generation of complex power waveforms smaller and cheaper, largely, but not yet completely, reversing the relative economics of the different approaches.

Note, for applications such as robotic machines, I am only considering the part of the 'actuator' system that turns an object, with relatively low level commands, like 'rotate 3.5 turns at 5 turns per second', into a mechanical motion. The part of the system that produced that command, be it an antique paper tape reader or a complex AI system, with vision, etc. is a different discussion.

Given the availability of low cost, efficient, power control electronics, it becomes increasingly difficult to justify using brushed motors, and for applications concerned more with positioning, such as Inq's robots, it is difficult to imagine why a brushed motor solution should be recommended.

However, I am wondering whether I should be more familiar with a wider group of brushless motors. Occasionally, I have come across synchronous motors in products, which largely rely on the AC mains waveform, including clocks, fans, power tools. These use none or few electronic components, but have little or no control facility for the user. More recently, BLDC - Brushless DC motors, are appearing. In some cases, such as small fans, their 'DC' name seems justified, since the user simply connects a suitable DC voltage, such as 5Vdc, and they spin, but in others with sophisticated control interfaces to provide precision multi-phase currents, it feels misleading. Of course, even in the basic fan case, 'DC' ignores the 'magic' circuitry hidden in the fan frame. 

The more interesting examples provide an interface to the electronic circuitry that generates the required waveforms for the motor, so that a computer or other device can dynamically control and monitor the motor's rotor speed and position. Although BLDCs and stepper motors are often described in terms that suggest they are completely different, am I making a mistake in assuming they are actually both in the same family. Of course, there are differences. I suspect most stepper motors will have more poles than most BLDC motors, so that the angle of a 'whole' step for a stepper motor will be less than for most BLDC motors. More poles may tend to increase the accuracy that an angle can be set to, but in some cases, especially those with reduction gearing, this may be inconsequential, especially if the speed of the motor is limited by the ability to generate a fast enough waveform.

Out of curiosity, has anyone looked at BLDCs with suitable control interfaces as an alternate to stepper motors.

Note this is just my curiosity running wild, as I like to try to understand how things work ... I am not in need of such a solution, and I know from his videos, Inq's stepper motor bots are easily quick enough for his application.

Furthermore, stepper motors also seem to have 'standardised' product structure, such as NEMA 17 and so on, which are cheaply available from AliExpress etc., whilst BLDCs are more customised for an end user application, so sourcing an appropriate motor for a one-off at 'hobbyist' price, perhaps excepting those used in flying drones,  might be challenging.  

Best wishes to all, Dave.



   
byron reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2571
 

@inq 

I don't expect to make any converts.  I'm happy to be singing solo from the mountain top. 

Your use of stepper motors makes sense even if only because your robot uses them 😀

Duplicating them with PID controlled dc motors and accurate encoders would just be an extra complication.

In my case I don't do odometry to navigate as my robot will "see" where it is and what direction it is looking all the time. Essentially in theory it is just like using a human visual system to control a crude remote controlled toy car. 

I am thinking of using two stepper motors as the best solution to move its head (with camera) around without having to turn the whole robot.

 



   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @robotbuilder

In my case I don't do odometry to navigate as my robot will "see" where it is and what direction it is looking all the time. Essentially in theory it is just like using a human visual system to control a crude remote controlled toy car. 

Maybe because you are at an advanced stage of development using feedback control making robots, you see it as second nature and a free-be.  Although I am keenly interested in doing that, I'm not quite there yet.  My earliest experiments include the multi sonar things so it doesn't bump into walls and a simple line follower.  The fact that those bots HAD kept detecting and bouncing back was deflating/boring.  I didn't attribute that to the detection, or even the simplistic drive logic, but to the dynamic, non-linear and inconsistent differences of the two motors and driver as they warmed up or experienced different loads.  

I'm sure you use better, more consistent equipment than the plastic geared, toy drives and L298N drivers.  Every time we have gotten into this debate, I've gone to search for motors and encoders.  I did/do want to learn and still would like to understand your point of view.  I never really found the items that made sense. 

Would you be so kind as to provide some links to just the type of motors, drivers and encoders you'd recommend to an intermediate beginner?  As this topic is about "My First Robot", I'm sure it would be of interest to many people visiting this forum and seeing this topic.

Thanks,

Inq

 



   
Lee G reacted
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2571
 

@inq 

Maybe because you are at an advanced stage of development using feedback control making robots, you see it as second nature and a free-be.

I have been interested in visual processing for along time but that is not advanced feedback more a case of higher level processing. A self balancing robot is more in terms of a real time feedback system that has to be fast enough to take action before the robot falls over.

I'm sure you use better, more consistent equipment than the plastic geared, toy drives and L298N drivers.

I use motorized wheels with encoders taken from robot vacuum cleaners. I am using the L298N hbridge to deliver power to the motors.

The robot image I use as my avatar used 24volt truck window screen wiper motors. I never got to implement encoders though it was planned. And I build my own crude hbridge out of MOSFETS to replace my original hbridge made from relays. There is a picture of it somewhere in these forums. I used a speed control kit with soft start to deliver power to the motors.

robotBase

 

... what kind of computer is taking the image, finding the targets and what kind of frame rate are you able to process?

A Windows based laptop using webcams. Haven't measured the frame rate. There is also the time it takes to process an image which varies according to the complexity of the analysis. I used FreeBASIC which compiles to very fast code second only to C++. I used Turbo C++ in the MSDOS days. It also has an inline assembler so you can actually process images really fast if you wanted to.

This is very much an on again off again mostly thinking about it hobby. Software is the hard part but cost nothing but time, hardware is the expensive part. I like the cognitive challenge of software although my first love was electronics.

 



   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @robotbuilder

The robot image I use as my avatar used 24volt truck window screen wiper motors. I never got to implement encoders though it was planned. And I build my own crude hbridge out of MOSFETS to replace my original hbridge made from relays. There is a picture of it somewhere in these forums. I used a speed control kit with soft start to deliver power to the motors.

That is really cool!  You got to respect a guy that can take what some people consider junk, tear it apart and put it together in new and interesting things!  👍 

 



   
ReplyQuote
byron
(@byron)
No Title
Joined: 7 years ago
Posts: 1276
 

Posted by: @davee

Out of curiosity, has anyone looked at BLDCs with suitable control interfaces as an alternate to stepper motors.

I haven't, but after your post I did search to see if there were any examples of using them for self balancing bots.  And there were.  I think it would be interesting to do a bit more research on these motors.  Ive seen them being put to good use in drones and remote controlled model cars,  and thought of them as fast high powered motors, but I did not appreciated how they worked, or how one might use them.  As you say, interesting.  And from @inq 's post fast motors may be right up his path.



   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 7 years ago
Posts: 2571
 

@inq 

That is really cool! You got to respect a guy that can take what some people consider junk, tear it apart and put it together in new and interesting things!

Thank you I think. For some reason I am not very good at knowing how to respond to approval from others for anything I do. The danger I see is when you need external approval from others to have any self worth. It is much better to depend on self approval which protects you from doing silly things just to fit in with the crowd. I see young people today with tattoos and metal piercings and torn jeans just so they can be accepted by their peer group. I guess that has survival value.

I actually respect your drive to renovate your house and tackle the complexity of building a self balancing robot or explore the possibilities of the latest sensors.



   
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @byron

And from @inq 's post fast motors may be right up his path.

Yeah, I have some for RC planes... that go fast... then auger in.

 



   
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2051
 

Posted by: @robotbuilder

I actually respect your drive to renovate your house and tackle the complexity of building a self balancing robot or explore the possibilities of the latest sensors.

It comes out of fear of turning into the real old folks that vegetate in front of the TV watching golf.

... and being able to ride in an autonomous wheelchair inside my house (at high speed).

Inq 😊 



   
ReplyQuote
Lee G
(@lee-g)
Member
Joined: 6 years ago
Posts: 122
Topic starter  

@inq, @byron, @robotbuilder

To show a little (more) of my ignorance and further proof that I don’t know what I’m doing… Are you guys telling me (or suggesting) that I should throw my (yellow) TT-style motors away and go with TT-style motors with metal gears and an included encoder (or even stepper motors) for my self-balancing robot?? I have no experience in implementing motors, motor drivers and motor control in a project. Much less anything about the timing and control loops needed to keep the thing balanced. I'm working on the basics of motor control using the Pico2W now, using a test jig I built up with the Pico2W, TB6612FNG, and power supply. It's all about the learning process, right??  I apologize for these very elementary questions. 



   
ReplyQuote
Page 4 / 6