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
Lawn Robot
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Lawn Robot
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.
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
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.
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.
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Lawn Robot
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.
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.
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
Do you have a Magnetometer to recommend?
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Lawn Robot
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
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
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
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?
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?
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Lawn Robot
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?
PWM is the way to control your motor speed. What are you using for motor drivers?
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
Yes. I do use motor controller to control 4 Hall DC Brushless motors. The attached is the controller I am using.
- Attachments
-
- DCBL Hall Motor Controller
- s-l1600a.jpg (117.79 KiB) Viewed 415 times
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
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.
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
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.
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 (523.41 KiB) Viewed 388 times
- adafruit_support_bill
- Posts: 88097
- Joined: Sat Feb 07, 2009 10:11 am
Re: Lawn Robot
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.
- pebblepicker
- Posts: 20
- Joined: Wed Nov 25, 2020 11:11 am
Re: Lawn Robot
Thank you anyway. Good Day Bill!
Please be positive and constructive with your questions and comments.