Personal tools
You are here: Home Issue Tracker DC motor controller
Document Actions

#31 — DC motor controller

State Resolved
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
Return to tracker
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:
Added by Sébastien Lelong on 2008-01-05 11:32
Issue state: unconfirmedopen
Severity: MediumImportant
Target release: IHAD0.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.
Added by Sébastien Lelong on 2008-01-05 11:33
Issue state: openin-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 !):
Added by Sébastien Lelong on 2008-01-24 08:11
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.
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.

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 ?)

Except this problem, this seems to give nice results:

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:

How to reduce noise across motors:

Interfacing a microcontroller with SN754410:

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:
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
Added by Sébastien Lelong on 2008-06-17 07:38
Issue state: in-progressresolved

Powered by My Hands Powered by Jalv2 Hosted by Google Code