Go Down

Topic: Uno + 4 Wire Stepper Motor + 12V Power Supply (Read 505 times) previous topic - next topic

ekraft

Hello, I currently have a NEMA 17 stepper motor with an EasyDriver hooked up to an Arduino Uno with a 12 Volt power supply. Eventually, we are going to attach a load cell with a strain meter and will want to have the force to always be at 8 lbs. The stepper motor will be coupled with a vertical stage dial that will rotate depending on if the force is above or below 8 lbs. As of right now, I was wondering if it is possible to code the arduino to turn the stepper motor "counter clockwise" if the 12V power supply is under 12V and "clockwise" if it is over 12V just to practice for when the strain meter comes in. Is there a way for the arduino to read how many volts are output from the power supply? That is where I'm stuck right now. Thanks!

AWOL

Quote
Is there a way for the arduino to read how many volts are output from the power supply?

Yes, use a voltage divider (useful search term) to get the 12 volts down to less than the Arduino's supply voltage, and connect it to an analogue pin.
Use analogRead to get the voltage on the input and scale it back to 0..12V
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Go Up