jcgd wrote: ↑
Mon Jun 22, 2020 3:56 pm
Hi again. I finally bought the components needed for the circuit. I've wired it as the diagram pcmambob shared, but it doesn't seem to work. I've checked it and everything makes contact , so it's not a wire problem, I've also checked the relay alone with the fan and works fine, but when I add the diode and the transistor it doesn't work. I've also checked that the raspberry pi pins are on.
I've checked that if I made contact between the transistor's base and collector, it works.
I'll add an image of the actual wiring. It's not high quality, but it's not very hard to see where each wire goes to.
Any idea about what is wrong?
Well looking at your image the transistor appears to be wired the right way round , but I cant clearly see the diode so cant say if that is the right way round, the white ring should be wire to the positive side of the circuit as shown in the diagram.
what you are trying to do with the fan side of the project I have no idea, why have you got 3 wires connected to the relay contacts !!
Depending on the relay contact lay out you are either connecting the fan positive to 2 different gpio pin ( which can't power a fan by the way )
or you are connecting on gpio pin to the fan and then in the other state you are connecting 2 gpio pins together ( which might kill your pi under the right conditions )
so I suggest you do not power this pi or this circuit until you correct your errors.
1. please post more detailed images, just up load them to imgur.com and post links in your post.
2. please post the contact layout diagram for the relay your are using or a link to were you got it.
3. you cant power fans from gpio pins thy can only supply 16mA max, if you are using 5V fans,
then you need to power them from a 5v header pin
4. I would suggest you would do better to get yourself a breadboard and some dupont cables to set up this circuit for testing before you lay it out on a prototyping pcb for final soldered connections, twisted wires do not make good connections.
you may have damaged your transistor but hope fully you have not damaged your pi yet.