By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Adding a microswitch to Carl Wilson's Arduino Controlled Indexer - MEW249 refers

All Topics | Latest Posts

Search for:  in Thread Title in  
Greensands30/06/2022 19:30:58
449 forum posts
72 photos

I have made up the Carl Wilson's Arduino controlled indexer as described in MEW249 and have been using it for machining Hex bar stock on my 3-axis stepper motor controlled milling machine. So far, so good but I would like to be able to fit a microswitch on the X axis of the mill in order to auto advance the Arduino by the required 60 degrees in place of (or in parallel with) manual activation of the On-Off-On Mom switch provided by Carl. .Can anyone suggest how this might be done as early tests have not proved to be successful.

Huub30/06/2022 22:53:57
220 forum posts
20 photos

I am not familiar with the Carl Wilson's Arduino controlled indexer!

You could use UGS, a gcode sender that has user defined buttons. The button can be linked to a line of gcode that could rotate the table 60°. UGS is compatible to a lot of grbl versions.

I control my rotary table using an ESP32 controller running grbl_ESP32_R (or grbl_ESP32). These grbl versions can send a command as a respond to a switch being pressed. The command could be a gcode that instructs the table to rotate 60°.

John Haine01/07/2022 11:33:32
5563 forum posts
322 photos

If you have a stepper power feed on the x axis as well, then GRBL can move the x axis back and forth and drive the divider too, controlled with a few lines of gcode from UGS.

SillyOldDuffer02/07/2022 13:16:04
10668 forum posts
2415 photos

Maybe, but I can't find my copy of MEW249. Is Carl's code and wiring available on the web?

Carl does the change manually with an on/off/on momentary switch. I don't know of an off-the-shelf switch that does that but they're quite likely to exist if you know where to look!

Might be easier to make a wiper switch to fit on the lathe. I think it's easier to do off/on/off and have the Arduino invert the logic.

A contact mounted on the saddle, which is earthed, passes over an insulated contact held at 5V via a resistor, causing a pin the Arduino to register logic 1,0,1:

wiperswitch.jpg

Main problem is likely to be debouncing and cleaning up the signal presented to the Arduino. Unfortunately, good earths by sparky electrician standards are often a heap of filth in telecommunications! Trouble is microcontrollers are switched by low voltages and react in microseconds. They easily detect that most mechanical switches don't make or break cleanly and bounce many times over tens of milliseconds. They also react to any other low level electrical noise present.

Step one is to try the circuit without a debounce capacitor. If operation is unreliable, try adding a capacitor between 0.01 and 0.1 microfarads. It may be necessary to experiment. With luck the capacitor stores enough charge to fill short negative spikes so the Arduino never sees them, and also decouples any AC on the line to ground, but it's a mild bodge. More elaborate filtering and debouncing may be necessary.

Mucky signals are the bane of microcontrollers. Might even be the reason why what's already been tried isn't working.

Dave

Edited By SillyOldDuffer on 02/07/2022 13:16:26

John Haine02/07/2022 13:24:54
5563 forum posts
322 photos

easybutton.h is your friend...

Robert Atkinson 202/07/2022 15:22:58
avatar
1891 forum posts
37 photos

You should be able to just put a push putton or microswitch in parallel with the relevant side of the existing on-off-on toggle switch.
What problem do you have?

If it's random operation try using screened cable to connect the switch.

Robert G8RPI.

Greensands02/07/2022 15:50:12
449 forum posts
72 photos

Have now been able to get the microswitch circuit working as required, Not sure what the original problem was as all that was required is to wire the microswitch across the On-Off-On Mom switch and bring it out to the front panel via a 3.5mm jack plug as seen in the photo. Net result is that the RT is now activated through 60 degrees at the end of each pass along the X-Dirn to complete the Hex cut

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Sign up to our Newsletter

Sign up to our newsletter and get a free digital issue.

You can unsubscribe at anytime. View our privacy policy at www.mortons.co.uk/privacy

Latest Forum Posts
Support Our Partners
cowells
Sarik
MERIDIENNE EXHIBITIONS LTD
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest

 

Donate

donate