Pages: [1]   Go Down
Author Topic: Arduino + optocoupler + transistor  (Read 822 times)
0 Members and 1 Guest are viewing this topic.
Poland
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I control a simple DC motor speed using PWM from Arduino and a BC547B transistor.
But I want to be super sure that Arduino and DC motor circuit are separated, so I need an optoisolator.

The problem is that I don't know how to connect the optoisolator, because it is more complicated than those described on forum. I'm using 6N138.

Please check, if the schema I drown is correct or not, and please tell what value should the RL resistor take. On page 6 from the 6N138 datasheet I know that it depends on output, but which one is mine?

* 6N138.pdf (299.22 KB - downloaded 15 times.)

* schemat3.jpg (64.4 KB, 1240x842 - viewed 37 times.)
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, think that's viable - the device's Vcc is limited to 7V so you need that voltage divider (make it divide to 5V, not 7V, BTW, 7V is the absolute maximum (we don't go there!)).  I think a 10k resistor will be fine on the input, it claims 0.5mA drive doesn't it?
Logged

[ I won't respond to messages, use the forum please ]

Poland
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MarkT,
you're absolutely right, thanks for the suggestions.

But can you please tell me something about that RL resistor between Vcc and Vo?
Logged

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11694
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well its limiting the current to the main transistor's base, so it should be appropriate for that I guess.
Logged

[ I won't respond to messages, use the forum please ]

Poland
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, so now its clear for me smiley-wink
For those who want to know something about RL: this resistor's value should be appropriate to give enough current to the transistors base. You should choose it carefully, because too much current can damage transistors base!
Logged

Poland
Offline Offline
Newbie
*
Karma: 0
Posts: 28
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Today I went to the lab to check the DC motor parameters and to test the circuit.

I wrote down the motor serial numbers - I wasn't able to access the internet to check the parameters, so I assumed  that the collector current will be smaller than 1,5A. I used BD135 transistor, with a proper resistor in front of its base. Then I've turned the power supply on and the motor stared rotating, even when there was no signal from the Arduino!

I disconnected the circuit and I've measured the current flowing through the motor in a basic circuit which contained only the motor and power supply - nothing else. The ammeter showed 11,6mA! The power supply voltage was 9,3V, so the power of the motor should be about 0,1W!

I realised that there can be something wrong with the transistor so I've changed it to BC547B which max Ic = 100mA. After that, the PWM control from Arduino worked, but the motor rotated VERY slowly. I've checked the current flowing through the motor and it was only about 4,6mA!

What is wrong?

* 6N138_optocoupler.pdf (299.22 KB - downloaded 18 times.)
* 16N28_motor.pdf (260.88 KB - downloaded 15 times.)

* projekt_polaczenia_v1.3_bb.jpg (59.75 KB, 620x481 - viewed 23 times.)

* projekt_polaczenia_v1.3_schem.jpg (52.22 KB, 1333x578 - viewed 20 times.)
Logged

Pages: [1]   Go Up
Jump to: