I tested it with arduino mega and arduino uno and duemilanove and works perfect by the use of the library and wiring showed in the previous webpage.
What i want to do is to integrate this camera in my project, what consiste on a stand alone device measuring different temperatures by ds18b20. In order to reduce the power consume, better than to connect continuously the sensors to power pins in arduino mega, i use a 4n35 optocoupler. I connected all the grounds from sensors to the optocoupler, what is activated by a digital pin.
This is the general scheme of the wiring: http://fritzing.org/projects/powering-sensors-by-4n35/
Not showed in that scheme there is a microswitch to connect the grounds from the sensors directly to ground pin, jumping the optocouper. This is only for debuging task.
The problem is that if i turn on the switch, all the sensors and the camera works correctly, but by the use of the optocupler, the temperature sensors works well, but the camera is not found...
In the diagram showed in the first link about how to wire the camera, there are a couple of 10K resistors in the RX and TX wires., one of them connected to ground. I tried both things: 1) to connect it to the other grounds connected to optocoupler, and 2) connect it directly to ground. In any of both cases, the arduino find the camera. Only if i jump the optocoupler and wire the camera directly to ground (independantly to were is connected the RX-TX resistor), it works.
I also tried by adding a 0.1uF capacitator to stabilize the power in the 5v-ground pins f the camera, by it still don´t want to work...
Any idea about what could i do to solve this issue?
Ok, i discovered that the problem is the optocoupler.
Let me explain the case:
If i connect all the sensors that i have (4 chains of ds18b20 sensors), and i turn on them by the use of the optocoupler, they works correctly.... until to connect the camera! Then, the voltage in all sensors and camera is about 1.4 volts.
If i use the switch for to connect all the sensors to ground without to use the optocoupler, all the sensors receive again 5 volts (4.98 in really)....
So, the problem is the optocoupler... it seems it does not returns enough power when connecting the camera...
May be i should connect in any other way? Or may be use a capacitator?
Any idea about how could i solve this?
Do you mean reducing the value of the resistance conected to pin 1 of the optocoupler?
I know is not correct, but i testing it connecting a wire before the resistance i have (390 Ohms) directly to pin 1 of the optocoupler, and increase a little bit the resulting voltaje, but lower than 2 volts... So, this is without resistance... but for not to burn the inner led i should have, at least, 330 ohms...
I have a couple of questions about how to follow...
I think i m not able to use a digital pin (as output) to power the camera because the pins in arduino are only able to manage 40 mA... am i right?
If not, i don´t know if i could use a transistor... which one? how?
And finally, should i better use a mosfet? Which one? IRF520,IRF530,IRF 540? Any other? I don´t know which one is the better for this case... use a digital pin to power the mosfet to complete the circuit of powering the camera with 5V from the board.
Ok, i know that an IRF510 or IRF520 is enough because they are able to manage 5.6A and 10A, more than enough for the camera and all the sensors i use. But which one (of these or any other) could be triggered with a digital pin of the board?
Or may be by the use of a transistor? may be BC547?