#31 — DC motor controller
| State | Resolved |
|---|---|
| Release: |
—
|
| Area | Core Hardware |
| Issue type | Feature |
| Severity | Important |
| Submitted by | Sébastien Lelong |
| Submitted on | 2007-09-26 |
| Responsible | Sébastien Lelong |
| Target release: | 0.2.2 |
Last modified on
2008-06-17
by
Sébastien Lelong
SirBot can control servos, now it needs to control DC motor with attached wheels. It's about PWM to control speed, but it's also about odometry to analyze positions (using eg. coded wheels).
A nice article:
- http://www.seattlerobotics.org/encoder/200010/dead_reckoning_article.html
A nice article:
- http://www.seattlerobotics.org/encoder/200010/dead_reckoning_article.html
Added by
Sébastien Lelong
on
2008-01-05 11:32
Issue state:
unconfirmed → open
Severity:
Medium → Important
Target release:
IHAD → 0.3
Using L293D chip seems to be the easiest way to do this.
The board should also handle odometry:
- using IR detector and encoded wheel
- using back-EMF, that is, regularly measuring voltage coming from the motor. This seems to be the funniest (usable ?) solution.
A first board was made, but Vcc1 et Vcc2 from L293D were inverted...). Next board must include:
- a led, showing the module is powered
- leds showing which motor is running
- wiring to implement back-EMF
- a resistor between MCLR and +5V (1K ?)
- new connectors (see PR32, mainboard revisited): power connectors for +5V (regulated) and +12V (unregulated), and another connector (10 pins) to connect PORTB from mainboard to enable RS232 and I2C communications.
The board should also handle odometry:
- using IR detector and encoded wheel
- using back-EMF, that is, regularly measuring voltage coming from the motor. This seems to be the funniest (usable ?) solution.
A first board was made, but Vcc1 et Vcc2 from L293D were inverted...). Next board must include:
- a led, showing the module is powered
- leds showing which motor is running
- wiring to implement back-EMF
- a resistor between MCLR and +5V (1K ?)
- new connectors (see PR32, mainboard revisited): power connectors for +5V (regulated) and +12V (unregulated), and another connector (10 pins) to connect PORTB from mainboard to enable RS232 and I2C communications.
Added by
Sébastien Lelong
on
2008-01-05 11:33
Issue state:
open → in-progress
Added by
Sébastien Lelong
on
2008-01-14 20:39
A nice article showing how to implement back-emf using a 16F88 and L293D (can't be closer than parts used in sirbot !):
http://frontrangerobotics.org/PIDbackEMF/DavesBEMFmotorArticle.htm
http://frontrangerobotics.org/PIDbackEMF/DavesBEMFmotorArticle.htm
Added by
Sébastien Lelong
on
2008-01-24 08:11
PID control: http://www.hitex.co.uk/c166/pidex.html
PWM with DC motors: http://www-ee.ccny.cuny.edu/www/web/jxiao/motor.ppt
PWM with DC motors: http://www-ee.ccny.cuny.edu/www/web/jxiao/motor.ppt
Added by
Sébastien Lelong
on
2008-01-25 08:32
DS1025: from maxim-ic, a chip with I2C, PWM and ADC... Two chips like this would prevent having a 16F88 on the DC motor controller board.
http://www.maxim-ic.com/appnotes.cfm/an_pk/163
http://www.maxim-ic.com/appnotes.cfm/an_pk/163
Added by
Sébastien Lelong
on
2008-02-16 10:28
Using L293D, PIC randomly resets... Using probes show logical power supply is very disturbed when the motor runs.
This article shows that PWM on ENABLE1 (which is what I do) really disturbs the grounds, which could explain why PIC resets. It's better to PWM IN1 and IN2, while letting ENABLE high or low.
http://www.robotbuilder.co.uk/Resources/Articles/152.aspx
This topic also relates this "ground" problem. Using optocoupler could be a solution. "After troubleshooting, we found out that the circuit was very noisy when motor was running (especially acceleration). So, we added optocoupler to isolated the ground of the digital circuit from the ground of the motor driver circuit, and after that it worked very nice." (but what isolating grounds is ?)
http://www.edaboard.com/ftopic92724.html
Except this problem, this seems to give nice results:
http://sirloon.net/loonaweb/sirblog/experimenting-back-emf-motion-feedback
This article shows that PWM on ENABLE1 (which is what I do) really disturbs the grounds, which could explain why PIC resets. It's better to PWM IN1 and IN2, while letting ENABLE high or low.
http://www.robotbuilder.co.uk/Resources/Articles/152.aspx
This topic also relates this "ground" problem. Using optocoupler could be a solution. "After troubleshooting, we found out that the circuit was very noisy when motor was running (especially acceleration). So, we added optocoupler to isolated the ground of the digital circuit from the ground of the motor driver circuit, and after that it worked very nice." (but what isolating grounds is ?)
http://www.edaboard.com/ftopic92724.html
Except this problem, this seems to give nice results:
http://sirloon.net/loonaweb/sirblog/experimenting-back-emf-motion-feedback
Added by
Sébastien Lelong
on
2008-02-17 10:06
Just received SN754410, a pin-compatible replacement for L293D. According to datasheets, it should be less noisy...
Added by
Sébastien Lelong
on
2008-03-17 20:08
May be the solution to prevent "random resets"... Found this nice page about power supply configuration and general advices connecting a µC to motor controller:
http://www.kronosrobotics.com/an143/GAN143.shtml
How to reduce noise across motors:
http://www.kronosrobotics.com/an142/GAN142.htm
Interfacing a microcontroller with SN754410:
http://www.kronosrobotics.com/an101/AAN101.shtml
Using such a configuration (3 caps + R) seems to work: no more resets :)
http://www.kronosrobotics.com/an143/GAN143.shtml
How to reduce noise across motors:
http://www.kronosrobotics.com/an142/GAN142.htm
Interfacing a microcontroller with SN754410:
http://www.kronosrobotics.com/an101/AAN101.shtml
Using such a configuration (3 caps + R) seems to work: no more resets :)
Added by
Sébastien Lelong
on
2008-02-25 07:40
Target release:
0.3 → 0.2.2
Things to do...
* test circuit "behavior" with/without caps
* test circuit on tank's motor
* test com. between two PIC (software/hardware USART)
* finalize DC motor controller jal program: handle motor 1 and motor 2
* design PCB
* build PCB
* doc
* test circuit "behavior" with/without caps
* test circuit on tank's motor
* test com. between two PIC (software/hardware USART)
* finalize DC motor controller jal program: handle motor 1 and motor 2
* design PCB
* build PCB
* doc
Added by
Sébastien Lelong
on
2008-06-17 07:38
Issue state:
in-progress → resolved