Notifications
Clear all

Arduino with Stepper and LiquidCrystal Issue

308 Posts
5 Users
12 Likes
24.2 K Views
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

@voltage @will

Ok, one last stab at it. I was looking through the datasheet and I noticed that the PUL and DIR are showing 3.5V on the chart showing the expected pulses on the control. Uno is 5V. But on the section labeled P1 configuration, it mentions 4-5V. I can't think of why that would be different right now.

It also mentions that it should be no less than 2.5μs pulse width.

 

Also, there is a red LED on the driver. Does it light up at all?

 

Today was my first day back at work in over a year and a half. I don't have the energy today. I just thought I would drop that here so it could be looked into.

 

I have work tomorrow until mid afternoon but after that I might hook up an Uno and a scope and try out all these examples as well as some debugging from serial. It might give some insight as to what is going on.

 

Turning switch 4 on the driver might be a good experiment as well. Don't keep it there but try it on the sketches. It is possible that the Uno is too slow.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@madmisha

Take it easy, I hope you're feeling better tomorrow.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

Try this in setup at at least 2.5. 3 Might work too.

◆ setMinPulseWidth()

void AccelStepper::setMinPulseWidth ( unsigned int  minWidth )  

Sets the minimum pulse width allowed by the stepper driver. The minimum practical pulse width is approximately 20 microseconds. Times less than 20 microseconds will usually result in 20 microseconds or so.

Parameters
[in] minWidth The minimum pulse width in microseconds.

   
ReplyQuote
(@voltage)
Member
Joined: 3 years ago
Posts: 187
Topic starter  

@madmisha

Already put things up but read your posts and will test some more tomorrow. Thanks for all of your effort in this. 😀 

The red light is lit on the driver once power is turned on.

 

Link to my stepper motor:

https://tinyurl.com/3rxp3z7m

Thanks,
Voltage


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

I also think you might need to hook it up differently.

image

I was debating if I should even raise this, but this might be the issue.

The datasheet is a little unclear. It mentions using differential signaling. It might not matter since it would average out.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

   
Voltage reacted
ReplyQuote
(@voltage)
Member
Joined: 3 years ago
Posts: 187
Topic starter  

Thanks,
Voltage


   
ReplyQuote
(@voltage)
Member
Joined: 3 years ago
Posts: 187
Topic starter  

Thanks,
Voltage


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 

@madmisha

Yay something finally worked - well done.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 
Posted by: @will

I would suggest printing Left and Right on the PCB's row 1 so it can remain being displayed but won't interfere with the Speed display.

I thought that speed and RPM in the original was all on the first row. That's why I put the direction on the second row. This one should be on different rows.


   
ReplyQuote
(@voltage)
Member
Joined: 3 years ago
Posts: 187
Topic starter  

Thanks,
Voltage


   
ReplyQuote
MadMisha
(@madmisha)
Member
Joined: 4 years ago
Posts: 340
 

   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2531
 
Posted by: @madmisha
Posted by: @will

I would suggest printing Left and Right on the PCB's row 1 so it can remain being displayed but won't interfere with the Speed display.

I thought that speed and RPM in the original was all on the first row. That's why I put the direction on the second row. This one should be on different rows.

My bad, I missed that part because I was expecting them to appear in the relevant subs.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Page 6 / 21