is my relay circuit right ?

hello guys,
hope you all are doing well
i need please to know how to connect this relay exactly because, in my attachment file schematic, you will see the way i connected but this way when i put the arduino pin to low, everything stays on and the relay 2 !!
these are the picture of the relay i am working with and this is the description written on it :
JZC-22F21C
7A 9VDC

it is not a schematic, it is just the way you wired it ;) - ( a schematic uses electronics symbols ) You don't tell us what transistor it is, and its pinouts !? very important to see if it is OK ;) are you sure your relay is a 5V ? You didn't write the exact reference, google find nothing if I just copy/paste your reference, and finds a lot (different voltages) if I try "JZC-22F-21C" Maybe you could google yourself to find a datasheet and give us the link to it :idea: :)

alnath:
it is not a schematic, it is just the way you wired it :wink: - ( a schematic uses electronics symbols )
You don’t tell us what transistor it is, and its pinouts !? very important to see if it is OK :wink:
are you sure your relay is a 5V ?
You didn’t write the exact reference, google find nothing if I just copy/paste your reference, and finds a lot (different voltages) if I try “JZC-22F-21C”
Maybe you could google yourself to find a datasheet and give us the link to it :idea: :slight_smile:

lol yes i should have said drawing
it’s a 9V relay i said it in the description and 7Amp
the transistor is 2N2222
the 5V is the current from the 5V of the arduino
and here is the datasheet

Relay 9V 7A.pdf (104 KB)

If the coil voltage is rated 9V, why do you supply it with 5V ? Read the datasheet "Caution 1 " and read also the pick-up voltage 6.75V , the relay won't work with 5V

alnath: If the coil voltage is rated 9V, why do you supply it with 5V ? Read the datasheet "Caution 1 " and read also the pick-up voltage 6.75V , the relay won't work with 5V

aha ok so i need to know why is the 7 segement still on ? which means what might be the problem ? and am i connecting it the right way in the drawing ? and the 5V is from arduino (NOTE: instead of motor, i am using a 7 segment)

I think you connected the +9V and the 7segment on the Normally Closed contacts, that’s why it is ON.
The relay has 3 contacts : common->NCpin / common->NOpin

You need to use the NO . But again, if you power the coil with 5V, it won’t work, the 7segment will stay OFF

According to the datasheet, one of the two pins will connect to the middle of the three pins, which one connects is determimed by the current flowing thru the outer contacts of the 3 pins. See drawing 1C on the datasheet.
[Edit - added missing diode]

Also if your 9V supply for the motor is really a small 9V battery, don't expect much to happen, small 9V batteries cannot produce much current.

CrossRoads: According to the datasheet, one of the two pins will connect to the middle of the three pins, which one connects is determimed by the current flowing thru the outer contacts of the 3 pins. See drawing 1C on the datasheet. [Edit - added missing diode]

aha so this is different from how i was connecting it !! but in fact, there is no fan or motor, what i want to do is giving power to the power pin of a 7 segment so it has just 1 wire, so i don't understand how to connect it to power like you put in the drawing, the relay NO to fan and then to power and the coil to power 2 !!?

Break the fan/motor circuit up. +5 to LED Anode to NO pin, COM pin to GND. Relay switching wil connect the Cathode to Gnd, completing the current path from 5V to LED to Gnd. Put a current limit resistor in series with the LED somewhere along the path also - between +5 and Anode, or between cathode and NO, or between COM and Gnd.

CrossRoads:
Break the fan/motor circuit up.
+5 to LED Anode to NO pin, COM pin to GND. Relay switching wil connect the Cathode to Gnd, completing the current path from 5V to LED to Gnd.
Put a current limit resistor in series with the LED somewhere along the path also - between +5 and Anode, or between cathode and NO, or between COM and Gnd.

