Hello everyone. I need some help with my project. I have a live water tank level indicator project. I have a monitoring module powered mainly by an Arduino UNO. The problem is that lately my Arduino often restarts suddenly, and my LCD occasionally freezes as well. My thoughts are, maybe it's due to the bunch of components connected to the Arduino pins. Perhaps they are drawing too much current to the Arduino? Please educate me . Here's my schematic. Sorry for the poor design.
Yep, it looks like you're powering everything up with the poor Arduino...
IMHO a separate power supply is not only possible, it's highly recommended. You just keep GND in common.
Yes. Just note on most cases you don't need two separate power supplies, you can simply use a single 5V power unit (with adequate output current, I think 2A could go well) and split it (aka parallel) to power both Arduino and all other devices.
The backlight of the display needs current.
Is that a 5V relay ? Is the coil powered by the 5V of the Arduino, that also needs current.
I don't know if the HC-12 needs a peak current, probably not.
Powering the circuit with 5V from a power supply should solve that.
In the first picture is a single GND wire from the Arduino Uno to the breadboard, and from there the GND is distributed to all the components. That single GND wire in a breadboard is not a solid connection. If a component creates too much current or a current peak, the GND of the breadboard might be influenced. That means that all the components have no solid GND under their feet.
If powering everything from the Arduino is ok or not depends on how you power the Arduino.
If you power the Arduino via USB (PC or cellphone charger), then it might just be ok.
If you power the Arduino with that 12volt source on the DC socket, then it's certainly not ok.
What are the values of the LED current limiting resistors. I would use 1k.
Bright enough, and won't use 5*20mA.
I would connect the buttons between pin and ground, no resistor.
And use internal pull up one the button pins. pinMode(button1, INPUT_PULLUP);
Note that logic is now reversed. A pressed button == LOW.
I suppose that's a 30A relay module (150mA).
The HC-12 could draw 200mA during transmit.
The LCD backlight could use 60mA.
All within the limit of USB power.
Did you use a snubber diode on the water pump.
Not having one could also reboot the Arduino.
Leo..
Thanks for your idea. I powered my Arduino with 9 volts on the DC barrel, and no, I didn't use a snubber diode, just a relay to control the water pump. BTW I used the optocoupler mechanism of the relay to isolate the Arduino. I guess that's crossed out the pump as the problem?
I'm considering actually using the internal pullup, is that going to help me and how??
Feel if the part between DC and USB socket (5volt regulator) gets hot.
A 5volt cellphone charger, connected to the USB socket, is a much better option.
That bypasses the 5volt regulator.
Not always.
You still should use a snubber diode across the pump. A 1N4004 will do in most cases.
It reduces current draw, but the switch wiring could be more sensitive to RF pickup.
Wise to twist longer wires between Arduino and switch.
Leo..
No, I don't.
Powering an Uno with 5volt on the USB socket is safe.
It runs over a resettable 500mA fuse, and it doesn't use the 5volt regulator.
V-in needs a minimum of about 6.3volt, the DC socket a minimum of 7volt, and both are using the onboard 5volt regulator, with it's thermal limitations.
Leo..