Go Down

Topic: 5 volt supply on mega2560 (Read 1 time) previous topic - next topic


Sep 15, 2012, 05:21 pm Last Edit: Sep 15, 2012, 05:48 pm by jferg Reason: 1
I have a sketch which reads data from a gps module, two I2C compasses, an I2C pressure sensor, and data from a marine data system which has been inverted to ttl by a max232 mounted on a shield affixed to the mega2560.  Only the max232 is powered by the 5 volt supply on the mega.  All of the other devices are supplied via regulated 5 volt supply using L7805.  Since the supply to the mega can reach 13.8 volts, it is also regulated to a bit less than 12 volts using a L7812.  

There is another L7805 on the LCD/Button display which steps 12 volts down to the 5 volts needed locally.  This 12 volts is obtained from the VIN pin on the mega.  A 12 volt PNP inverter is mounted on the shield and it too gets its power from the VIN pin.  Is this 12 volt pin in any way limited?  Should I power these two devices directly from my 12 volt supply rather than VIN?

The mega is sending serial data to an LCD and communicating with the various devices.  Could I be anywhere close to overloading the mega regulator?  

Symptom is that system will run for about 18 hours and lock up.  The code is about 400 lines and seems way too much to expect anyone else to diagnose.  Since it works well for so long, I wouldn't think it could be a memory fragmentation issue, if that is the correct term.

What should I be looking at?  Also, if by some chance I missed the explanation for all this by inartful Googling, point the way.


just a wild thought, maybe im totally wrong.

what i had once is that i used a wrong datatype for "millis" command, once it reached its max limit for that datatype it stopped worked after 20 days.


lax123. thanks for the idea.  I'm sticking in 18 hours < 20 days.  I'm beginning to see a pattern.  when electrical system which provides power is charging,  (13.8 volts +/-), system hangs after a while.  When I'm running on batteries, 12.6 volts or less going into external regulators system just keeps running.  The marine data signal is a modulated 12 volt which could be higher when electrical system is on charging.  I think my problem is electrical not logical, and somehow, something on the arduino or the LCD is seeing a voltage level it doesn't like. 

I suspect that trial and error is going to be the only way to a solution here.

I am going to isolate the max232 from the mega, though and see how that works out.

thanks again,  john


You say you have an LM78712 on the input? Unless the input is greater than 14.5V the 78122 isn't in regulation and is thus subject to whatever by-passing you might have present for stability. You might consider a 7808 instead to drive the L7805's with, You/ll split the lowd dissapation that way too as you will spread it out over 2 linears instead of the way it is now.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Go Up