12v relay problem...

Hello. I have 12v relay module. It switches when I connect it to arduino itself, but isn't enough to operate electromagnet. How to connect it to external power source and arduino to work properly? Thank you in advance.

gio12381:
I have 12v relay module.

I'm no expert, but first you should provide details of whichrelay module; there are lots of different makes, and they don't all work the same.

Hi,
You are using one of these;


Can you post a circuit diagram showing how you connected this relay please?
What model Arduino are you using?

Thanks.. Tom.... :slight_smile:

I'm using arduino uno. Connection is -- ground -> ground, vcc -> 5V, IN -> digital pin 8. I have seen posts where people had the same problem and there was a connection - VCC - power supply's +, ground -> power supply's ground and also arduino's ground. IN -> digital pin. But it works only when you connect and disconnect jumpers connected to ground or any digital pin.

You should connect:

Arduino GND - Relay GND
Arduino Out Pin - Relay In

Power supply +12V - Relay Vcc
Power supply GND - Relay GND

I thought the maximum voltage on any pin of the Ardunino Uno is Vdd+0.5V, can you really have it sitting open with 12V connected (relay off) won't it feed back through protection diodes or parasitic diodes and destroy the chip?

Besides, the relay JQC-3FF is about 70ohm so it needs 70mA which is too much for an Arduino output isn't it?

Richard1414:
I thought the maximum voltage on any pin of the Ardunino Uno is Vdd+0.5V, can you really have it sitting open with 12V connected (relay off) won't it feed back through protection diodes or parasitic diodes and destroy the chip?

Besides, the relay JQC-3FF is about 70ohm so it needs 70mA which is too much for an Arduino output isn't it?

What kind of protection diodes you are talking about? This relay controlled by transistor which controlled by arduino. Usually it's not require more that AROUND 5mA from arduino. All other power provided to relay coil by external power supply through mentioned transistor.

alesam:
You should connect:

Arduino GND - Relay GND
Arduino Out Pin - Relay In

Power supply +12V - Relay Vcc
Power supply GND - Relay GND

I have done it, but it works continuously instead of delays...

Hi,
If you disconnect the Arduino out wire what does the relay do?

Can you post your code please?

Do you have a DMM?

Thanks.. Tom... :slight_smile:

When I disconnect digital pin wire or ground from arduino, relay stops working.
I am using simple led blink code.

Hi,
If you are using the blink code, what pin are you using as output pin?
What model Arduino are you using?

Thanks.. Tom.. :slight_smile:

I'm using Arduino uno. On D8

Hi,
Have you edited the blink code to use pin 8?

Tom.. :slight_smile:

TomGeorge:
Hi,
Have you edited the blink code to use pin 8?

Tom.. :slight_smile:

Yeah, but it doesn't work...

gio12381:
Yeah, but it doesn't work...

And it never will.

Wrong module.

Note it says underneath:

"Low Level Trigger"?

That means any voltage lower than about 9 V will turn the relay module on when connected to a 12 V supply. So even when you set the output HIGH, it is feeding 5 V to the relay module and turning it on.

The protection diodes are only relevant when the pin is an INPUT. In which case, you have 6 Volts across the 1k resistor which will feed 6 mA into the protection diodes.

Not a good idea! :astonished:


Yes, you could add a(n NPN) transistor and 10k base resistor. :sunglasses:

Paul__B:
And it never will.

Wrong module.

Note it says underneath:

"Low Level Trigger"?

That means any voltage lower than about 9 V will turn the relay module on when connected to a 12 V supply. So even when you set the output HIGH, it is feeding 5 V to the relay module and turning it on.

The protection diodes are only relevant when the pin is an INPUT. In which case, you have 6 Volts across the 1k resistor which will feed 6 mA into the protection diodes.

Not a good idea! :astonished:


Yes, you could add a(n NPN) transistor and 10k base resistor. :sunglasses:

Thanks a lot for making it clear. How I have to connect resistor and transistor to a relay board?

Any common NPN transistor, emitter to ground, base through resistor to Arduino output pin, collector to the "in" terminal on relay module.

Arduino and relay supply must have common negative "ground".

It works now. Thanks a lot for helping me!

Edit your first post here to include "[Solved]" on the topic line.