Motor DC Control (1 direction only) Using ULN2803 (Darlington Array Transistor)
#1
by : Antonius (@sw0rdm4n)
http://www,ringlayer.net

Source: http://sw0rdm4n.wordpress.com/2014/11/18...g-uln2803/

Part List(s)

- 1 Ceramic Disc Capacitors 50V 100nF
- 1 Mini Breadboard
- 1 uln2803
- Arduino / any compatible board
- 1 Tamiya single Gearbox
- 2 Wheel for tamiya gearbox
- Jumper Wires
- 6 v battery holder
- 4 x 1,5v battery
- 1 dc motor (toy)
- Soldering iron and tin

ULN 20803 is a darlington array transistor with 8 channel(s) suitable to control devices up to 500mA , 50v, the specification can be downloaded from here http://www.adafruit.com/datasheets/ULN2803A.pdf.
Here in this example we will use uln2803 to control a motor dc that uses single gearbox, since uln2803 isn’t a h-bridge so we will only able to control it with single direction ( for h-bridge, we may use tlc5940 ).
Here’s uln2803 pins:
[Image: uln2803.jpg?w=625]
In this example, we will be using pin 1 as pwm pulse receiver from arduino pin 7 output. and pin 9 will be for ground connect to arduino’s ground. How to locate where’s pin 1 and another ? We can see on uln2803 that it has a “U” sign. The “U” sign determines that pin 1 is located on the left of that “U” sign.

First Step

Plug and solder jumper wire and ceramic disc capacitor into motor dc as follow:

[Image: uln1.jpg?w=625&h=833]

Next plug the dc motor into tamiya single gearbox and plug some wheels. Here comes it :

[Image: x.jpg?w=625&h=468]

As if this is a small vehicle, but it has no steering capabilities.

Second Step
connect pin 1 on uln2803 with pin 7 on arduino and connect ground pin (9) on uln2803 to ground pin on arduino.

[Image: 20141118_065032.jpg?w=625&h=468]

Next, connect both jumper from motor dc to pin 18 and pin 10 on uln2803

[Image: correct1.jpg?w=625&h=833]

Next, connect ground from battery to ground pin 9 on uln2803, plug it beside ground pin from arduino, and plug volt from battery to pin 10 on uln 2803, plug it besides motor dc jumper wire as follow:

[Image: correct2.jpg?w=625&h=833]

Final step is to upload this code:

int motor = 7;
void setup() {
pinMode(motor, OUTPUT);
}

void loop() {
digitalWrite(motor, HIGH);
delay(300);
digitalWrite(motor, LOW);
delay(1000);
}

Once everything done, we can move the motor each 1 second about 0,3 second as follow:


#2
(11-18-2014, 10:03 AM)mywisdom Wrote: by : Antonius (@sw0rdm4n)
http://www,ringlayer.net

Source: http://sw0rdm4n.wordpress.com/2014/11/18...g-uln2803/

Part List(s)

- 1 Ceramic Disc Capacitors 50V 100nF
- 1 Mini Breadboard
- 1 uln2803
- Arduino / any compatible board
- 1 Tamiya single Gearbox
- 2 Wheel for tamiya gearbox
- Jumper Wires
- 6 v battery holder
- 4 x 1,5v battery
- 1 dc motor (toy)
- Soldering iron and tin

ULN 20803 is a darlington array transistor with 8 channel(s) suitable to control devices up to 500mA , 50v, the specification can be downloaded from here http://www.adafruit.com/datasheets/ULN2803A.pdf.
Here in this example we will use uln2803 to control a motor dc that uses single gearbox, since uln2803 isn’t a h-bridge so we will only able to control it with single direction ( for h-bridge, we may use tlc5940 ).
Here’s uln2803 pins:
[Image: uln2803.jpg?w=625]
In this example, we will be using pin 1 as pwm pulse receiver from arduino pin 7 output. and pin 9 will be for ground connect to arduino’s ground. How to locate where’s pin 1 and another ? We can see on uln2803 that it has a “U” sign. The “U” sign determines that pin 1 is located on the left of that “U” sign.

First Step

Plug and solder jumper wire and ceramic disc capacitor into motor dc as follow:

[Image: uln1.jpg?w=625&h=833]

Next plug the dc motor into tamiya single gearbox and plug some wheels. Here comes it :

[Image: x.jpg?w=625&h=468]

As if this is a small vehicle, but it has no steering capabilities.

Second Step
connect pin 1 on uln2803 with pin 7 on arduino and connect ground pin (9) on uln2803 to ground pin on arduino.

[Image: 20141118_065032.jpg?w=625&h=468]

Next, connect both jumper from motor dc to pin 18 and pin 10 on uln2803

[Image: correct1.jpg?w=625&h=833]

Next, connect ground from battery to ground pin 9 on uln2803, plug it beside ground pin from arduino, and plug volt from battery to pin 10 on uln 2803, plug it besides motor dc jumper wire as follow:

[Image: correct2.jpg?w=625&h=833]

Final step is to upload this code:

int motor = 13;
void setup() {
pinMode(motor, OUTPUT);
}

void loop() {
digitalWrite(motor, HIGH);
delay(300);
digitalWrite(motor, LOW);
delay(1000);
}

Once everything done, we can move the motor each 1 second about 0,3 second as follow:


wkwkw jadi nih =)) ane nyoba juga bulan depan wkwkw
nice share om Smile)


Smile and Agree, Then Do Whatever The Fvck You Were Gonna Do



#3
lg di kantor bro ?

#4
@mywisdom : ini buat apa om :v ane nga ngerti Sad :v

#5
(11-19-2014, 12:21 AM)mywisdom Wrote: lg di kantor bro ?

ane om ? iye wkwk


Smile and Agree, Then Do Whatever The Fvck You Were Gonna Do








Users browsing this thread: 2 Guest(s)