Notifications
Clear all

Arduino with Stepper and LiquidCrystal Issue

308 Posts
5 Users
12 Likes
22.5 K Views
(@voltage)
Member
Joined: 3 years ago
Posts: 187
Topic starter  

Thanks,
Voltage


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

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: 2504
 

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

Ok, the flicker is still there but mainly in the last digit on each line whether running CW or CCW. But if the pot is moved towards the small diameter and fastest RPM the display looks great without any flicker. Like in the example below the 5 would flicker:

1.25

If you look at the code, just after the intro comments, you'll see a line 

#define POTDELAY 40

You can try changing the 40 . Increasing the value will make the LCD lag the pot movement more but should reduce the flicker. Decreasing the value will make the LCD more responsive to pot changes but will increase flicker.

Try a few different values to find the most comfortable all round accommodation between flicker and responsiveness.

I can also reduce the flicker by increasing the amount that the pot values have to vary before it's reflected on the LCD, but that would increase the "graininess" in the pot and you're already noticing that you can't return all the way to the top or bottom of the range.

And please let me know if you find any other anomalies or problems or features.

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

Ok, the flicker is still there but mainly in the last digit on each line whether running CW or CCW. But if the pot is moved towards the small diameter and fastest RPM the display looks great without any flicker. Like in the example below the 5 would flicker:

1.25

If you look at the code, just after the intro comments, you'll see a line 

#define POTDELAY 40

You can try changing the 40 . Increasing the value will make the LCD lag the pot movement more but should reduce the flicker. Decreasing the value will make the LCD more responsive to pot changes but will increase flicker.

Try a few different values to find the most comfortable all round accommodation between flicker and responsiveness.

I can also reduce the flicker by increasing the amount that the pot values have to vary before it's reflected on the LCD, but that would increase the "graininess" in the pot and you're already noticing that you can't return all the way to the top or bottom of the range.

And please let me know if you find any other anomalies or problems or features.

I played around with that setting and even at 1000 it had some flicker mainly on the last 2 digits in the top row. Could be the LCD itself? How high can I go with that setting? I didn't notice any lag with the response even at 1000.

edit: It works fine from 0.50 - 12.0 without loosing any steps in the display as far as grainy.

 

Thanks,
Voltage


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

I played around with that setting and even at 1000 it had some flicker mainly on the last 2 digits in the top row. Could be the LCD itself? How high can I go with that setting? I didn't notice any lag with the response even at 1000.

 

WOW ! It's still flickering at 1 update per second  !!! ? Lemme check the code.

Found another typo ...

in the sub recalcSpeed at the very end, find the line 

last_pot - millis(); // Start elapsed time again

And change that minus sign to an equals sign.

last_pot = millis();

 

Bad programmer - NO BISCUIT FOR YOU.

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

I played around with that setting and even at 1000 it had some flicker mainly on the last 2 digits in the top row. Could be the LCD itself? How high can I go with that setting? I didn't notice any lag with the response even at 1000.

 

WOW ! It's still flickering at 1 update per second  !!! ? Lemme check the code.

Found another typo ...

in the sub recalcSpeed at the very end, find the line 

last_pot - millis(); // Start elapsed time again

And change that minus sign to an equals sign.

last_pot = millis();

 

Bad programmer - NO BISCUIT FOR YOU.

Ok, that is much better. I tested it and had a little flicker and changed the delay to 100 and now the only flicker I get is minimal at the larger diameter settings, none at low. So the last digit in the DIA: is the "only digit" that flickers. Like in the example below the 6 would flicker:

DIA: 8.56

 

But the delay between the flicker is readable where it goes from 5 to 6 for example whereas before it was a blur as it was switching back and forth really fast.

 

Thanks,
Voltage


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

Ok, that is much better. I tested it and had a little flicker and changed the delay to 100 and now the only flicker I get is minimal at the larger diameter settings, none at low. So the last digit in the DIA: is the "only digit" that flickers. Like in the example below the 6 would flicker:

DIA: 8.56

 But the delay between the flicker is readable where it goes from 5 to 6 for example.

I think that's about the best we can do with what we have, as long as you're happy with the resulting sluggishness of the pot.

Is your pot anchored to anything solid or does it just lie on the counter surrounded by cables ? If a pot is being physically moved it will often change values.

