InvaderZim
Senior Member
Hi all, I'm just looking for a sanity check here. I've had an annoying bug, and I think it was due to me being silly about the supply voltage; but I thought I'd share this ghosst story on this fine Halloween 1) to make sure I understand my problem and 2) to warn others.
I used 7.5 volts as the input to a 5V linear regulator (experimenter board), thinking to avoid heat problems. In retrospect, with my cheap supply perhaps 2.5V of dropout is just not enough! My loads include a backlit 16x2 LCD and a 5V relay (switched through a BJTransistor).
I had code that looked like
I sometimes got double relay pulses, and yet the interrupt was never triggered...hmmm. It certainly seemed like the pause for delay2 was being interrupted prematurely though, and the display was always updated properly. Then I noticed the LCD would dim during solenoid pulses. It seems my voltage would sag to ~4.5V; not bad, but not ideal. I bumped the supply up to 9V, and it *seems* my problems are gone.
So my question is: can an undervoltage (possibly worse than the 4.5V I measured) actually break a pause, and yet let the program continue at the next line of code?
If so, take heed fellow programmers!
I used 7.5 volts as the input to a 5V linear regulator (experimenter board), thinking to avoid heat problems. In retrospect, with my cheap supply perhaps 2.5V of dropout is just not enough! My loads include a backlit 16x2 LCD and a 5V relay (switched through a BJTransistor).
I had code that looked like
Code:
{pseudocode}
set interrupt
main:
high relay
pause delay
low relay
pause delay2
{other stuff}
serout to display
goto main
So my question is: can an undervoltage (possibly worse than the 4.5V I measured) actually break a pause, and yet let the program continue at the next line of code?
If so, take heed fellow programmers!
Last edited: