Close

Controlling the motors

A project log for Reflecting the sun into your home

My home doesn't face the sun, so it's dark and cool inside. I want to use mirrors to reflect sunlight into my home.

mimemime 04/12/2015 at 13:230 Comments

Okay, we've found a motor, and a step up converter to provide power to it. Now we need to control it.

A linear motor has two terminals, + and -.

If you apply a suitably high DC voltage between the two terminals, the motor will start rotating. + and - are chosen relatively arbitrarily, if you change the polarity it will rotate in the other direction (for a typical motor, sometimes it will only spin in one direction, such as PC cooling fans).

An H-bridge is a common way of controlling a stepper motor or linear motor. Let's have a look.

If you close S1 and S4, current flows from the 9 volts supply to ground, and the motor will turn one way. If you only close S2 and S3, the motor turns the other way. Easy peasy. The circuit looks a bit like an H, hence the name H-bridge. A real-world circuit will have transistors that act like switches, and some bits around it to support the circuit and control the transistors etc.

Quickly Batman, off to ebay!

We're looking for something that, again, can switch 12 VDC, and 100 mA in static current, and a bit more to deal with start current (of the motor), which can be significantly higher.

Here's an option:

£1.57

Features:
L298N as main chip, ST corporation production.
Low heat,outstanding anti-interference performance.
High working power to 46v,large current can reach 3A MAX and continue current is 2A, power to 25w.
Can drive one 2-phase stepper motor, one 4-phase stepper motor or two DC motors.
Built-in 78M05,get power from drive power,however, when drive power over12V, please use the external 5v power as power supply.
Large capacity filter capacitance,afterflow protection diode, more stable and reliable.

Specification:
Double H bridge drive
Chip: L298N (ST NEW)
Logical voltage: 5V
Drive voltage: 5V-35V
Logical current: 0mA-36mA
Drive current: 2A(MAX single bridge)
Max power: 25W

This module has a built-in 5v power supply, when the driving voltage is 7v-35v, this supply is suitable for power supply
When ENA enable IN1 IN2 control OUT1 OUT2
When ENB enable IN3 IN4 control OUT3 OUT4

I'm not in the mood to translate too many specs this time.

Something that is not useful in this application is that this board requires 0-36 mA of logical current (!!!!!).

Too much for typical boards, and unnecessary.

Next.

£0.99

My comments in cursive

  1. Feature: Onboard two the L9110S motor control chip
  2. the module can simultaneously drive two DC motors or a 4-wire 2-phase stepper motor. Cool, two for the price of one!
  3. the 800mA continuous current output capability per channel. Sufficient.
  4. Low static work current. How much??
  5. Each channel has 800mA continuous current output. Again? They must be impressed by this achievement.
  6. Low saturation pressure drop. This is Chinglish. What they mean is voltage drop.
  7. TTL/CMOS output level compatible, can be connected directly to the CPU. Hah! not really. What I found out here is that the input control voltage has to be the same as the drive voltage. That's fine though, we can in the aid of some external transistors as level shifters.
  8. Output built-in clamping diode, apply to the perceptual load. This is to protect the output stage of the H-bridge from inductive voltage surges.
  9. Control and drive integrate in IC
  10. Have pin high pressure protection function = overvoltage protection

Specifications:

  1. Working temperature: 0-80 ¡æ
  2. Size:29.2(mm)x23(mm)
  3. the module input voltage :2.5-12V
  4. Power supply voltage: DC2.5-12V
  5. Net weight: 6g
  6. Package weight: 16g
  7. Package includes: 1 x L9110S H-bridge Stepper Motor Dual DC motor Driver Controller Board

They are being a bit cheeky here, because they make it look like you can control the motor with 12V and the inputs with 2.5 VDC. But that is not the case.

In case anyone is interested, here's the datasheet of the IC on this module.

Anyway, let's just buy them, they do the trick. I just need two, because each has two H-bridges.

Discussions