I’m fairly new to Arduino, and an electronics novice as well. I’m working on a telescope tracker project involving 3 stepper motors, and have a question about power supply to the Arduino. I’ve noticed something odd about using the 5V pin on the power header that I haven’t read about anywhere else. As this is a portable battery operated project I’m wanting to reduce power consumption, so I’m using a 12V-5V DC/DC converter to supply power to the logic power side of the EasyDriver stepper drivers to bypass the onboard regulator, and I thought this would work on the Arduino as well.
Depending on how I first initiate power to the Arduino I get different results. If I power everything but the Arduino first with the 12V battery, then insert a jumper from the breadboard 5V rail into the Arduino 5V pin, I get the “several blinks and couple seconds pause” before the program starts. However, if I have the jumper wire connected before I connect the battery, the Arduino doesn’t do the blink and pause, but instantaneously starts the program, no blink and no pause at all. I don’t think this is normal, but I have done a lot of reading up and haven’t heard whether one or the other behavior, or both, is to be expected. I think the blink and pause is normal because if I jumper from the 12V rail into Vin on the Uno that’s what I see. So I’d like to hear your input on this, and whether there might be anything wrong with what I’m doing.
Yup, doesn’t seem to be a problem with the program that I can tell. I just thought it was weird to get two different reactions, depending on the method.
Well, I have no idea what I did, but now it does the ‘normal’ pause and blink using the 5V pin. I’ve done two things since I first posted, one was I didn’t have the DIR pins tied to anything, so I tied them all to ground. The second thing I did was accidentally fry one of the EasyDrivers and had to replace it with a new one (we won’t discuss that). After those two things is when I found it was working for me. I tried removing all the DIR ground wires and it still worked, so that leaves the possibility that the driver board was possibly, by coincidence, faulty, but I really have no clue.
Alright, a little more data. When I replaced the fried EasyDriver with a new one, I forgot to cut the solder joint for providing 5V power separately, when I discovered that, it gave me a clue. So I then removed all but one driver from the breadboard and began checking the difference. With one of the EasyDrivers with the solder joint cut, the Arduino would do the instantaneous start. When I used the driver without the solder joint cut, the Arduino did the ‘normal’ blink and pause. So something about powering the EasyDriver logic circuits separately (not going through the onboard regulator) makes the Uno act differently. Still, the question is, does it matter?
Well If the program acts the same, why complain? Haha. But this sounds quite interesting. Could you give me a complete schematic or something so I can follow this better? Hand drawn with a picture is fine.
Yeah I thought it was kind of interesting. I’ll make a schematic tomorrow afternoon or the next day. Don’t expect anything pro but I’ll do the best I can. Thanks for your interest.
I THINK you may be running into an issue with the bootloader on the Arduino. I mostly use the Mini but I think the Uno is similar in most ways. What I find is that if I power on the Mini, the program runs right away. But if I press the reset button, I get the delay while the bootloader is waiting for a possible download. If that times out, the program starts.
I will guess that the reset line to the Arduino behaves differently based on how you power it up. In one way the processor comes up in reset and runs the bootloader and in the other it just starts to run.
fll-freak:
I THINK you may be running into an issue with the bootloader on the Arduino. I mostly use the Mini but I think the Uno is similar in most ways. What I find is that if I power on the Mini, the program runs right away. But if I press the reset button, I get the delay while the bootloader is waiting for a possible download. If that times out, the program starts.
I will guess that the reset line to the Arduino behaves differently based on how you power it up. In one way the processor comes up in reset and runs the bootloader and in the other it just starts to run.
Ok, so it sounds like you’re saying it’s not something to be really concerned about. I was thinking about it this morning on the way to work, and I was wondering why it does the ‘blinkenpause’ anyway, I wondered if it was similar to a motherboard POST, but you’re saying it’s just a bootloader waiting for a download before proceeding. It’s odd that I’ve done a ton of reading up on Arduinos and haven’t seen any mention of this behavior anywhere yet.
I’ll post a diagram later anyway, but it sounds like it’s of no concern unless someone says otherwise.
It’s still really curious to me that it’s directly related to how I configure the EasyDriver, whether I’m opening SJ1 and supplying 5V logic power externally or leaving SJ1 closed and using the ED onboard VR.
If you press the reset button on the Uno, does the LED blink? I think it should. I think that is the indicator that the bootloader is waiting. What does the LED do when you download a program to the Uno?
Pretty sure this is a subtle issue with the power up sequence. Perhaps the time for the voltage to reach the minimum start up time is extended in one case than the other? Perhaps there is a dip as the ED comes on line? Perhaps the Gods are just playing with you?
I would not be overly concerned (but I have been proven wrong many times in the past).
Sorry it’s not industry standard, I’m a toolmaker/amateur astronomer, not an EE. It’s simple enough, though. The large blue rectangle is my breadboard, the top rail is the main 12V power supply rail. I am showing the EasyDriver with a horizontal split line to illustrate that I have cut SJ1 which separates the main (M+ 12V) supply to the board from the logic (5V) supply. The project does have more parts (LCD, 2 more EasyDrivers), but when I strip it down to just what you see there, I get the behavior I’ve described.
Summary: with the shown schematic, with the 5V jumper plugged into the Arduino, turn on the 12V supply and I get no ‘blinkenpause’. Alternatively, leave the 5V jumper unplugged, turn on the 12V supply, plug in the 5V jumper, I get ‘blinkenpause’.
If I make the following changes, I always get ‘blinkenpause’:
1.Close SJ1 on EasyDriver and remove 5V input at the bottom, so that the ED receives it’s 5V logic supply from the onboard regulator.
Change the jumper on the Uno so that power supply comes from 12V into Vin (no external connection to 5V pin)
If you press the reset button on the Uno, does the LED blink? I think it should. I think that is the indicator that the bootloader is waiting. What does the LED do when you download a program to the Uno?
Pretty sure this is a subtle issue with the power up sequence. Perhaps the time for the voltage to reach the minimum start up time is extended in one case than the other? Perhaps there is a dip as the ED comes on line? Perhaps the Gods are just playing with you?
I would not be overly concerned (but I have been proven wrong many times in the past).
Yes, pressing the reset button once everything is going does cause the normal blinking and restarts the program.
Do you really have D0 and D1 connected to the ED? These are the TX and RX lines for the USB bootloader. When you use the USB to reprogram, the internals convert USB data into serial data. Serial data on the UNO come in on pins 0 and 1. So right off the bad you have some issues. I would move the step and direction from D0/D1 to D2/D3 and see if things behave any differently.
I could see a case where they do. If the ED generates enough contention, the UNO might see that has a byte to the bootloader.
fll-freak:
I THINK you may be running into an issue with the bootloader on the Arduino. I mostly use the Mini but I think the Uno is similar in most ways. What I find is that if I power on the Mini, the program runs right away. But if I press the reset button, I get the delay while the bootloader is waiting for a possible download. If that times out, the program starts.
I will guess that the reset line to the Arduino behaves differently based on how you power it up. In one way the processor comes up in reset and runs the bootloader and in the other it just starts to run.
Wow this is ingenious. Nice call Skye. Makes perfect sense.
Yes, it’s a bootloader feature labeled “no wait”; The idea is that if the AVR is restarted by a RESET signal (either button or auto-reset via the serial port), it will enter the bootloader (blinks + pause), but if it is restarted for some other reason (specifically power-on) it will run the sketch immediately.
I would expect that in the case of a “dirty” or “bouncy” power-on (connecting a jumper), it would be a bit random which reason the AVR actually sees (the autoreset circuitry is being powered on too, etc), but the two behaviors are intentional.
fll-freak:
I THINK you may be running into an issue with the bootloader on the Arduino. I mostly use the Mini but I think the Uno is similar in most ways. What I find is that if I power on the Mini, the program runs right away. But if I press the reset button, I get the delay while the bootloader is waiting for a possible download. If that times out, the program starts.
I will guess that the reset line to the Arduino behaves differently based on how you power it up. In one way the processor comes up in reset and runs the bootloader and in the other it just starts to run.
Wow this is ingenious. Nice call Skye. Makes perfect sense.
So I thought as well, but I made the changes last night (moved the STEP and DIR pins to D2 and D3, removed any references to 0 and 1 from the program) and it made no difference at all, same behavior. The one common factor I can see is switching the EasyDriver from internal vs. external logic power, when I change that one feature it changes the behavior.
So I think you have two issues. The first did not seem to be an active issue, but reusing the D0/D1 lines for the ED was an accident waiting to happen. If you ever reprogrammed the Uno with the ED on, the motors would have gone nuts. Moving those over to other pins was “Good Thing” ™.
The second issue is really just a feature to the Arduino bootloader. A reset causes a delay while the bootloader waits for commands. A power up, causes instant start. Somehow with the ED enabled or not, the power on sequence is subtly different. Not sure why, but given the right resources (scope, …) and time we could probably figure it out. But unless you “need” to know the reason or can’t tolerate the 3-4 second delay, I think you can safely ignore this.