Well yes i just drew it wrong and the relay module had that schematic before i posted the new schematic with its circuitpcmanbob wrote: ↑Tue Apr 30, 2019 9:26 amHi.
So you have no current limiting resistor between the gpio pin and the transistor base, if you were in fact using a PNP transistor then you were sinking 5v on the the pi gpio pin , which would have killed your pi , not to mention that you transistor is connected the wrong way round.
And finally your diode is connected the wrong way round so its passing current all the time.
If you want to drive a relay using a transistor you need to connect it like this using an NPN transistor in this example a 2N2222, the diode is connected in reverse to the normal current flow so that when the relay is switch off it provides a path for the reverse voltage/current generated by the collapsing magnetic field in the relay coil.
Yeah, makes me wonder too..... any link to the source of this?
Well the hex inverter is there because the protection system of relay module has a zener diode that turns off the pnp transistor as it turns on when there is 0 volts so the npn transistior turns on when there is a higher voltage so the zenre diode send it high voltage which then converts the the logic high to low and the npn transistor turns off because of this and the raspberry pi 2 has a constant act LED and the the CPU is heating upLTolledo wrote: ↑Wed May 01, 2019 10:29 pmYeah, makes me wonder too..... any link to the source of this?
BTW, is your RPI2B still "alive and kicking" or under ICU?
Well it is complicated the zener diode is connected to the hex inverter and in my previous post how the protection system is there in the relay module is the reason for having the hex inverter wen vere the zener diode activates the hex inverter inverts the output and turns off the transistor and then the zener diode act as the flyback diode nice design but also really bad fot the raspberry pipcmanbob wrote: ↑Wed May 01, 2019 7:24 pmWell in you second diagram you are still using a zener according to what you have drawn, I suggest you use a 1N4001 to protect you circuit from the back emf and why have you got a hex inverter gate connected between ground and your 2N3904 transistor base and ground ?
Well I did the thing you said i connected my new raspberry pi 3b+ to an mosfet to turn on and off the 5v going into the arduino the mosfet will act as the switchand the arduino reads the value and turn pin 13 on or offIcosagon wrote: ↑Tue Apr 30, 2019 8:50 amHello NSG650
I guess that the relay was clicking because when the raspberry pi boots its gpio pins are not programmed/ or dont know which state they were last, the gpios maybe high or low.
You could have used arduino with raspberry to control the irrigation system
What did you use to power the relay and raspberry