Pages: [1]   Go Down
Author Topic: isolating the arduino output via optocopler  (Read 2457 times)
0 Members and 1 Guest are viewing this topic.
Portugal
Offline Offline
Edison Member
*
Karma: 37
Posts: 1591
Pretending you know everything then you will learn nothing.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello
I'm developing a project to school which I want to activate a motor via PWM signal but I want isolate the arduino output with a optocopler just in case of preventing a possible damage to arduino board.
Does anyone have a circuit with a optocopler and a relay or a transistor?
Logged

Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B


'round the world...
Offline Offline
Faraday Member
**
Karma: 42
Posts: 3282
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Relays and PWM don't normally work together... they do make nice sounds before breaking though. smiley

Optocouplers can be a problem depending on the frequency you choose to control your motor. Normally PWM frequencies for motors tend to be somewhat high, whilst commuting frequencies for optos (the cheaper kind) aren't. Not that it is impossible, it is more expensive and maybe difficult to locate the parts.

So, you could control the motor with a power driver L298, 293, something like that, or go with transistors. Both of which have plenty of schematics around the internet.
Logged

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 543
Posts: 27348
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's an opto that's pretty quick.
http://www.dipmicro.com/store/4N35
Drive the input side by bringing the cathode low (so that the transistor is off when the arduino starts up). Be sure to use a series current limit resistor to avoid arduino pin damage.
Use the Collector to drive a motor drive transistor for some real current flow.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Portugal
Offline Offline
Edison Member
*
Karma: 37
Posts: 1591
Pretending you know everything then you will learn nothing.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you think 4N26 will do the job?
I found on ebay for a nice price
Logged

Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34473
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Did you think 4N26 will do the job?
What job you haven't given any details of what you want to do and what circuit you want to use it in.
Logged

Portugal
Offline Offline
Edison Member
*
Karma: 37
Posts: 1591
Pretending you know everything then you will learn nothing.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I want isolate the arduino pins(digital for motor or  pwm to more small things)to prevent a possible damage , since I want to control some real motor 230V.
the circuit is a simple resistor conected to an optocopler, and on the other side I want connect a relay to activate the motor.Of course I wont connect the relay directly to the opto transistor output since the relay will destroy it.I was thinking make  a stage with another transistor to deal the current of the relay and the base of this transistor conected to the output of the optocopler, but this is the main idea.
Did you think this is ok?
will the 4N26 works?
Logged

Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 34473
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You said:-
Quote
I want to activate a motor via PWM signal
You can't control a mains motor with PWM.

If you are using a relay you don't need an opto isolator.

If you are having to ask these questions you are not ready to play with mains.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 94
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

do you just want to turn a motor on or off ? Or do you want to do some sort of speed control ?  You project is a little confusing. Yes that opto isolator will be OK for use in a circuit that simply switches a motor on or off. No it wont be any good to use with a PWM signal then a relay to speed control a motor as speed control, mainly due to the relay.
Logged

Pages: [1]   Go Up
Jump to: