Single power supply for Arduino, electromagnet and linear actuator (12V)

This is because AVin is the same connection as the DC power jack centre pin and you would be connecting 2 power supplies together.
s far as Arduino is concerned connecting a supply to Vin disables the USB supply and this supply is not used.
Does this set up work if the USB is disconnected? Power wise it should not make any difference.
I think you will have to check and recheck. It would seem something is wrong with the power arrangement.
Cheers Bob

The setup does not work if the USB is disconnected. It only works with the USB connected (though without AVIN connected to VIN). I have not tried connecting AVIN with VIN and connect USB as well for debugging. I might give it a try given your information.

Regards,
Lok Sang

Edit: when I plug in both USB and VIN to AVIN, there is no error anymore. So I don’t know how to debug this.

Hi LokSang
Sounds like you might be missing a ground connection. All grounds must be connected including battery negative. Give us a more detailed EXACT wiring diagram that is a bit easier to decipher.
Cheers Bob

1 Like

Had a closer look just now and it looks as if the grounds are taken care of.
So the set up works with the USB connected. With or without VM connected to AVin 9 I am assuming this is Arduino Vin)
It does not work with just the VM and AVin connected together.
If this is correct there some questions.

  1. Does the power LED (green) on the UNO R3 come on.
  2. Do you measure 5V and 3.3V at the appropriate pins on the R3
  3. Do you measure the 12V motor supply at the VM pin you are using.
    If 1 and 2 are NO then the Arduino is not being powered and either the Arduino 5V on board regulator has failed or you are not getting the motor supply (VM) to the Arduino at Vin.
    Check 3). If OK then check for 12V at the AVin point in case you have a dodgy connection.

If power is not getting to Arduino you might try a 12V to 5V buck converter to input 5V to the 5V pin of the Arduino thus powering directly. When doing this remove any connection between VM and AVin.
Cheers Bob

1 Like

Hi Bob,

I can see a green power LED when connected but I think you’ve found the issue. The 5V pin is only 1.7V and the 3.3V is 0.1V. The 12V battery provides 13.7V so either that broke the regulator on the Arduino or maybe it just doesn’t support that voltage.

I will look at getting a voltage regulator. This (below) should do the trick, right?

Thanks heaps for your help.

Regards,
Lok Sang

Should do the job. Connect it to the Arduino 5V pin.
As a precaution DO NOT connect this device and the USB at the same time. One or the other but not both.
Cheers Bob

2 Likes

As it turns out, I had some dodgy connections on my DPDT switch. Another possibility was that instead of using the digital GND I should have been using the GND next to the 3.3V pin (not sure if there’s a difference). Anyway, it’s working now, so thanks for the help.