About the only other way to slow down the pot readings would be to introduce a larger gap between measurements. So, changing diameter from 2 decimals to a single decimal (i.e. instead of 5.0,5.01,5.02,...5.09.5.1, the pot would move 5.0, 5.1). That would reduce the rate at which the LCD needs to be updated but it would mean that you couldn't make small adjustments to the rotational speed to fine tune the speed for different welding techniques or materials.

Everything electronic is a trade-off 🙂 

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

Ok, that is much better. I tested it and had a little flicker and changed the delay to 100 and now the only flicker I get is minimal at the larger diameter settings, none at low. So the last digit in the DIA: is the "only digit" that flickers. Like in the example below the 6 would flicker:

DIA: 8.56

 But the delay between the flicker is readable where it goes from 5 to 6 for example.

I think that's about the best we can do with what we have, as long as you're happy with the resulting sluggishness of the pot.

Is your pot anchored to anything solid or does it just lie on the counter surrounded by cables ? If a pot is being physically moved it will often change values.

About the only other way to slow down the pot readings would be to introduce a larger gap between measurements. So, changing diameter from 2 decimals to a single decimal (i.e. instead of 5.0,5.01,5.02,...5.09.5.1, the pot would move 5.0, 5.1). That would reduce the rate at which the LCD needs to be updated but it would mean that you couldn't make small adjustments to the rotational speed to fine tune the speed for different welding techniques or materials.

Everything electronic is a trade-off 🙂 

I think its good where it is for now. I have zero sluggishness in the speed change in the pot. Just on digit with a minimal readable flicker only at 6" and above diameter settings where I normally don't use in real life anyhow. You could explain how to change the resolution on the decimals from 3.10 to 3.1 and I can add a remark near where it could be changed for possible later testing/use. But other than that it looks really good. Thank you. 🙂 Now you get a biscuit. 😋 The pot is just hanging there with wires for now.

 

Thanks,
Voltage


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

I think its good where it is for now. I have zero sluggishness in the speed change in the pot. Just on digit with a minimal readable flicker only at 6" and above diameter settings where I normally don't use in real life anyhow. You could explain how to change the resolution on the decimals from 3.10 to 3.1 and I can add a remark near where it could be changed for possible later testing/use. But other than that it looks really good. Thank you. 🙂 Now you get a biscuit. 😋 The pot is just hanging there with wires for now.

Switching to a single decimal in the diameter range would involve testing the observed pot reading and deciding which decile it resides in. It's not exactly just changing one line, so I'm not sure you'd want to experiment with that unless you're comfortable with programming. If you want, I can make another version of this sketch with a coarser range. I have company coming and I'll be busy for the afternoon, so it may tomorrow or Wednesday before I get it done.

If you can hot glue the back of the pot to a piece of cardboard, out it facing handle-up and put something very heavy on the cardboard to hold it in place, you should find that it helps reduce the jitter.

Let me know if you find anything unusual while you're testing 🙂

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

I think its good where it is for now. I have zero sluggishness in the speed change in the pot. Just on digit with a minimal readable flicker only at 6" and above diameter settings where I normally don't use in real life anyhow. You could explain how to change the resolution on the decimals from 3.10 to 3.1 and I can add a remark near where it could be changed for possible later testing/use. But other than that it looks really good. Thank you. 🙂 Now you get a biscuit. 😋 The pot is just hanging there with wires for now.

Switching to a single decimal in the diameter range would involve testing the observed pot reading and deciding which decile it resides in. It's not exactly just changing one line, so I'm not sure you'd want to experiment with that unless you're comfortable with programming. If you want, I can make another version of this sketch with a coarser range. I have company coming and I'll be busy for the afternoon, so it may tomorrow or Wednesday before I get it done.

If you can hot glue the back of the pot to a piece of cardboard, out it facing handle-up and put something very heavy on the cardboard to hold it in place, you should find that it helps reduce the jitter.

Let me know if you find anything unusual while you're testing 🙂

Ok great. Sounds like a plan. I really appreciate all the effort and time you spent on this and mainly that you didn't give up. Lets take the rest of the day off and I will check in to see if I need to answer any questions etc. The other version with the coarser option is not necessary but I will be glad to try it out when it's ready. Have fun with your company and enjoy the rest of the day.

Thanks again!

 

Thanks,
Voltage


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

@voltage

OK, enjoy your day off too 🙂

It took a while to get it going, but whaddaya expect from a cave man 🙂

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


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

Thanks,
Voltage


   
ReplyQuote
Page 18 / 21