i changed the power from 5V to 9V and when i connect the blue wire like in my drawing down there, the relay start making its ticking sound without stopping and the 7 segment is on
so i need to know what’s wrong here never the less the 7 segment is working, and i didn’t get exactly how to connect the diode
can i ask you please to do it on my drawing ? and then tell me exactly what you said about the 7 segment ?

the way i connect the 7 segment is : 8 pins of 7 segment to resistors each one, and then to shift register, and 2 pins of the power to relays

The battery is getting TOO HOT !! :S

You really don't have a clue what you are doing here.

Of course the relay will start clicking over and over again. Because at the moment you are switching it, you make a full short in the power line. All items powered by that will cease at that moment, that includes the relay and the Arduino. After the relay has switched off because of this, the power is restored and the Arduino will start over with exactly the same result.

Remove the most right hand side black wire. Connect the red wire to your 7 segment display to that middle of 3 pin where you up until now have the black wire connected.

MAS3: You really haven't a clue what you are doing here.

Of course the relay will start clicking over and over again. Because at the moment you are switching it, you make a full short in the power line. All items powered by that will cease at that moment, that includes the relay and the Arduino. After the relay has switched off because of this, the power is restored and the Arduino will start over with exactly the same result.

i tried it again putting a diode between the transistor and the relay so just one LED of the 7 segment is on, nevertheless my patter is 8, so i removed the diode and again i connected the relay directly to transistor as shown on my last drawing, the relay now didn't make a continuous sound of ticking !! and the pattern is what i wanted the 8, so why the sound did happen in the first time and not now nevertheless i have the same circuit of connection ?!!

Again because you might have missed my edit:

Remove the most right hand side black wire. Connect the red wire to your 7 segment display to that middle of 3 pin where you up until now have the black wire connected.

Maybe this is clearer to you.
The 2 crossing (approximately 90 degrees)red lines are not connected to each other.

MAS3: Maybe this is clearer to you. The 2 crossing (approximately 90 degrees)red lines are not connected to each other.

it didn't work unless i connect the transistor pin, the emitter to relay, and then to +9V !! :S

As mentioned before… schematics help… a lot.

It’s our language.

Below is a Schematic of what you should be trying to do… as well as how the relay is wired. Emitter should be at GND potential… Collector to relay

** Note the position of the pins and what they do.**

pwillard:
As mentioned before… schematics help… a lot.

It’s our language.

Below is a Schematic of what you should be trying to do… as well as how the relay is wired. Emitter should be at GND potential… Collector to relay

** Note the position of the pins and what they do.**

it still something is not right !!

this is the way i am wiring and the 7 segment is always on even if the arduino pin is LOW

firashelou:

pwillard: As mentioned before... schematics help... a lot.

It's our language.

Below is a Schematic of what you should be trying to do... as well as how the relay is wired. Emitter should be at GND potential... Collector to relay

** Note the position of the pins and what they do.**

it still something is not right !!

this is the way i am wiring and the 7 segment is always on even if the arduino pin is LOW

you didn't follow the schematic then look again at pwillard schematic, and try to draw it, before wiring it, and before yous see the magic smoke :grin:

BTW, why a relay ? a transistor should be enough, and if you want to separate the power supply, you can use an optocoupler , instead of a transistor + a relay !

alnath:

firashelou:

pwillard:
As mentioned before… schematics help… a lot.

It’s our language.

Below is a Schematic of what you should be trying to do… as well as how the relay is wired. Emitter should be at GND potential… Collector to relay

** Note the position of the pins and what they do.**

it still something is not right !!

this is the way i am wiring and the 7 segment is always on even if the arduino pin is LOW

you didn’t follow the schematic
then look again at pwillard schematic, and try to draw it, before wiring it, and before yous see the magic smoke :grin:

BTW, why a relay ? a transistor should be enough, and if you want to separate the power supply, you can use an optocoupler , instead of a transistor + a relay !

because i am getting a higher voltage, the transistor didn’t work :S
i connected the collector to 5V, the base to arduino and the emitter to the pin of 7 segment but didn’t work with many 7 segments !!