Notifications
Clear all

Arduino with Stepper and LiquidCrystal Issue

308 Posts
5 Users
12 Likes
24.1 K Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 

@voltage

We'll address the display problems later (when we have the new values to display). Just modify the last version that operates the stepper correctly. It's the part that's always giving us the problem.

After you've made these changes, please put up the version you're using so we can make sure we're both looking at the same code 🙂

If you don't feel comfortable editing the code directly, please let me know and I'll put up the modifuied code so all you have to do is copy and paste.

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


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

Ok, to be honest, do you really need RPM? I would say display the mapped number from the pot. Then do the math to what diameter that would be right for. The mapped pot number would be the ultimate control. Does it really need to match anything other than a reference to a speed that works? And if it goes up or down even 1 it will be accurate.

 

That way you could dial it in close to the size but you still have an accurate reference.

I am used to the RPM reading and on the original code it was easy math without a gear head in the original plans. A 3:1 ratio with the sprockets and adjust a few numbers to match the reading on the LCD. Now it would just be another adjustment to the equation to 7.25:1 and adjust the max speed to match either 12 or maybe 15 RPM's at the driveshaft the spindle in on for the chuck.

 

Thanks,
Voltage


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

Thanks,
Voltage


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

There is an f,g,h.i,j sketch after this (meaning 5 that were posted after this one) but this one had a more reliable display that goes up to 1000. But when you get below 2000 while slowing the speed, the display reads 5000 for some reason.

Thanks,
Voltage


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

Thanks,
Voltage


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

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


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

Thanks,
Voltage


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

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


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

Thanks,
Voltage


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

Will, I fixed the display issue. I remembered when I first connected the display it just lit up but no text could be seen. There is a blue potentiometer on the circuit board that I read about for the display brightness and dialed it one way about 10 turns then the other way about 15 turns and the display came into view. I went and turned the screw some more and it dial right in. Here is a pic.

Dscf4120[1]

 

Excellent, was that fixed before or after the last version I sent ?

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


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

Will, I fixed the display issue. I remembered when I first connected the display it just lit up but no text could be seen. There is a blue potentiometer on the circuit board that I read about for the display brightness and dialed it one way about 10 turns then the other way about 15 turns and the display came into view. I went and turned the screw some more and it dial right in. Here is a pic.

Dscf4120[1]

 

Excellent, was that fixed before or after the last version I sent ?

Before. On the last version I noticed the 3rd digit on the diameter line if kind of flicker at low low settings. Also, the rpms on the stepper don't match the real rpms that it should turn. Also, I have to think a bit as the math seems off but my brain is getting tired so we may have to take a break until tomorrow or Sunday or Monday. But it looks like a keeper!

 

Thanks,
Voltage


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

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


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

Thanks,
Voltage


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

@voltage @madmisha

To help illustrate the calculations I use for converting diameter into RPM, let's use an example with stock diameter 5".

5" diameter gives a circumference of 5 x pi = 15.71 inches (close)

15.71 inches has 15.71 x 8 eight'ths of an inch = 

so there are 125.68 eights of an inch along the circumference of the bar

but the circumference equal 5100 steps (3 x 4.25 x 400)

5100 steps = 125.68 eight'ths of an inch

1 eight'th/second = 5100/125.68 = 40.58 steps/second

40.58 steps/second x 60 seconds per minute = 2434.8 steps/minute

then 2434.8 steps/min / 5100 steps/rev = 0.477 RPM

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


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 
Posted by: @voltage

Sounds good. I need to clean up before the wife comes in from work as I have her kitchen counters full of my projects and more! I will test this before I pull the plug but using the second to the last version (before the LCD update after I fixed it), if I set the DIA:0.50 the RPM 4.76 and count the actual output it is pretty darn close at 4.5 RPM's realtime at the gear head. But we have to remember the 3:1 on the sprockets and chain.

 

On compile I get an error:

stray '\302' in program

 

edit: Fixed it. It is from cut/past error of some sort.

Rats !

The 5100 steps per revolution was derived as 3 x 4.25 x 400, so the chain gearing should have already been accounted for in the calculations.

Oh well, there's always tomorrow 🙂

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


   
ReplyQuote
Page 10 / 21