I can see a diode, transistor, 3 resistors and 2 leds on the photo. Given additional information on the photo that input is active low and 2 leds are power and active an educated guess would be that transistor is p-channel mosfet or pnp used as a switch, diode is there for relay back emf protection, 2 resistors are led current limiting and the last resistor is on transistor gate/base.
Note, you still have to verify it yourself, this is just a guess. Without having the board and tracing connectivity with a tester or at least visually it’s hard to do better.
The difference from the one is that your design is active high whereas the one qu1ck drew is active low. The other mistake is that the relay active LED will never light up.
Even if you are drawing for yourself, even more so if you are drawing for others, try to adhere to rules of thumb for schematics. Signals should generally go from left to right, components should be placed between the higher voltage and ground, lines should be straight if possible, minimise crossovers and redundant corners. It makes your schematic easier to read and spot errors. There is no need to emulate the physical layout of the circuit, a schematic is a logical representation of the circuit.
Actually active high is what I wanted as that’s what the current module I have operates on. Basically I’m trying to duplicate the functionality of a relay module I bought so that I can integrate it into my own custom PCB that contain a few other circuits.
This is my first attempt at doing any circuit board stuff.
No that’s wrong too, because then the LED and resistor are in the current path of the relay and probably the relay won’t turn on due to the 1k resistor even if the base of the transistor is raised to at least V(LED) + 0.7V.
I’ve reformatted my schematic to use left to right as per kenyapcomau suggestion, but I’m still struggling to understand where to put the ‘active’ LED in my circuit.
Yes. Diagram has still too many corners and the suppression diode should be drawn closer to and across the relay coil to highlight its function but it’s better looking than before.
Mind you, I’d double check the pinout of the relay module. It seems incongruous that the coil would be between 2 and 5 but who knows?
Bad datasheet… The datasheet for the relay on the module’s product page has this:
The datasheet doesn’t have pin numbers, I added them in red based on the symbol being used in the schematic above. The datasheet never mentions if that wiring diagram is as viewed from the top or the bottom. Referencing the product photos of the module where they say where the NO and NC contacts are, I would guess that the wiring diagram is as viewed from the bottom of the relay. For something with this amount of ambiguity, I’d want the actual part in my hand and to buzz out the relay contacts to verify before committing a design to FR4.