? Motor with PWM (slow to quick) and reverse voltage

Hoi,
for my model train layout i want to build little building, and i want to start the motor from slow to quicker, then running apporx. 15 sek and then slows down untl stop.

After a wile i should rotate n the OTHER direction, also from slow to quick, running approx. 15 sec then slow down and stop.

After a while again....

Is this possibe with the Arduino UNO and what parts do i need additional ?
I am very new with this nice device :slight_smile:

Doei
Trixi

Yes, it sounds possible, this is the sort of thing motor controllers are for. But first can
you tell us what sort of motor is involved? How big, how much power?

Hoi Mark,
i am using this motor:


Spannungsbereich: 3-6V DC
Leerlauf-Drehzahl: 40 ± 10% RPM
Umgebungstemperatur: -5 - 40 ° C
Drehrichtung: Pluspol an "+" Kontakt; Minuspol an "-" setzen
Leerlaufstrom: (. 0.036A Maximal) 0.018A

I can change the cables (and poles) so the motor rotates in the other direction.

But dont know, how i can make this with the Uno...

Doei
Trixx

Hoi Folks,

any suggestions ?

Doei
Trixi

the specs show

Leerlauf-Drehzahl: 40 ± 10% RPM

Is that 40 RPM, less than one revolution per second? Is that fast enough for your train?
There are several motor controlers using H-bridge, so the arduino can control the direction and the speed of the motor.

Check
http://www.tigoe.net/pcomp/labs/lab-motors.shtml

Hoi jackwp ,

thx a lot for the link - this helped !
i just ordered some 754410-Chips (H-Bridge) to solve my prob.

And the motors are not built in in a loco but in 2 colliery winding towers which are operating asynchronously

Doei
Trixi

Great Trixi, glad you found a solution.

Be aware that you will get about 2V voltage drop in that chip, so (for example) if you power it from about 5V then you will only get about 3V at the motor terminals.

Hoi,

i am glad that i bought motors that operate from 3-6 V 8)
Speed doesn't matter in that case - better to slow as to fast.

My railroad scale is 1:160, so the movement has to be very slowly.

Doei
Trixi

Hoi friends,
i now got the H-Bridge chips with the following parameters:

Product Information
dipmicro Code DE1766
Click for more lot sizes
Lot Size 5 pcs
Manufacturer TI
Manufacturer P/N SN754410NE
Stock Type New
Restockable? Yes, we can get more. ASK
Shipping Weight 12g / 0.441oz

Technical Summary
More Info datasheetclick here
RoHS RoHS
Package PDIP16
Packaging tube
Op.Temperature -40 ~ 85°C
Type H-Bridge
Channels 4
Interface TTL/CMOS
Supply Voltage 4.5 ~ 36V
Output Current 1A

Any suggestion how to connect the both motors to it ?
I already read some postings, but i'm not really sure - so i bought 5 pieces if the one or the other get's "flashed" :blush:

Is it better to use simple resistors or is it necessary to use some BC's ?

Zoom: http://www.pyroelectro.com/tutorials/sn754410_dual_motor_control/img/schematic.png

Doei
Trixi

Source: http://www.google.de/imgres?imgurl=http://www.pyroelectro.com/tutorials/sn754410_dual_motor_control/img/sn754410_motor_control.jpg&imgrefurl=http://www.pyroelectro.com/tutorials/sn754410_dual_motor_control/&h=749&w=1346&sz=119&tbnid=LjoRoEggDgR4vM:&tbnh=90&tbnw=162&zoom=1&usg=__fpFR11kRzUdvWH153n9sR7kfYwg=&docid=gQ9w94_Cv9vA4M&hl=de&sa=X&ei=Rv8IUtigCYOytAax74DwBg&ved=0CE4Q9QEwBA&dur=1865

That schematic shows you how to connect it.
Just have one output HIGH and the other LOW, the motor will run in one direction.
Reverse to LOW and HIGH and your motor will run in the other direction.
Wire up the Enable connections to some PWM pins, instead of +5V.
Now you can control speed too (that is what you asked for) by applying PWM.

So pins "1A" (2)and "2A" (6) control direction, and pin "1,2 En" (1) controls speed.

Of course the same goes for the other motor.

Just use a Mosfet or bipolar transistor with it's Gate connected to one of the Arduino PWM pins.
And a DTDP relay for the reversing to an digitalpin with a NPN Transistor.

Just 4 Components.
Very easy.

Really very easy indeed.
But as Trixi isn't into electronics, maybe you should elaborate a bit on that ?
How will he be connecting these together ?

Also, i'm real curious about those just 4 components.

MAS3:
But as Trixi isn't into electronics, maybe you should elaborate a bit on that ?
How will he be connecting these together ?

Also, i'm real curious about those just 4 components.

Hoi MAS3,

ik ook :fearful:

Also i have 2 motors which should run reverse each other...

Doei
Trixi

Is that 2 motors on one engine? one for left wheel and one for right? I didn't understand

2 motors which should run reverse each other..

. You really want both motors to run either forward, or reverse, right? If that is the case, you may be able to just connect the two motors in parallel, and wire them like one motor. I may not understand tho.

Yes, 2 motors...its for my railroad layout and controls 2 mine towers, which elevates up and down (simulation of course) :smiley:

so as i understand i can connect them as 1 motor, but in opposite wiring?

If you're doing that, and still want the motors to always run in opposing directions, you can as well connect one forward (+ to +) and the other one reverse (+ to -).

Oh, not on the engine, ok. On two towers for lifting.
Do you want them to be lifted the same, or (as I am now think) opposite of each other? Yes then wire them opposite of each other.
But, what happens when the tower(s) are at full position. the motor stalls?

the endposition doesnt matter, because there is nothing really to lift up, because scale is 1:160 :wink:
Only a "rope" (endless) is used on each motor 8)

And yes, they should turn opposite - looks more interesting i think.

here is a sample pic of one of the mining towers:

Put your electronics controlling those wheels in the building next to it.
If anything would go wrong, the smoke comes out the chimney and you still earn points for your design. ]:smiley: