Notifications
Clear all

Pushing a PM motor to it's lowest limit.

23 Posts
8 Users
0 Likes
5,268 Views
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @casey
Posted by: @robo-pi
I'll post the code when it's finished.  Although my code includes a communications interface to my laptop computer via an ESP8266 WiFi module on the Arduino Mega.  So the whole shebang might not be useful to others unless they have a similar set up.

I would be interested in the whole shebang.  I can always purchase a ESP8266 WiFi module.

 

My current communications set up is very simple.  All I'm doing is exchanging text commands via a serial port.  I have the ESP8266 connected to the Arudino Mega board via Serial1.  So they can basically text each other at will.   I then also have the ESP8266 connected to WiFi.  I'm using UDP instead of TCP because UDP is far simpler to implement in code and I have no need for the features of TCP.   The laptop is also connected to WiFi and so I communicate with the ESP8266 via a UDP exchange.   It's currently all being done using command words in text that are recognized by the Arudinio Mega and the Laptop computer.  The ESP doesn't need to do anything but exchange the data between the two computers.

If you're going to be sending large amounts of video data over to the laptop you're not going to want to use the serial port method.  You'd be better off using SPI or something else.

I believe @spyder had already suggested that there are ESP boards that are far better suited for video links.  They will not only exchange data faster, but they can also do a lot of video pre-processing right on the chip.

I have no experience with transmitting video information.  I have read about ESP boards that can do unbelievable things with video.   But I haven't done anything with that yet myself.

The ESP8266-01 chip is about the most basic ESP chip you can get.   I'm not sure that this is what you would want if  you intend to exchange video data with a laptop.   Probably not.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
Spyder
(@spyder)
Member
Joined: 5 years ago
Posts: 846
 
Posted by: @casey

Ideally for dead reckoning you need powerful stepper motors

Wouldn't stepper motors be just as unreliable as encoders if the wheels spin ?


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @spyder

Wouldn't stepper motors be just as unreliable as encoders if the wheels spin ?

Yes there's wheel spin to take into consideration as well. ? 

This is another point for the actual reason I started this thread.  Having finer control over motor speed and acceleration can help reduce wheel spin considerably.    If you need to start out at full speed to get the motor turning, then the robot basically does a "burn-out" every time it starts to move.  Like popping the clutch in a stick-shit car.   So the robot is constantly doing "burn-outs".  This can add up, especially when doing a 90 degree turn standing still, or a 180 degree "about face".    If the tires are doing "burn-outs" the angle the actual robot body turns is going to be less than expected.

But if you have the ability to start turning the tires very slowly at start-out and then accelerate up to speed, this would be like letting the clutch out smoothly in a car.  No 'burn-out' and therefore no tire slippage on the pavement or carpet.

So yes, this was another reason I wanted finer motor control.  I want to prevent "burn-outs" or "laying down the rubber". ? 

I want to be able to start turning the wheel very slowly at first and then "let the clutch out all the way" only after I get up to speed thus minimizing tire slippage.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@zeferby)
Member
Joined: 5 years ago
Posts: 355
 

Hi @robo-pi

To manage acceleration you may find some inspiration with one of the "easing" libraries ?

Here is one I tested with servos : https://github.com/ArminJo/ServoEasing

Some easing function curves : https://easings.net/

Eric


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @zeferby

To manage acceleration you may find some inspiration with one of the "easing" libraries

Just looking at the graphs was inspiration. The "easeInBounce" curve will probably work best for my application.   I won't need a library I can just program that behavior directly.  A library is probably just a large collection of easing functions.  But I think the easeInBounce is all I would need.  And perhaps flipping it horizontally to also use as an easeOutBounce for slowing down to a top smoothly.

Thanks for the ideas.  I'll give it a shot.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@zeferby)
Member
Joined: 5 years ago
Posts: 355
 
Posted by: @robo-pi

I won't need a library

You probably don't need that specific one at least because it is dedicated to servos.  But have a look at the source code : you'll find that the easing functions themselves (at the end of the cpp) are mostly very small and simple when the input is a [0.0-1.0] fraction of the total movement.

Not so sure about the bouncing though...
Image result for kangaroo gif"

Eric


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
Topic starter  
Posted by: @zeferby

Not so sure about the bouncing though...

I don't know if the easeInBounce will work or not.  But it would be very easy to program.  I'm still thinking that using a higher voltage for the motor source is the ultimate answer.  I haven't been able to do that yet as it takes time to rewire everything.  I have the room to add another bank of AA batteries.    I plan to eventually switch over to rechargeable .  Everything is still in the development stages.   I don't want to invest in a rechargeable battery until I'm sure of exactly what battery I want.   It needs to fit on this little chassis.  I'll probably go with something like rechargeable AA's or something of similar size.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@zeferby)
Member
Joined: 5 years ago
Posts: 355
 
Posted by: @robo-pi

I'll probably go with something like rechargeable AA's or something of similar size.

I have found some cheap Amazon Basics charger + sets of 8xAA or AAA for that kind of purpose. Actually the battery holders were nearly as expensive as the batteries themselves...

Eric


   
ReplyQuote
Page 2 / 2