go away spammer

Author Topic: Understanding this motor driver, ProBot128, LM293, Schmitt Trigger  (Read 2957 times)

0 Members and 1 Guest are viewing this topic.

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
Hello!
I`ll try to be as short as I can.
When I bought my robotkit it did not come with the microcontroller, so I bought an arduino, since I basically had a robot platform and nothing to controll it with.

The problem is that I do not understand how the motor driver works, it look simple enough until they started to mix in NAND 2-input Schmitt Triggers to controll the LM293D.

The kit DID come with schematics and some commands, but sadly no explanation of the commands, I have attached the schemetic and here is the commands they gave about motor controll:

DRIVE_INIT()
Initialises the drive. Prior to using the drive, you have to call up this routine.
DRIVE_ON()
Sets the enable input of the L293D to high. The drive is activated.
DRIVE_OFF()
Sets the enable input of the L293 to low. The drive is deactivated.
DRIVE(left as byte, right as byte)
Timer1 PWM for the drive:
values between 1 to 128 = backwards
values between 128 to 255 = forwards
Value 128 = drive stop
Motor_POWER(left as byte, right as byte)
Speed, values between 1 and 255
You first have to state the direction with MOTOR_DIR.
MOTOR_DIR(left as byte, right as byte)
States the rotation direction of the motors for the function MOTOR_POWER.
1 = forwards
0 = backwards
MOTOR_STOP()
Motor is stopped, PWM is set to 128.

and here is a overview of the schmitt trigger: http://circuits.datasheetdir.com/109/BU4093B-pinout.jpg

My question is if you don't already suspect it; how to i controll my motors via the X1_2 and X1_3 pins (see schemetic lol).
But an explanation of how the Dual input Schmitt trigger works is also greatly appreciated.

Thank you and have a nice day


***The robot kit is called ProBot128, its not very well known***
« Last Edit: May 01, 2012, 04:13:48 PM by polar bear6 »

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Understanding this motor driver, ProBot128, LM293, Schmitt Trigger
« Reply #1 on: May 01, 2012, 05:27:50 PM »
Hi,

The problem is that I do not understand how the motor driver works, it look simple enough until they started to mix in NAND 2-input Schmitt Triggers to controll the LM293D.
No problem then, all four NAND gates are used as simple inverters (i.e. a "1" on the input gives a "0" on the output and v.v.).

It's set up this way to use half the number of control lines as a "1"  on X1_n will make the motor in question run in one direction and a "0" will make it run in the opposite direction.
Unfortunately, the Enable goes to both motors, so if you want to stop one motor while the other is running, you have to control it with a 50% duty cycle - a power hungry method, although it gives a better grip of the 'bot.
You could split the Enable lines into separate wires.


The kit DID come with schematics and some commands, but sadly no explanation of the commands, I have attached the schemetic and here is the commands they gave about motor controll:

DRIVE_INIT()
Initialises the drive. Prior to using the drive, you have to call up this routine.
DRIVE_ON()
Sets the enable input of the L293D to high. The drive is activated.
DRIVE_OFF()
Sets the enable input of the L293 to low. The drive is deactivated.
DRIVE(left as byte, right as byte)
Timer1 PWM for the drive:
values between 1 to 128 = backwards
values between 128 to 255 = forwards
Value 128 = drive stop
Motor_POWER(left as byte, right as byte)
Speed, values between 1 and 255
You first have to state the direction with MOTOR_DIR.
MOTOR_DIR(left as byte, right as byte)
States the rotation direction of the motors for the function MOTOR_POWER.
1 = forwards
0 = backwards
MOTOR_STOP()
Motor is stopped, PWM is set to 128.

My question is if you don't already suspect it; how to i controll my motors via the X1_2 and X1_3 pins (see schemetic lol).
But an explanation of how the Dual input Schmitt trigger works is also greatly appreciated.
As mentioned, the 4093 is coupled as 4 inverters. You can forget about the Schmitt trigger action, as it doesn't matter when driven from digital signals.
Half the gates are superfluous (a prime sign of poor design - the more fitted, the more can go wrong) and is only used to use them all, I suspect, as they have no real function. 2 small signal transistors could have replaced the entire 4093, or they could have used 2 single inverters (or a dual version), if they're that afraid of transistors.
We are not impressed ;)

Unless you're short of available lines, you could rip out the 4093 and control the
L293D directly, but then you cannot use the lib s they provided of course.

The commands are rather self explanatory. You'll have to reread the commands and then test them out.



admin edit: flame content removed
« Last Edit: May 03, 2012, 09:18:19 PM by Admin »
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline Pogertt

  • Full Member
  • ***
  • Posts: 60
  • Helpful? 3
  • Pogertt
Re: Understanding this motor driver, ProBot128, LM293, Schmitt Trigger
« Reply #2 on: May 02, 2012, 10:17:32 AM »
@Soren

Half the gates are superfluous (a prime sign of poor design - the more fitted, the more can go wrong) and is only used to use them all, I suspect, as they have no real function.





admin edit: flame content removed
« Last Edit: May 03, 2012, 09:17:18 PM by Admin »
Mmmmmmmm....Cookies

 


Get Your Ad Here