0

Lawn Robot
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Lawn Robot

by pebblepicker on Tue Mar 16, 2021 10:06 am

Hi

I want my robot cart to keep its direction and speed when running on my lawn, which is an uneven terrain.
For this purpose I think I need an Accelerometer and Gyroscope device. Which one will you recommend?

will this one "Adafruit ISM330DHCX - 6 DoF IMU - Accelerometer and Gyroscope - STEMMA QT " serve the purpose?


Thanks,
Charlie

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by adafruit_support_bill on Tue Mar 16, 2021 10:17 am

To maintain direction over any distance without drift, you would need a magnetometer or a GPS. A GPS can also give you a long-term average speed. But for short term speed estimates, you might want to consider some encoders to measure your wheel RPM.

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

Re: Lawn Robot

by pebblepicker on Tue Mar 16, 2021 10:40 am

I do have a GPS onboard.

The issue is the drifting. When one side is lower than other, the vehicle will drift toward the lower side, and GPS can't detect this condition.

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by adafruit_support_bill on Tue Mar 16, 2021 10:53 am

Inertial sensors like accelerometers and gyros are good at detecting instantaneous rates of rotation or acceleration. Translating that into a direction of travel involves integrating over time and is subject to drift due to cumulative noise, offset and quantization errors. Magnetometers and GPS can give you absolute readings for heading and location. But they have their own limitations such as magnetic interference and GPS resolution.

The usual approach to these limitations is to use something like a Kalman filter to fuse the instantaneous inertial readings with the longer-term absolute readings to create a more accurate estimate of position and direction.

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

Re: Lawn Robot

by pebblepicker on Tue Mar 16, 2021 10:56 am

Do you have a Magnetometer to recommend?

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by adafruit_support_bill on Tue Mar 16, 2021 11:10 am

We have the standalone LIS3MDL magnetometer: https://www.adafruit.com/product/4479

We also have some 9-DOF IMUs which incorporate Accelerometers, Gyros and Magnetometers into a single board:
https://www.adafruit.com/?q=9dof&sort=BestMatch

The BNO085 is a 9DOF IMU with a built-in processor pre-loaded with datafusion firmware to calculate things like absolute orientation and the linear acceleration vector.
https://www.adafruit.com/product/4754

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

Re: Lawn Robot

by pebblepicker on Tue Mar 16, 2021 1:28 pm

Thanks for your helps.

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by pebblepicker on Sun Apr 25, 2021 11:41 am

Hi,

It seems Adafruit DS3502 I2C isn't powerful enough to handle all four wheels on the vehicle. I measured the voltage and current between RW abd RL when running the wheels:

- when connecting to two wheels, at the highest resistor setting value - 127, the voltage value is 2.2V, and the current value is ~430uA
-When connecting to four wheels, at the highest resistor setting value - 127, the voltage value is dropped to ~1.3V, and the current value is raised to ~540uA. The speed of all wheels is dropped significantly.

To operate the hub wheel, the voltage between RW and RL should be 0 - 5V. With this DS3502, my wheels can never reach its full speed or its full capacity.

Do you have a solution to enable this digital potentiometer to support multiple hub motors? Or do you have a more powerful digital potentiometer?

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by adafruit_support_bill on Sun Apr 25, 2021 12:13 pm

Are you trying to use a potentiometer in series with your motors to control the speed? That won't work. Potentiometers in general are not designed for high current. The maximum wiper current on the DS3502 is only 1mA. https://datasheets.maximintegrated.com/en/ds/DS3502.pdf

PWM is the way to control your motor speed. What are you using for motor drivers?

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

Re: Lawn Robot

by pebblepicker on Sun Apr 25, 2021 2:21 pm

Yes. I do use motor controller to control 4 Hall DC Brushless motors. The attached is the controller I am using.
Attachments
s-l1600a.jpg
DCBL Hall Motor Controller
s-l1600a.jpg (117.79 KiB) Viewed 303 times

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by pebblepicker on Sun Apr 25, 2021 4:11 pm

I have figured it out. I am now using PWM pin instead of DS3502. I was stuck with the work potentiometer, and that is why I keeps thinking of digital potentiometers.

The controller does support PWM, I didn't know it before.

Thanks for you reply.

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by pebblepicker on Sat May 01, 2021 12:09 pm

Hi,

I have used PWM signal to control the controller for BLDC Motor. I made a machine with four BLDC wheels. Yesterday I ran the machine for testing. In the first 30 minutes it was running well. Then it suddenly stopped. When I checked the controllers, all four of them are bad now. Can you tell what can be the cause? See my connection map in the attached.
Attachments
400W_Controller_Connections.png
400W_Controller_Connections.png (523.41 KiB) Viewed 276 times

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Re: Lawn Robot

by adafruit_support_bill on Sat May 01, 2021 12:37 pm

I'm not familiar with the BLDC controller you are using. But your connections seem to agree with the manufacturer's diagram. Probably best to try to contact them for assistance.

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

Re: Lawn Robot

by pebblepicker on Sat May 01, 2021 2:31 pm

Thank you anyway. Good Day Bill!

pebblepicker
 
Posts: 20
Joined: Wed Nov 25, 2020 11:11 am

Please be positive and constructive with your questions and comments.