Arduino, two buttons powering and digital inputs in the same time

The Cathode on U3 isn't connected to ground on the battery, only GND on the Arduino.
Follow the path from D8 to ground on the battery.
Then follow the path from the emitter on U3 to ground on the battery.
Also the phototransistor on U3 more or less shorts the battery when a button is pressed.

MisDev:
The Cathode on U3 isn't connected to ground on the battery, only GND on the Arduino.
Follow the path from D8 to ground on the battery.
Then follow the path from the emitter on U3 to ground on the battery.
Also the phototransistor on U3 more or less shorts the battery when a button is pressed.

Oh my bad I see, what about this one:

Never testet it before. I know that it works with relays, but not sure about micro-conductors.

Again, resistors!

And be aware the 4N35 can only do 50mA. And the CTR is only specified as 100% minimum (40% - 50% at extreme temperatures). So probably you can get away with less then 50mA for the opto LED but you can't be sure... And 50mA is just enough to power a Arduino without the LEDs removed etc. And that's no including the transmitter you probably want to hook up as well...

septillion:
Again, resistors!

And be aware the 4N35 can only do 50mA. And the CTR is only specified as 100% minimum (40% - 50% at extreme temperatures). So probably you can get away with less then 50mA for the opto LED but you can't be sure... And 50mA is just enough to power a Arduino without the LEDs removed etc. And that's no including the transmitter you probably want to hook up as well...

Great success! Just tested it and everything works as expected. However instead of U3 opto I used solid state relay - PVT322 (just because I didn't have third 4N35). Could you please elaborate what you mean by "4N35 can only do 50ma"? Is it related with the diod or transistor in optocouple? What are the alternatives then?

I also have an idea to replace optos with solid state relays, unfortunately I can't find 3 / 4 - channel relay, but 2 - channel ssr are easy to find. So as a backup plan I'll use 2 - channel relay for the buttons and 1 - channel for the power.

BTW can I replace optos with transistors? :slight_smile:

Using opto-couplers?

:astonished: :astonished: :astonished: Ridiculous! :astonished: :astonished: :astonished:

Use the resistors. One fiftieth of the cost, one fiftieth of the space, perform the job perfectly.

septillion:
But uhm, looks like a bazooka to kill a mosquito....