I am running a straightforward sketch with analogWrite(3,10) under the loop section. I have used two computers, my PC and my Surface Pro. The PC works perfectly fine, and the stepper motor can run at the correct speed. When I use my Surface Pro, it is able to upload the sketch, but will not run the motor properly. In other words, it acts as if the Arduino isn't even connected to the digital Pwm 3 port. I know it is able to upload because when I plug the Arduino back to my PC, it runs at the speed that my Surface Pro was coded to run, and it changes speeds once I upload a new sketch on my PC. It also just has analogWrite(3,100), this time the value being 100 instead of 10.
I have reinstalled, changed COM ports, changed USB ports on my computer, used Arduino software from the Microsoft store but still no luck. Does anyone know a possible solution?
So the sketch uploads fine from both PC and Surface, but when connected to (powered by) the Surface the sketch becomes sketchy? Sounds like your Surface struggles to power the Arduino.
Hi,
What model Surface Pro?
Have you checked what its USB port is rated at?
Pro 7 is 1A. I understand later models are higher but not suitable to run steppers from.
Can you please post link to your stepper.
PLEASE post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
I have a surface pro 7, but I used someone else's gaming laptop and it also did not work (maybe the same thing, but using an external power supply also did not work).
I am sending an analog output between 0-100 to control the speed. I also used multiple 9v 5a power supplies to power the Arduino, but it still did not work. It actually worked better with a 9v 1.5a power supply. This was done while being plugged into my computer, and while not being plugged into my computer.
The system works, it just does not work with laptops... from the 2 that I have tried. This was how my professor told me to run it
It uploads with a message, but I can run the sketch only using another PC, not even with an external power supply. I know it is using the sketch from my laptop because I am then able to upload a new sketch (going from analogWrite(3,20) to analogWrite(3,100), and it runs significantly faster.
Just step back, take a deep breath, and work through the issue logically.
Break down the problem… forget your program for a moment…
Can you upload and run a simple LED sketch from your Surfcace?
Can you upload and run a basic stepper test ?
show us your wiring and a clear schematic of what you believe is your project.
if those work, and the ratings are sufficient, then you can step into,the final project.
We’re here to help,provided you listen and respond when asked.
Don’t jump ahead because you ‘think’ units all good. We have to stay in sync with what you’re trying.
Personally, I think it’s a stepper power/ground issue
Hi,
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Your pump can draw up to 1A so you need to use a decent power supply.
Can you please post some pictures of your project?
So we can see your component layout.
I've used different Arduinos, but it can power an LED without an external power supply. The stepper motor and driver are being powered separately by a 24v power supply. The driver takes a PWM input to control the speed of the motor. It ranges from 0-100, 100 being the max speed. When using my surface, it is unable to run the motor. I redirected the output of the Arduino into A0 and used Serial to see the output. I don't think this did much, but I was getting 1023 on both my PC and Surface separated by 14 0s.
It isn't really a circuit. All i have to do is send a PWM input to the stepper driver, which I linked in my previous message. If you see the pdf, you can look at the circuit of the stepper driver, and see how it can be run using analog input, or step input. The motor/driver are powered separately using a 24v power supply. The Arduino is only being used to send a PWM signal to the driver, it isn't powering anything else