I'm trying to control one LED from two different microcontrollers. Is it a good idea to use a diode to prevent feedback from one output pin going into another? Or can I get away without them?
I've drawn them in red where it would make sense to me that they go. If I do add them, will i need to adjust the resistor (R8)? Essentially the supply voltage to the LED would be 5 - 1.2 = 3.8 V (diode voltage drop)
Thanks! Sorry i know it's a simple question but I want to protect the microcontrollers. In my real case it would be an ESP32 and an Arduino nano as backup.
Yes, you would need to use diodes to do that but it begs the question - why would you ever want to control the MOC with two modules? Makes more sense to just use one and pass information from the other as to what the first needs to do.
Suspect you have not planned your whole project too well, or believe there is some limitation that is not actually there.
Thanks for the reply. The project is an offgrid microhydro load controller: gravity sucks water through a pump coupled to an inductive motor which produces three phase 600V. That goes through a big transformer to create 240 VAC center tapped, and the cabin is wired to NA standards (owner of cabin is an electrician).
My load controller (v1) monitors the 120 VAC on one leg (9 VAC transformer and resistor divider), feeds that to a PID algorithm, and then fires the MOC to switch on triacs with a resistive dump load attached (currently baseboard heaters, future will be water coils).
The current version works pretty well (Arduino pro mini), but whenever I want to tweak the PID settings I have to re-upload the sketch, which turns off the dump load, and the AC voltage in the cabin skyrockets. We compensate manually by flicking on extra base board heaters, or turning on the stove or something, but it's a bit hectic.
My thought was to have a two controllers: a master with the PID algorithm, and a slave with a pot for manual control of the phase-fire delay. When I upload a sketch to the master, the slave kicks in and starts to fire the triacs until the master comes back online.
I was also thinking about using an ESP32 for the master, and having a web-based config page for making changes to the PID, which complicates things a bit by having 3.3 and 5v logic. Though if I do it that way I could put a uni-directional level shifter after the ESP32 output, which would block the 5v arduino output from reaching the ESP32. Trying to keep the component count down.