Is it correct to connect the gnd of the Arduino to the negative terminal of other supplies, like batteries

I have an Arduino R4 Wifi. I have only just bought it so I need to check to make sure I do not burn it out. I obviously cannot run a 5v power relay directly from the board (resistance is only 70 ohms!) I have therefore done this:

I know I missed off the diode for the power relay, but I have included it to the circuit.

Does this look OK, or am I seriously going to destroy my new board?

I don't understand your circuit, what do you want to do? What pins on the relay do you connect with the transistor? But it is right, even better, it is necessary to connect the - of the battery to the ground of the Arduino.

1 Like

Oops sorry, I missed the point of the power relay switch. I just showed the coil for operating the relay. It is just a bog standard relay, so the switch is capable of handling even mains electrical appliances, or lights. Obviously I know that is safe because it is separated from the electronic stuff, and is literally just a switch.

Look OK but that 10K is to big. Try a 1K ohm, see if the relay activates

1 Like

  • Always put a kickback diode across a relay coil such as you are showing.
    Some 5v relays will work at 9v, check the relay’s data sheet.
1 Like

Oh I forgot to mention! I have already tested it on 2 external power sources (emulating what the Arduino would do). It did all work ok, but I agree with you, I think I should consider a smaller base resistor. When I first did it, the base resistor was so high it barely even switched on C/E junction. I am a bit rusty to be honest. Been some time since I did this stuff.

Arduino's have a build in overload protection, although certainly not perfect, simple circuit as this should trigger the protection with an overload. The Arduino just will keep resetting. That's a sign to cut the power and asses the circuit again to make sure you didn't make any mistakes. But if you want to be sure, feel free to ask on the forum.

1 Like
  • Always confirm the driver transistor fully turns on, use a DMM.
1 Like

Oh, I did mention that I forgot to put it into the diagram in the comment at the end (silly me). It is in there now already in the actual hardware. But, thank you all the same.

The R4 can't source as much current as the R3, it's limited to only 8mA but 1K will only require about 4.3mA, should be OK

1 Like

Yes, I will do that. It seems I have been a bit shoddy in that regard.

That gives me a little more piece of mind thank you. I will avoid doing anything silly though of course. I was very daft in that I looked at a stack exchange post with regards to the current the GPIOs can handle. That said 40ma, and when I checked the datasheet for the R4 Wifi, it is indeed 8ma. Yikes!

See post #10

1 Like

Yes, that was also what I was referring to when replying to siebe. I really should have checked the datasheet, rather than a post on StackExchange.

That depends on the Arduino. The protection circuit if any is to protect what is connected to the Arduino not to protect the Arduino itself.

2 Likes

According to the schematic, the only polyfuse on the Arduino UNO R4 WiFi is on the VCC pin of the Qwiic connector.

1 Like

What is the general gist of what you are saying? Are you stating that it is still highly likely that if you overload GPIOs (above about 8ma) it can still break them?

  • In the data sheet the manufacturer tells us the maximum safe current the GPIO can provide.

  • Taking more than this maximum current, can stress the GPIO causing it to die. :cry:

1 Like

Right OK. This was why I was so careful to use a high resistor on the base. I thought that it was better to simply operate the transistor switch, rather than potentially draw too much current. There is a laziness element on my behalf, because I should actually be concentrating on the math. In future development, I will endeavor to be more precise. Most of this development phase, I was just simply getting it to work.

Always, do the math. 8 ma, 5V means what min resistance, placed between pin and either 5V or GND? 625 ohms. Given that you are driving an NPN transistor, the voltage across the resistor will be less, so you will draw even less current. So 1K is more than safe.

No need to "worry", these things are calculable.

1 Like