Q: explain MEGA sensor shield shorting problem?

Hi all,

So I've been using an Arduino MEGA sensor shield that was handed down to me (https://www.amazon.com/SainSmart-Sensor-Arduino-MEGA1280-MEGA2560/dp/B007PABRNM#feature-bullets-btf) for a while now, and everything was fine and dandy. Just recently, however, my code has begun malfunctioning as soon as I unplug the USB cable--in particular these HC-SR04 distance sensors I'm using. I've tried all sorts of debugging, but the sensor values just keep coming in as zero as soon as I unplug the cable.

I've been reading the forum and the reviews on this sensor shield (from that same Amazon link) and it looks like there's a shorting problem with the USB-connector and the PWR_SEL pins. Unfortunately, I don't really understand it--so I'd appreciate if someone would take the time to explain it to me.

I've lifted the board up enough that there isn't anything touching the top of the USB jumper (if that is what it means)... Do you think my code issue has anything to do with this shorting problem?

Thanks in advance!

How else are you powering it besides USB?

Do you have the jumper installed taking power from the Arduino power?

Most people put some tape on the USB connector to avoid a short.

The newer Mega Sensor Shield have relocated that pesky jumper. Like:

https://www.amazon.com/KEYESTUDIO-MEGA-Sensor-Shield-Arduino/dp/B0169YXYEY/ref=sr_1_3?

@terryking228 thanks so much for responding!

Ah, sorry I forgot to mention: in brief, I have two 12V batteries connected to a L298N motor module. From there, I connect a Turnigy 5A SBEC (https://hobbyking.com/en_us/turnigy-5a-8-26v-sbec-for-lipo.html) that apparently regulates down to provide a constant 5A and 5V. When everything was initially working, I had had it connected to pin A12 (on the sensor shield, the GND is also right there).

I do have the PWR_SEL jumper on, so the +5V to power my sensors, etc, should be coming from the shield. Apparently power should also be limited to 300 mA (http://www.yourduino.com/sunshop/index.php?l=product_detail&p=195)?

So this is the point I'm confused about--where on the USB connector should I put tape/where is it shorting out from (probably being dumb, but... is it the top?)

Nice! Thanks so much for that link!


Since things started malfunctioning, I actually tried running the Blink program and found something interesting that I am not currently able to explain. Basically, I took 4 AAA batteries and put them into one of those holders to get a nice 9V. When I plugged the 9V battery into the Arduino's GND and Vin pins, BLINK worked. Then when I plugged the Reverse Polarity Protector into the Arduino's GND and Vin pins, The Arduino received power, but the code did not work. Finally, I plugged the Reverse Polarity Protector into the Arduino's GND and 5V pins--it worked! (Now I'm really confused--do you think my MEGA is fried?)

Thanks again!

The clear blunder is not comprehending what the "Vin" or "RAW" terminal is. It is essentially an ornament provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

If powering from batteries, as long as the battery pack cannot exceed 5.5 V, this must be connected to the 5 V pin.

Nowadays, 5 V regulated switchmode packs are arguably the most readily available in the form of "Phone chargers" and switchmode "buck" regulators are cheap on eBay so these can be fed into the USB connector or 5 V pin to provide adequate power for all applications. Unfortunately, many tutorials or "instructables" are seriously outdated or misleading and have not been updated to reflect the contemporary situation.

Hi @Paul__B, thanks for responding.

So if I have a 9V battery pack I connect it to Vin, but if I have a power supply that gives <5.5V, that goes into the 5V pin which bypasses the regulator. Got that.

Paul__B:
The clear blunder is not comprehending what the "Vin" or "RAW" terminal is. It is essentially an ornament provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes.

What do you mean that it is an ornament? Is it not meant to be used...? Is it no longer practical to power a lone Arduino board this way?

Paul__B:
Nowadays, 5 V regulated switchmode packs are arguably the most readily available [...] these can be fed into the USB connector or 5 V pin to provide adequate power for all applications. Unfortunately, many tutorials or "instructables" are seriously outdated or misleading and have not been updated to reflect the contemporary situation.

I see that you're suggesting just using a 5V output for all purposes, but I'm a little confused on what you mean by "contemporary situation"? Also, what's a switch mode pack?

Thanks.

brightorange:
What do you mean that it is an ornament? Is it not meant to be used...? Is it no longer practical to power a lone Arduino board this way?

Just as I said. It was something that made sense when the Arduino was started at least 14 years ago.

You may conjecture just what devices one might have wanted to connect to the Arduino back then, but they would have fallen into two categories; those requiring very little power such as sensors, and those which were self-powered and only required logic-level control signals. Note in that image above, the 7805 regulator has a matching hole in the PCB to enable mounting a heatsink.

brightorange:
I see that you're suggesting just using a 5V output for all purposes, but I'm a little confused on what you mean by "contemporary situation"? Also, what's a switch mode pack?

"Contemporary" means now as against 14 years ago. :grinning:

A switchmode converter is something looking in some way like these:

Paul__B:
The clear blunder is not comprehending

That's unkind. It's not a lack of comprehension, it's more likely to be ignorance.

And in any case, ignorance isn't a "blunder"; nor is not understanding something, for that matter.

that apparently regulates down to provide a constant 5A and 5V.

Good trick if you can do this.

You can't have a constant 5A and 5V unless you have a load with a resistance of 1 ohm and the power supply has some way of altering that resistance such that your load is always 1 ohm no matter what it is.