I have a background in Comp Sci, so the programming part of the Arduino is simple enough to me, but I'm new to electronics stuff, and I'm learning how does an opto-isolator work with regards to the Arduino. I'm trying to get a separate circuit which consists of just a battery and motor to run when the Arduino sends a signal to the opto-isolator chip:
5v DC power (battery) -> Arduino -> Opto-isolator -> <- motor <- 5v DC power (battery)
My question is, what sort of specs should my opto-isolator have? Searching for products on Farnell gives me lots of options which I don't understand (isolation voltage? output type? input current? output voltage?) and I'm not sure if I would need to pay attention to those specs, given that it's a hobbyist project.
Ah my bad, I was referring to those 4 specs which I need to know if I needed to pay attention to them...
Anyway, I am thinking of using an opto-isolator for replacing a switch on a simple circuit with its own power load, as shown in the diagram attached, which I made in Fritzing, a wonderful find for me . Question is, will this work?
As fo the solenoid tutorial, I tried looking at the schematics but I got lost after that. I followed the ipod control with arduino tutorial though, which made more sense to me. However, I noticed that in the ipod control tutorial there is a resistor placed between pin D1 on the arduino and one of the input pins on the opto-isolator - is this to prevent the arduino from frying? Would the circuit run without the resistor?
Not for long, you need a current limiting resistor in series with the LED in the opto.
No pin 13 hasn't got an internal resistor, that hasn't been true for many years.
Well TBH the 4N35 is just something I just plugged out from the default parts library in Fritzing, I have not chosen one yet from Farnell...as for voltage its not going to exceed 5 to 6V since its going to be powered by 4 typical size C batteries. As for current draw, I've not measured it yet...will have to spend some time to measure as soon as I can get my hands on a multimeter.
As a side question though, how do I power the Arduino if I want to share power from the 4x 1.5v batteries? Would I need something to reduce the current going into the Arduino?
If you are sharing the power then there is little point in using an opto isolator.
Just feed it into the Vin pin (or DC jack) and the internal regulator will make sure the voltage is right.