Stepper Motor or 4 Phase Power, suggestion?

I need a little help with a project I am working on. I have a ULN2003 module connected to an Arduino Nano. I am using a pot and a two-position switch. What I am trying to do is use the switch to control the rotation, Like Clockwise or counterclockwise. I have managed to figure out how to control the speed with the pot. But it is in a like Bipolar half step mode. I’m trying to figure out how to make it a micro stepper unipolar. I have all the hardware wired correctly. I have found a lot of stuff online, but not precisely what I’m looking for. Here is what I have so far. I am new, So I am learning that is why I put the serial.print in so I know what is going on.

Edit: I am hoping to used this as an alternative to a kind of psuedo 4 phase power inverter to power 4 solenoid and I figured I could used the controls as a means of manipulating the frequency of the power system. Any help would be greatly appreciated.

#include <Stepper.h>
const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 10 through 13:
Stepper myStepper(stepsPerRevolution, 10,11,12,13);

int stepCount = 0;  // number of steps the motor has taken

void setup() {
  Serial.begin(9600);
  pinMode(2,INPUT_PULLUP);
  pinMode(3,INPUT_PULLUP);
  
}

void loop() {
  //read the pushbutton value into a variable
  int sensorVal = digitalRead(2);
  int sensorVal1 = digitalRead(3);
  Serial.print(sensorVal);
  // read the sensor value:
  int sensorReading = analogRead(A0);
  Serial.print("sensor: ");
  Serial.println(sensorReading);
  // map it to a range from 0 to 100:
  int motorSpeed = map(sensorReading, 0, 1023, 0, 100);
  // set the motor speed:
  if (motorSpeed > 0) {
    myStepper.setSpeed(motorSpeed);
    Serial.print("Speed: ");
    Serial.print(motorSpeed)/float(100);;
     Serial.print(" ");
    // step 1/100 of a revolution:
    myStepper.step(stepsPerRevolution / 100);
  }
  Serial.print("Direction:");
 if (sensorVal == HIGH){ Serial.print("On");} 
  else { Serial.print("off");}
 if (sensorVal1 == HIGH) {Serial.print("On");}
 else { Serial.print("off");}
  delay(10); // Delay a little bit to improve simulation performance
}

What made You buy this stuff? Why didn't You but things You knew how to run?

chevron694:
I have a ULN2003 module connected to an Arduino Nano

What stepper motor are you using? The ULN2003 is normally paired with an 28BYJ-48 stepper motor and it has 2048 steps per revolution of the output shaft due to the internal gearing.

If you have a Nema XX bipolar motor then you need a more suitable driver - but without seeing the datasheet for the motor I can't advise you.

...R
Stepper Motor Basics

Robin2:
What stepper motor are you using? The ULN2003 is normally paired with an 28BYJ-48 stepper motor and it has 2048 steps per revolution of the output shaft due to the internal gearing.

If you have a Nema XX bipolar motor then you need a more suitable driver - but without seeing the datasheet for the motor I can't advise you.

...R
Stepper Motor Basics

Good guess. Your right, I am using a 28BYJ-48 that came paired with ULN2003. But my goal isn't to using it to drive a motor. I am using it to control four solenoids. I am conducting some eletromagnetics field experiments and I figured this would make a good controller for it. I have done alot of research on stepper and I think unipolar microstep is good because I need something that can produce atleast a kind of pseudo-4 phases power to drive the solenoids.

chevron694:
Good guess. Your right, I am using a 28BYJ-48 that came paired with ULN2003. But my goal isn't to using it to drive a motor. I am using it to control four solenoids.

Well why didn't you say so in your Original Post so we would not waste our time with useless advice and questions.

And why did you post a program intended for a stepper motor?

You need to provide full details of what you are trying to do. A wiring diagram would also be a great idea.

If it is possible to start with a single solenoid then that would be a good idea - keep things simple.

...R

Again, I am new and just learning arduino. I figured that the stepper program would be a good try because it would create like a psuedo 4 phase power system. The darrlington array on the ULN2003 would service as a good alternative, because it is already mass produced rather than me making a mosfet driver like they do in normal 3 phase inverters. Plus, I want a 4 phase system. In traditional 3 phase inverters they are high power and Im really only looking for 5-12 volts maybe an amp maybe 2. The ability to control the frequency hence the want to control it with a pot and spin.

I can change the title if you like. I held back because I have found that most people on forums are not very forgiving when it comes to other peoples ideas. But I am open to any suggestions and advice. If you think a different program would work better I am game. I can show you schematics when I get home.

What is the construction supposed to do when it is running? Sending current through 4 electromagnet coils is completely different from runing a stepper, and much easier.

Railroader:
What is the construction supposed to do when it is running? Sending current through 4 electromagnet coils is completely different from runing a stepper, and much easier.

I suspect this is an attempt at a "free energy" device.

@aarg
Yes, maybe. Nothing for Forum helpers to spend their time on. "The principle of energy" is well known for every engineer.

chevron694:
Plus, I want a 4 phase system. In traditional 3 phase inverters they are high power and Im really only looking for 5-12 volts maybe an amp maybe 2. The ability to control the frequency hence the want to control it with a pot and spin.

That probably makes sense to you because you have a whole lot of other info about your project in your head. But it is meaningless to me. Like I said, you need to provide full details so we know as much as you do.

I can change the title if you like.

It's not the Title that's the real problem, its the content - or lack of it.

...R

aarg:
I suspect this is an attempt at a “free energy” device.

LOL No, I am not one of those. There is no such thing as “Free Energy”. If I wanted that I would go to a different forum. What makes you think that?

Robin2:
It’s not the Title that’s the real problem, its the content - or lack of it.

Again

chevron694:
I held back because I have found that most people on forums are not very forgiving when it comes to other people’s ideas.

So here are the schematics. Yea, I mean I can make the Mosfet Driver not that complicated. I’d use 8 IRFP250 not the 1000 MicroFarad maybe just a 10 MicoFarad decoupling cap. I just didn’t want to have to make it if I didn’t have too and I figured since it was so low power.

speed-control.jpg

What is it You want to create in the final end? What will this proj really do?

Also, What is Karma that is by my username mean?

It is like a score affected by people reading and evaluating Your actions.

Looked at #6 and #11?

@chevron694, don't distract the conversation with questions about Karma. Just answer the question in Reply #11 (which is the same as the questions in Reply #9 and Reply #4)

...R

Well as you can see I have only have made like 21 posts before now. It took me a moment but you mean the post number. Right? As for Karma I legit never seen that before.

As for what I am doing I am trying to make a low power 4 phase inverter powering four solenoids. Why, not? Experiment play around play with compass, iron filling. Whatever havent any of you experimented or played around with electronics?

So any advice would be helpful if not Ill wait.

Guys.
Try stay on topic.
Got better things to do here.

chevron694:
So any advice would be helpful if not Ill wait.

Advice is waiting on a response to requests for actual schematics.

aarg:
Advice is waiting on a response to requests for actual schematics.

I put the schematics in reply #10. My set up is in the file named project_1. The second schematics "speed_control" is a modified version of a traditional 3 phase inverter driver which I can make if the ULN2003 isnt a suitable alternative.

Please display your image(s) in your post so we can see it(them) without downloading it(them). See this Simple Image Posting Guide

chevron694:
As for what I am doing I am trying to make a low power 4 phase inverter powering four solenoids. Why, not? Experiment play around play with compass, iron filling. Whatever havent any of you experimented or played around with electronics?

That's about as useful as a chef in a kitchen telling us he plans to cook something.

...R