collapse

Author Topic: Faceting machine head assembly.  (Read 21789 times)

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 573
Re: Faceting machine head assembly.
« Reply #165 on: November 03, 2024, 10:13:45 AM »
Thanks for the offer of working on the code RC, but I need to create the code for this part myself. Reason being I will understand how it works and adjust it if needed.
Rachel De Barros has a good vid on how to multitask with the millis function, so I can see how to run the print area of the loop at it’s own millis speed.  Have also come up with an additional idea on smoothing the encoder reading with the variable speed dial on the motor. This is to print the last digit in the encoder reading on the screen, after the 150ms print delay, print the last digit next to the first. Then constantly repeat that, if there is much flutter in the lap those numbers will constantly change. In theory altering the motor speed should find the sweet spot that evens them up. Have a spare button wired in, so can turn it off if it’s annoying.

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 573
Re: Faceting machine head assembly.
« Reply #166 on: November 06, 2024, 08:37:43 PM »
  As I said before I was going to get a light to come on just before the target angle light. Got that working ok.
That’s going to be it for me and not bother with the averaging, can’t leave this programming stuff for long before you begin to forget.

MakkyBrown

  • Administrator
  • ALF'er VIP
  • *****
  • Posts: 1809
    • Andrew Brown Faceting Designs
Re: Faceting machine head assembly.
« Reply #167 on: November 06, 2024, 09:32:01 PM »
Your not wrong there Frank, I have reinvented the wheel a number of times.  ::) Like updating my webpage after each book, I really should take more notes.MB

RoughCreations

  • Administrator
  • ALF'er Platinum
  • *****
  • Posts: 397
    • Rough Creations homepage
Re: Faceting machine head assembly.
« Reply #168 on: November 07, 2024, 08:32:22 AM »
  As I said before I was going to get a light to come on just before the target angle light. Got that working ok.
That’s going to be it for me and not bother with the averaging, can’t leave this programming stuff for long before you begin to forget.
Too right. Be sure to put lots of comments in your code for exactly this reason...
Rough Creations - Beauty from rough beginnings

Faceting Frank

  • Global Moderator
  • ALF'er VIP
  • *****
  • Posts: 573
Re: Faceting machine head assembly.
« Reply #169 on: November 07, 2024, 02:22:34 PM »
Now it’s up and running I keep a record of any added bits of code. As below to turn the green light on 0.04deg before the target angle is reached. I think this eliminates the need for averaging because I will use this the same way I used to use the dial gauge. Which was to stop moving the quill from side to side just as the needle reached the stop point.

Green light code
47 float pretarget = -0.04;   // 0.04 deg before target angle
48 float pretargetangle;         // variable to be equal to anglestop variable

Start of loop

146 if (pretargetangle < eStoredAngle); {   // turn light on if true
147 digitalWrite (GREED_pin,HIGH);
}

174 pretargetangle = anglestop + pretarget;      // setting value of pretargetangle

178 lcd.setCursor (0,2);
179 lcd.print (“pre-A “);
180 lcd.print (pretargetangle);

 

Recent Activities

Mount Eliza quarry Mornington Peninsula by RufusD
[January 15, 2025, 10:29:11 PM]


Pendant findings by MakkyBrown
[January 12, 2025, 01:38:49 PM]


Tumbled and polished Chinchilla petrified wood by MakkyBrown
[January 12, 2025, 01:36:23 PM]


Tolmie / toombullup by Jpollard
[January 10, 2025, 08:54:12 PM]


Magnetic Encoders by RoughCreations
[January 09, 2025, 04:20:23 PM]


Use of a submersible pump by Bucket
[January 07, 2025, 08:52:47 PM]


Amazed by Chinese Crystal Carving Artistry by Lori
[January 05, 2025, 04:08:54 PM]


Cat's Eye Facet Design by MakkyBrown
[January 03, 2025, 11:06:10 PM]


Merry Christmas and a Happy New Year by Azard_faza
[December 24, 2024, 09:15:50 PM]


Faceting machine encoder by RoughCreations
[December 23, 2024, 09:19:13 AM]


Rockhounding at Coal Cliff beach NSW by Rusted
[December 19, 2024, 03:56:03 PM]


Tumbling already naturally tumbled rocks/ quartz by Rock gal
[December 19, 2024, 12:34:10 AM]


Montana Sapphire by Azard_faza
[December 18, 2024, 05:53:52 PM]


Good vs Bad cutting by mehoose
[December 15, 2024, 01:50:33 PM]


Black Opal? by mehoose
[December 14, 2024, 06:54:08 PM]

SimplePortal 2.3.7 © 2008-2025, SimplePortal