Arduino randomly resetting - Car Battery

Hey guys, This is my first time on the forum, so I hope its the right category.

So, I have this project called CarPi https://github.com/Littlejd1997/CarPi), which uses a raspberry pi, connected to GSM (ATT), and pulls music from spotify, then it processes it, plays it out my car speakers, and lights up my car which has about 10 meters of LED strips in it. It all works wonderfully.

Right now, the rpi gets the music, processes it, then it commands an Ardunio Micro over the serial pins to adjust the lights (PWM & transistor) accordingly. I was using serial over USB, but I switched to using only the headers to power and communicate. Now, almost completely randomly the arduino will reset. My guess is because of the electrostatic noise with the car battery.

Any thoughts?

If you need more information let me know

Thanks,
Jon

This is my first time on the forum, so I hope its the right category.

It’s not, so let’s try moving it.

My guess is because of the electrostatic noise with the car battery.

The what?

I switched to using only the headers to power and communicate.

Expansion required.

Does the car 12V go through a regulator or converter of some kind to power the 3.3V RPi?

Just how do you power the 5V Micro?

How much current do you run through the Micro? What powers the leds?

Resets will happen when voltage drops below 4.5V

Resets will also happen on most crashes, like in RAM when the heap and stack collide.

That's all the guesses I can make based on the clues you've given.

AWOL:
It's not, so let's try moving it.

Where would you recommend moving it to?

GoForSmoke:
Does the car 12V go through a regulator or converter of some kind to power the 3.3V RPi?

Just how do you power the 5V Micro?

How much current do you run through the Micro? What powers the leds?

Resets will happen when voltage drops below 4.5V

Resets will also happen on most crashes, like in RAM when the heap and stack collide.

That's all the guesses I can make based on the clues you've given.

Thank you for the questions. Allow me to expound a little.

I have two lines coming from the 12v Battery. One, goes to a plain old 2.1a PNY usb socket, which powers the rpi over 5v USB. I then power the arduino over the 5v pins from the rpi

The second line, the positive attaches directly to the LED strip, while the negative splits into 3 lines attaching to a transistor, which switches the negative to the LED strip, and the arduino controls the transistor.

The voltage may be dropping below 4.5V, that could be doing it. I highly doubt its RAM, because the sketch is incredibly short.

PS. I have a 15 foot USB extension from the PNY usb adapter, which could be causing the voltage loss

Check around for DC-DC Buck Converters. Best thing since voltage regulators!
Just make sure you get one(s) rated to handle your required current needs twice over.

I have some 3A modules, they cost less than $2 ea when I got 5. They have an adjustment screw that takes a lot of turns to go from 5V (max output V for these) down to 3.3V. I checked with my meter and it turned 5.1V (from wall charger) into 5V before I adjusted anything, a 7805 needs around 7V to begin turning out 5V, these will convert 4-AA 6V to 5V will 5% or less loss. They're supposed to be good converting/bucking up to 36V down to 5V or less at least up to 3A of output.