It's difficult to see a layout error by looking at images of gerbers.
What CAE tool did you use?
I am using EasyEDA.
This is the PCB in the json format. You can open it in EasyEDA (cloud version is available): File-> Open -> EasyEDA...
Or, I see there is Altium version to export to. If you prefer I could do that .
alarm-module.json (439.0 KB)
The easyeda is fine. I don't see any obvious errors.
Pull up resistors will not act as current limiters. The resistor must be in series with the IR emitter in order to act as a current limiter.
If indeed it does turn out to be some bizare or undocumented problem with the optocouplers, you can try using the NO outputs and connect them to a NAND gate.
No one has asked about the fan.
How much current does it draw?
I recorded a short demo where I show how it works. Sorry I had to reduce FPS due to large size of the gif.
There is a second arduino which powers a white LED (at the top) which in turn indicates that an alarm event has happened. Then I activate 2 opto sensors (one by one), and then I touch a temperature sensor for a while to reach the alarm temperature (which is 30C for testing purposes).

I have used the SX1140 wide slot optical interrupter on projects.
This is how to wire them up:-
Note the 68R series resistor to limit the current.
Look at the direction pins on the top, this indicates the direction of the light. The e/c is the connector and emitter on the receiving end. The a and k are the anode and cathode of your IR LED.
It's TITAN TFD-4020M12S, DC 12V, 0.08 A
Yeah, this is one of the thoughts I have in mind. I think I need to put everything back to the breadboard ![]()
Hi @jim-p ,
You can be sure that the files I posted are exactly as in the zip file. Why should I make changes? That would only damage my reputation in this forum.
![]()
I don't think they meant that -- just wanted to be sure because the code was not from the OP. You could made a mistake or something. Anyway I don't think they thought you had changed something.
Thanks, it's good to have the code readable for all members now so they can review the content to rule out software issues.
Does the problem occur regardless of whether the fork light barriers have been triggered or not?
Could you connect just the power pins of all four sensors to their respective jack to check if it is solely a power consumption problem?
Good question. Actually, I also thought about "continuously triggering" them by putting some opacque material inside.
I need to unsolder the corresponding wire then. A cheaper variant would be indeed to "close" them for now. I will leave them for night with this configuration and will let you tomorrow the status.
Thank you, but honestly it is quite hard to read it. Could you please provide an ordinary schematics ?
Ah, ok. I got it. You meant limit power current. I was confused by the word emitter which is easily to be interpreted as a part of the transistor in that schematics, you know ![]()
I am not sure I need those. I don't see nothing in their documentation. And the DC/DC converter isn't hot. So I don't think it's a problem. But I am not going to completely exclude this from the "to improve" list. Thank you !
Human error!
No there is no such thing as power current. There is current as a thing and power is current times a voltage.
I think you are misinterpreting that original schematic you cobbled together. Which I think is the root of your problems. For example what exactly is the "Main Circuit" It is certainty not a micro controller. What ever the black wire (pin 2) is then putting it directly into a Zener diode without resistor to drop the Zener current into will burn out the diode. At least you need a series resistor before pin 2 to limit any current to at the most the rating of the Zener diode. The other pins in that original circuit do not make any sense either. The white (pin1) wire will short out the voltage on it. The base of the transistors have no current limiting resistors in them. What is pin 3 doing? The whole thing seems to me to be a nonsense.
Emitter in that last diagram IS the emitter of a transistor. I tried to be careful to say "IR" emitted to signal the strength of light involved, but sorry if I confused you.
This is a video of what I was doing, trying to find all the different ways to detect a ball on a marble running toy.
Which I think tells you that I know about these things.
If you don't see nothing you must see something, unless you are using a double negative. If you mean you don't see anything the you are using tautology.
Anyway as I said that documentation is a miss reading of the situation.
False thinking that is not what happens with DC/DC converters when they are overloaded. What actually happens is the voltage output drops, so have you measured the output voltage?
Probably best idea right now.
I'm out of questions and suggestions.

