alimentation Arduino + 4 sensors + 1 relay

this relay is ok....
i hope you are not buying it from mouser because it apparently they sell em in batches of 610 units :slight_smile:

the whole circuit (arduino included)
even if you place it into a fridge it will not heat up the ambient at all

I'll still search for a relay because you don't seem to be really convinced by my previous one.. :slight_smile:

I've heard that if the cables are long, it could have noise added to the voltage.
How far do you think I could put the sensors from the Arduino?

And the relay from the Arduino?

Unfortunately, the link is unavailable in my country,

Where are you living?

Regards

Bonsoir!
I'm living in France...

Hola,

For a moment I was afraid you were in Cuba or similar . . . :wink:

The advice you are receiving is good . . .

On the wiring concern (length of wires): As a general rule, the longer they are, the more problems you will have (wires act as antennas; they collect electrical noise from everywhere and, if you have a relay in the neighbour you will have noise).

Of course in your project you have layout concerns (the posistion of the ultrasonic detectors). Do them have to be far from the arduino itself?.

Salutations

Buenas tardes!

It depends : if the Arduino card really don't generate a lot of heat (and from previous answer, it's the case), then the sensors can be close to the Arduino (between 10cm and 20cm).

But if it generates too much heat, I would have to put it something like 1.5m away.

How can I know precisely about the generated heat? (from my sensors, my arduino, and my circuit) Is there a calculus existing?

Adios!

But the relay will most probably have to be far away from the Arduino (about 1.5m away).

Same thing for the resistance and the transistor as for the Arduino : If it generates too much heat, then I'll have to put it 1.5m away with the relay.

Anyway what do you think? Should I preferably put the resistance and the transistor close to the Arduino or close to the relay?

Hola,

I have to confess that I am amazed on your concern on heating the surroundings: what's the project?; I can't imagine a project in that 1 or 2 watt make such a big difference (have in mind that you can't even sense yourself 2 watts; and, believe me, human sensors are very good ones :wink: )

Regards

i will not be that worried about cable lenght and noise
but try to extend the wires of the reley on the arduino side if really necessary, the 12V line of the arduino can be as long as you want because there is a good regulator circuit on the arduino and also the arduino output don't suffer from noise
about the machine instead we don't know if noise is a concern so so keep the machine wires short
btw.... it's a huge machine :slight_smile:

and the maximum temp that your components can reach may be 35° so they will not heat up anything so keep the system compact if possible

and btw.... i'm really sorry about what happened at the charlie hebdo headquarters
those people are revolting (in both senses)

Ok, so I don't worry about cable length and noise. The fact is that I have materials in the machine that expands with heat, I was afraid that it would expand too much but I understand that finally it's not a problem.

I have a question : at the end of the day, I would like to allow a communication between the PC and the Arduino so I really need a USB cable.
The PC will be away from the Arduino : approx 4m. I found a long USB cable for that : 4.5m length!

Would my wiring still work with both 5V supply from the USB and 12V supply from the external power supply? Attached is a schematic.

Or in that case with the USB, would you advise a completely different wiring?

Thank you very much!

it will work
the arduino has an autoselector for the supplies you are connecting to it, as long it has a common gnd it will work and it has a common gnd

just another bit of a tip
don't use a 1n4001
use a 1n4007 instead (faster)

Thanks for the advice, I'll follow it!

What are optocouplers used for? Would it be suitable in my case instead of a relay?

nope
a classic relays is a "perfect" short circuit
this way you are not interfering with anything
and optocouplers are too wimpy

Don't overlook the PhotoMOS relay ... just as simple to control as an LED. Optically isolated, long life.
Here's a selection list @ Digi-Key

The AQY282EH looks like a good choice for your application.

Thank you for the advice. But the AQY282EH only supports 1.12VDC input voltage and in my circuit, I feed it with the 5V output of the Arduino. It seems to me that it won't fit... Or maybe the 1kOhm resistor allows this?

Yes ... it's an IRLED that can handle 50mA (absolute max) and only needs 3mA (max) to turn on the relay. With IK resistor in series, there will be (5-1.14)/1000 = 3.86 mA which would reliably turn on the relay.

You could lower the resistance down to 220Ω (providing about 17mA) which would still keep the current within Arduino's 20mA (max operating) current, but there will be no benefit, just added current draw.

Here's the circuit:

just another bit of a tip
don't use a 1n4001
use a 1n4007 instead (faster)

Screwpilot, your advice on the diode makes about as much sense as your advice on the relay. For your information, the difference between a 1N4001 and a 1N4007 is NOT SPEED, it's blocking voltage. Look it up. Since your voltage is 12V, either diode will work as effectively. With the low current (<50mA) even a 1N4148 will work just fine.

Why the "speed" of a diode is even a concern shows your lack of knowledge on the topic. The recovery time of a 1N400X is far less than the operation time of the relay so the speed of the diode makes no difference.

If you are really concerned about speed, replace the 1N400X with two back-to-back 1N4740 Zeners. A freewheeling diode "catches" the inductive spike from the coil and this causes several "ringing" cycles at 0.7V slowing the release time. By increasing the diode's "catch" voltage to 10V, you get 14X faster response.

Thank you for your answers and observations.

@dlloyd : Thank you a lot, you help a lot here! Is the attached schematic what you mean? Will this work? I have a doubt because I want the relay to be closed most of the time (when the hurdles are far enough from the machine). Also I wouldn't need anymore the 12V external supply, right?

And will this schematic will be reliable? (this relay is here for safety so the schematic has to be reliable!)

rmetzner49:
Screwpilot, your advice on the diode makes about as much sense as your advice on the relay. For your information, the difference between a 1N4001 and a 1N4007 is NOT SPEED, it's blocking voltage. Look it up. Since your voltage is 12V, either diode will work as effectively. With the low current (<50mA) even a 1N4148 will work just fine.

Why the "speed" of a diode is even a concern shows your lack of knowledge on the topic. The recovery time of a 1N400X is far less than the operation time of the relay so the speed of the diode makes no difference.

If you are really concerned about speed, replace the 1N400X with two back-to-back 1N4740 Zeners. A freewheeling diode "catches" the inductive spike from the coil and this causes several "ringing" cycles at 0.7V slowing the release time. By increasing the diode's "catch" voltage to 10V, you get 14X faster response.

  1. the 1n4007 unlike the 4001\4004 is a PIN diode that is somehow faster than a PN (all pros, no cons)

2)a 1n4148 is a signal diode (weak, very weak)

  1. zeners are slow like slugs

4)"By increasing the diode's "catch" voltage to 10V, you get 14X faster response."
i don't know what are you talking about, we don't need clamping as long the voltage peak is in reverse