What is the difference between the power barrel connector an Vin?

I am working in a project where I upgrade an existing project so it uses a GPS and LoRa shield to transmit data.

For my tests, I always used either the USB or the Vin pin to power the board, from a PC/Powerbank or 9V battery respectively, and everything worked just fine, working for hours at a time.
But when I made a barrel connector for the 9V battery, suddenly the whole process seems to freeze the first time it tries to send a radio transmission.

Same battery, same board, same sketch, if it's powered through Vin it works and if its powered through the barrel connector it doesn't. I am perplexed as to why this happens, is there a difference between those two inputs? Is it just my board?

I am running it on a Elegoo brand arduino mega2560 r3

1 Like

Look at the schematic :wink:

From memory, I think that the barrel has a diode. In which case the voltage into the regulator would be lower by approx 0.7V.

Vin is connected to the cathode of the diode, the barrel connect is connected to the anode of course.

This kind of 9V battery? Nine-volt battery - Wikipedia

It's a warning sign that your battery doesn't have enough current capacity to really be reliable. The voltage drop difference in the diode is not enough by itself to explain it. I think you would find that if you measure the battery voltage during transmit, you would find a voltage much less than 9.0V.

I don't know. All I can tell you is that I have used the exact same battery more than a dozen times plugged into the
barrel jack because I bought "Amazon.com" (the male one) to use it. Never used Vin.

Only rechargable PP3-size 9V batteries have much current handling, and even so its
probably less than you think. Its very very common for people to over-estimate the current
sourcing abilities of small 9V batteries. My advice with batteries is only buy brands that
give datasheets for their batteries, and check the datasheets, just as with any other
component.

For instance its pretty scandalous that capacity is rarely printed on primary cells and
batteries, and thus you get people selling cheap cells with vanishing small capacity.
I've seen D-cells which actually contain an internal AAA cell.

Sticking to rechargables is a great plan.

Post a link for the plug. It SHOULD be a 2.1x5.5mm
plug. If you bought the 2.5x5.5mm plug the the center pin is not making good contact.

Correct. The 5.5mm x 2.1mm connectors are the most common type out there. Almost 100% of the generic adapters use them, not the 2.5mm.