Electronics > Beginners

A circuit works on a breadboard, but doesn't on the PCB I made. What's wrong?

(1/2) > >>

vsevolopod:
I'm trying to turn small 5 volt relays on and off from an arduino. I'm using a BC547 NPN transistor triggered by one of the digital pins. I've built the circuit based on this tutorial.

https://www.electronics-tutorials.ws/blog/relay-switch-circuit.html

I built the circuit on a breadboard, and it works. I made a PCB that has the Atmega 328 and the transistors on it. I know the microcontroller works, and that the extra digital pins on it will turn on the relay if I build the exact same circuit that is on the PCB on a breadboard. I don't understand why the exact same circuit on a breadboard turns the relay on, but it doesn't work on the PCB at all. I thought maybe it was because I have about a foot of cable between the transistor and the relay, but I put the same cable between the transistor circuit on the breadboard and the relay, and it worked. So at this point I've narrowed it down to a problem with my PCB design.

When I measure the voltage between the collector of the transistor on the board and +5v, I get +5 volts switched on and off by my arduino sketch. When I connect the relay, I get like 2V or less (I forget the exact number). This only happens with my PCB, not the breadboard.

What could I have done wrong with my PCB design?

Might there be a way to fix this, at least for now and use the same board, then update the design when I iron out all of the possible issues?

sokoloff:
Occam's Razor suggests that the most likely cause is something is actually different between the breadboard and the PCB you made.
I'd spend a lot of time verifying or disproving that notion before thinking there's something different between the breadboard and PCB with the same circuit and components.

tsman:
Show your PCB artwork?

vsevolopod:
I went back and attached it to the original post, so It's easier for anyone to find.

I have spent a lot of time making sure that there is no difference between the PCB and the breadboard. The components are the same, the diodes are in the right way, everything is put together correctly, I don't think it's a construction mistake. It being a PCB and not a breadboard is the main difference I can find, the traces leading from the microcontroller to the transistors are somewhat long, and there are jumpers on top of the board that connect them to skip over some other traces on the bottom.
The digital outputs I wired to the breadboard are right next to the IC, this is the main difference I see, but maybe I'm missing something.

JDubU:
Transistors backwards on the schematic.

Emitter on an NPN transistor needs to be connected to ground.  Collector goes to the bottom of the relay coil.
Turn the transistors 180 degrees on the PCB (flat side toward the left side of the board).

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod