Notifications
Clear all

Arduino with Stepper and LiquidCrystal Issue

308 Posts
5 Users
12 Likes
22.5 K Views
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @voltage

I didn't test the last version but I did the two on the one post above. When the RPM comes down from 15, after you go past 10, the 9 shows up as a 90 and the counts down from 90, 89, 87, etc

That's because you need to write blanks over the area to clear out the last result. You'll see me writing blanks over the speed area in my old code.

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

Maybe it's worth moving all of the LCD display commands into a subroutine. That way it'll be easy to update from anywhere and the data will always be placed in the same area.

That wouldn't solve the problem. The interrupt could happen anywhere. That's why I just put all the randomly updating values on the second line in the last iteration and ended the interrupt with the cursor beginning on the second line. If it happens to be on the wrong value to write, it should write over it in the next loop.


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

@madmisha

You'll need to use blanks overwrite any datum which may change to a shorter length (like speeds) since @voltage is already observing some field contamination.

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


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

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

I'm not sure why you're displaying anything but the RPM  as speed. I doubt if @Voltage would be interested in that since I believe he's only concerned about RPM.

Only because that's what the original had. If we verify that the RPMs are working out correctly, that can always change to a diameter reading.

OK, I see.

How/where will the diameter be read in ?

I just need the final calculated RPM's of the final drive shaft which has either a platter or a lathe chuck mounted. The way I get set up is by using a piece of masking tape that I draw 1/8" increments on it and tape it to the circumference of the part. Then I hold my torch tip over the tape and run the unit while counting seconds (1,001, 1,002, 1,003) and set the speed to about 1/8" per second. Then once the part is welded and the timing is good I can note that a 3" diameter pipe has a good starting point of "x" rpm's.

 

Thanks,
Voltage


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

 @will The diameter you be in place of the speed, if that was not needed. That way it would show Diameter and RPM. But RPM matters and changes based on the diameter of the part. So the it would be a calculation of the current RPM and what size of part would be needed for that RPM. So if you adjusted it to the size of the part, it would be spinning at the correct speed. Did that make sense at all?

So what we're really trying to do is come up with a chuck's rotational speed which results in a fixed speed for a point on the circumference of the work piece ?

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

So what we're really trying to do is come up with a chuck's rotational speed which results in a fixed speed for a point on the circumference of the work piece ?

Exactly! It will take some fooling around but I bet it can be done.


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

@madmisha @voltage

So, shall we switch over to using the pot to enter the diameter and then calculate the RPMs needed to produce a rotation of 1/8" per second on the surface ?

That should be pretty easy to do.

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
Posted by: @will

So what we're really trying to do is come up with a chuck's rotational speed which results in a fixed speed for a point on the circumference of the work piece ?

Exactly! It will take some fooling around but I bet it can be done.

Correct. It's still up to the end user welding to figure out and fine tune things for it to work. Small diameter and large diameter at the same exact rpm are way different. Like watching a 33 1/3 record spin on a turntable, the outer edge is going faster. Anyway, on the last update the LCD has gone goofy. Maybe too much info. Speed: XXX RPMS is all I need on one line. That is what I had and always worked before. 😀 Here are some pics of the LCD freaking out and I can make it happen with successive STOP(Direction Change) button presses.

image 2
image 3
image 1
image 5
image 4
image 6
image 7
image 9
image 8
image 12
image 10
image 11
image 13
image 14
image 15

Thanks,
Voltage


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

@madmisha @voltage

So, shall we switch over to using the pot to enter the diameter and then calculate the RPMs needed to produce a rotation of 1/8" per second on the surface ?

That should be pretty easy to do.

I guess we could try and see how it works but in welding there are a lot of different things going on. If you weld aluminum for example it will be different than welding steel but maybe that will work. Lets try and see what happens. 😎 

 

Thanks,
Voltage


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

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

@madmisha @voltage

So, shall we switch over to using the pot to enter the diameter and then calculate the RPMs needed to produce a rotation of 1/8" per second on the surface ?

That should be pretty easy to do.

I guess we could try and see how it works but in welding there are a lot of different things going on. If you weld aluminum for example it will be different than welding steel but maybe that will work. Lets try and see what happens. 😎 

You'll still be able to vary the speed by changing the diameter up or down to speed up or slow down the rotation speed.

MadMisha, do you think there's enough time savings in using interrupts, or could this revert to if statements in the loop ?

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

MadMisha, do you think there's enough time savings in using interrupts, or could this revert to if statements in the loop ?

As long as you use stepper.runSpeed() any time you get the chance, it should be ok. But not having to check buttons all the time is usually better. Or possible missing them can be a pain too.


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

I have to go tour a construction site. I will be back later to catch up. Feel free to mess around with the code all you want.


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

Thanks,
Voltage


   
ReplyQuote
Page 8 / 21