arduino pro mini works from usb but not from raw

I have an Arduino pro mini that is powering a stepper motor to rotate a model railway turntable. There is a photo interrupter that stops the rotation at a fixed point. Rotation is triggered by a momentary toggle switch.

The stepper motor control is on pins 6,7,8,9. The toggle switch inputs are on pins 4 and 5 plus a ground connection.
The photo interrupter is on pin 2 .

Power for the photo interrupter is from the Arduino Vcc.
Power for the stepper motor comes from a 9v dc supply.

When I power the Arduino from the 9v supply. The on light illuminates but I get no reaction when I pull the toggle switch.
If I add power via the usb connection the the sketch works as intended and the stepper motor is activated by the switch.

I have tried a jumper across the RX and TX connections as suggested for earlier Arduinos but with no success.

What am I missing? or do I have a faulty voltage regulator on the raw pin?

TrevJ:
I have tried a jumper across the RX and TX connections as suggested for earlier Arduinos but with no success.

What am I missing? or do I have a faulty voltage regulator on the raw pin?

Jumper across RX and TX is just to test that the FTDI adapter is passing characters and is useful for troubleshooting serial communication. It is not related to checking power.

Yes, you could have a bad voltage regulator. Go ahead and test that. Put a volt meter on GND and RAW and check that you do indeed have 9V. Then move the volt meter to be on GND and VCC and verify you have 5V or 3.3V, depending on which model of Pro Mini you have.

If you are getting expected voltages, show us a schematic of your project. Pencil drawn schematic is OK. And show the code you are running on the Pro Mini (please use code tags as described in the "How to use this forum - please read" post at the top of the forum.)

It does look as if it is the voltage regulator. With 8.56 volts in I get 4.51 out. If I increase the input to 9.7v I get 4.52 out. With the usb connection I get 4.9v out.

I assume that 4.52v is not enough to power the Arduino. I attach the schematic and code in case this assumption is not correct.

Thank you for your help. Next time I will test the board before I solder it up!

turntable_180_3.ino (1.59 KB)

4.5V should be plenty to power the Arduino. But the power might dip at the moment that the stepper is activated.

Do you have a link for the stepper driver board?

Unfortunately I can't find the invoice for the stepper shield in order to find the correct model.

It looks just like many other ULN2003 shields. It has 4 resistors with 4 led's, a capacitor and the chip has China 9527334, ULN2003APG on it. The only other distinguishing marks (apart from the pin markings) are ZC-A0591 along the edge next to the motor connector socket and X113647 next to the leds.

I have searched on Google for ZC-A0591 and X113647 and haven't come up with anything concrete. It looks just like the one here GitHub - tardate/X113647Stepper: Arduino library and Fritzing parts for the X113647 stepper board except that my board appears grey and that one is green.

Sorry I can't be of more help.

There is a solder jumper (SJ1 in the schematic of the ProMini) on the board between the output of the voltage regulator and Vcc. It might be open.

To test (disconnect the stepper board)

When you power the ProMini from USB, does the power LED light up?
When you have loaded a simple blink sketch and power the ProMini via RAW, does the other LED flash as expected?

I'm just trying to apply some logical thinking.

I can't see a jumper on the board. It is a Baite BTE13-010A 5v 16Mhz ATmega328. I can't find any info about the board on the net.

The power LED lights up both from USB and RAW, with and without the stepper board connected.

The other LED blinks from USB with and without the stepper connected. It does not blink from RAW (with or without the stepper board connected)

PS. I tried the continuity between the Vcc in (USB) and Vcc out and there was no break.

I have unsoldered all the connections and tried a simple "rotate the stepper" sketch. It works! Both from USB and RAW.

I must have got some wires crossed somewhere although I checked and double checked.

Thanks for the help.