๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

Sparki Robot position by (Stepper motors)
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Sparki Robot position by (Stepper motors)

by EngTeto on Thu Jun 15, 2017 8:12 am

Hi,
I want to know the position of the Sparki robot in real time to navigate it avoiding obstacles. So, I was wondering about using the stepper motors on Sparki wheels to achieve this task. I checked the following website but there is no much information about how this could happen in the circuit. It just showed codes to control distance and degree.
http://arcbotics.com/lessons/sparki/

I am not sure if the motor has a feedback to the circuit or not.
If, so how this work and which one of the five wires that connected to the circuit can tell about current robot position?
How can I know how many steps both stepper motors are rotated?
For example, by shaft encoder?

Thanks,

EngTeto
 
Posts: 8
Joined: Thu Jun 15, 2017 7:43 am

Re: Sparki Robot position by (Stepper motors)

by adafruit_support_bill on Thu Jun 15, 2017 8:45 am

The motors on the Sparki do not have encoders. You would need to track the number of motor steps in your code.
Other options for avoiding obstacles are to use the ultrasonic rangefinder sensor on the Sparki.

adafruit_support_bill
 
Posts: 75043
Joined: Sat Feb 07, 2009 10:11 am

Re: Sparki Robot position by (Stepper motors)

by EngTeto on Thu Jun 15, 2017 8:59 am

Thank you for your reply. I am going to use the ultrasonic rangefinder sensor and stepper motors to get better knowledge about the exact location. Is there is any solution to modify the circuit by adding a chip that can help to get motor movement precisely or any suggestion for a motor with shaft encoder that can fit with Sparki voltage/currecnt/ circuit correctly without any problems in overall performance and motor speed?

EngTeto
 
Posts: 8
Joined: Thu Jun 15, 2017 7:43 am

Re: Sparki Robot position by (Stepper motors)

by adafruit_support_bill on Thu Jun 15, 2017 9:01 am

Pololu and RobotShop both sell wheel encoder modules. They may have one that could be adapted to the Sparki.

adafruit_support_bill
 
Posts: 75043
Joined: Sat Feb 07, 2009 10:11 am

Re: Sparki Robot position by (Stepper motors)

by EngTeto on Thu Jun 15, 2017 9:16 am

I checked your website looking for a robot that has the following features:
- Ultrasonic sensor
- Motor with shaft encoder
- Bluetooth Module
I found the matching robot was Sparki except for Motor.
Do you suggest other robots that can meet these three requirements?

EngTeto
 
Posts: 8
Joined: Thu Jun 15, 2017 7:43 am

Re: Sparki Robot position by (Stepper motors)

by adafruit_support_bill on Thu Jun 15, 2017 9:47 am

Unfortunately, no. We do not have any robots with built-in shaft encoders.

adafruit_support_bill
 
Posts: 75043
Joined: Sat Feb 07, 2009 10:11 am

Re: Sparki Robot position by (Stepper motors)

by EngTeto on Thu Jun 15, 2017 1:58 pm

Many Thanks for your help and advice.

EngTeto
 
Posts: 8
Joined: Thu Jun 15, 2017 7:43 am

Re: Sparki Robot position by (Stepper motors)

by arcbotics on Thu Jun 15, 2017 9:04 pm

ArcBotics here!

The included stepper motors are pretty accurate themselves. As movements are already in calibrated centimeters and degrees, it would be simplest to just stick with that. I'm not sure how much more accurate an encoder would make it. There is some accumulative error over time, but that's true for any positional system, including encoder based systems.

arcbotics
 
Posts: 6
Joined: Tue Jun 24, 2014 8:45 pm

Re: Sparki Robot position by (Stepper motors)

by EngTeto on Thu Jun 15, 2017 11:21 pm

I don't think this is going to provide a real time position.

Since the motor turns a known amount each time a step is made, the position and velocity can be calculated. So, to do this correctly last command required to perform track back "dead reckoning" which is not accurate because it build on last comannded rether than the current position that can be read by an encoder.

Dear Arcbotics as you are the designer of Sparki do you recommend any shaft encoder that can fit with the robot circuit/ design/current/voltage?

EngTeto
 
Posts: 8
Joined: Thu Jun 15, 2017 7:43 am

Re: Sparki Robot position by (Stepper motors)

by adafruit_support_bill on Fri Jun 16, 2017 6:19 am

Hi Arcbotics! Thanks for dropping in.

@EngTeto - I agree with Arcbotics here. With high-ratio geared stepper motors on a relatively lightweight bot such as the Sparki, the chances of missed steps are very low. It is unlikely that encoder feedback would be any more accurate than the calibrated distances from the Sparki library.

In the world of robot navigation, encoders are considered to be just another form of 'dead reckoning'. They are a useful improvement for DC motor (non-stepper) drivetrains. But don't offer much over a well-designed stepper-based drivetrain.

adafruit_support_bill
 
Posts: 75043
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.