By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Allendale Jan 24th

Arduino/Stepper Motor Dividing Head

Source Code Repository Required

All Topics | Latest Posts

Search for:  in Thread Title in  
Brian Oldford01/06/2020 16:47:19
avatar
652 forum posts
15 photos

A number of years ago there was a design publish (perhaps elsewhere) for a stepper motor driven dividing head driven by an Arduino fitted with a Sainsmart LCD Keypad Shield.
Can anyone point me to the repository for the source code please.
Many thanks in advance.

Emgee01/06/2020 17:36:16
1486 forum posts
217 photos

Brian

Plenty of info at this link to HMEM **LINK**

You may have to register to view but worth being a member there anyway.

Emgee

SillyOldDuffer01/06/2020 18:06:41
5772 forum posts
1230 photos

There's a copy of Gary Liming's code in my dropbox folder here.

Also, for those who don't care for nested menus made necessary by the LCD KeyPad Shield, there's my alternative. It uses a 4x4 matrix keyboard allowing numbers to be typed in directly

dsc04384.jpg

A for Angle, B for Bump (aka Jog), C for Continuous, D for Division, # enter/leave number mode, * start/stop, 0 set direction, 1 rewind, 5 Suspend, 9 set ratio to suit different rotary tables. Number mode allows Ratio, Continual, Division Step, Bump or Angle to be changed.

Blurb here, software here. Intended as to be a magazine article but I decided too many similar had been done already. The blurb is a bit ragged, but a few have been built if you prefer the 4x4 approach to nested menus.

Dave

Brian Oldford01/06/2020 19:20:17
avatar
652 forum posts
15 photos

Many thanks.
Now I have the confusing task of deciding between the two, laugh

Edited By Brian Oldford on 01/06/2020 19:20:31

Bazyle02/06/2020 00:02:14
avatar
5215 forum posts
201 photos

I keep seeing these projects using displays and keyboards. I think it would be more in keeping with our type of machines to have simple switches rather than peering at little screens. I envisage say 3 ten way rotary switches (implemented by putting a ten way clickstop on a potentiometer) which could give say divisions 0 to 299, then use the positions above 300 to implement something else, like 0-90 degrees, then above that to say make the driver reusable for another machine, like providing stepper feed rates on a mill x-axis.
A much simpler user interface that shows you just where you are set from across the room.

Yeah, I know, put your money etc. I have a Micromite on order following its mention on an other thread so might try this out on it.

Paul Lousick02/06/2020 02:30:37
1409 forum posts
540 photos

There are bigger displays available and I can read my DRO screen from across the room.

Paul.

DC31k02/06/2020 07:12:06
200 forum posts
Posted by Bazyle on 02/06/2020 00:02:14:

...I think it would be more in keeping with our type of machines to have simple switches rather than peering at little screens.

The issue with alternative user interfaces is the number on inputs required on the microcontroller. Three potentiometers as you suggest need three analogue inputs.

You could use a 0-9 thumbwheel switch (like on the electronic hobber) but each one needs four digital inputs (so 12 total for 0-999).

You could use a manual pulse generator (rotary encoder) with a click-to-select (three inputs). That would be great for later use as a jogging or continuous rotation device and most closely approximates a traditional handwheel on a rotary table. You could electronically build in the table stops so you cannot go past a set angle, good for putting a radius on the end of a part.

The 4 x 4 matrix keyboard works well with the resources of the chosen chip and its ubiquity means the component is very cheap. You could buy three or four spares for the cost of some of the other ideas.

As a challenge, perhaps build one with (binary) knife switches and Nixie tubes.

Joseph Noci 102/06/2020 07:46:17
671 forum posts
890 photos

I made a few using a NUCLEO processor board - an STM processor based device, with an Arduino look-alike interface.

This one does a bit more than just a dividing head - among other things, it does gear hobbing as well, on a mill, for example, by fitting a rotary encoder driven by the spindle.

Anyway, the MMI is quite nice to use, the display clear, and does not use much I/O.

Joe

complete unit.jpg

anti-clock.jpg

division.jpg

hobbing.jpg

SillyOldDuffer02/06/2020 09:48:32
5772 forum posts
1230 photos

Bazyle makes an important point about user interfaces - they have to suit the user! Unfortunately, in addition to liking the controls, users also worry about cost, and, if its a project, how difficult it is to build. Designing good interfaces is difficult - lots of compromises and judgements.

The Liming's solution is a straightforward Arduino build. Cheap, well supported and plenty of modules. Gary's interface is a plug in display module with a 16x2 LCD and 5 push-buttons. This means his software has to deliver everything needed to control a rotary table with just 5 buttons. It's done with a system of nested menus, where pressing buttons navigates a tree of options until the required setting is found. The problem with this type of interface is it's not very intuitive, it's hard to remember, changing settings takes a relatively long time, and, by accidentally pressing the wrong button it's possible to get lost in the menu.

As John Stevenson mentioned he didn't like nested menus, I developed a rotary controller using a 4x4 keypad and a separate 16x2 LCD only module. The 4x4 keypad provides 16 buttons. Now the user can type in numbers 45.55°, and the keypad is conveniently labelled 'A' for Angle etc. The '*' button is go/stop. Most of the nesting is eliminated, the controls are easier to learn and remember, and it's possible to add more functionality, for example my version can be paused if the phone rings, there's a rewind function in case the most recent command moved the table wrongly, and the ability to type numbers allows the user to change to any table ratio, typically 1:40, 1:60, or 1:90. There's no need to label anything, though a laminated reminder list on the back might be handy. Slightly more difficult to build, about the same price as Gary's version, but the user still has to be slightly computer minded!

Joe's controller is the next step. He fixes the nested menu problem with 5 nice push-buttons, a five way switch, a potentiometer and a logical well-labelled front panel. The build cost is relatively high because of the number of components used, plus there's a need for some chassis banging to make the front-panel. Nothing beyond the skills of the chaps reading this forum.

All three approaches work, but I think most people would find Joe's version most intuitive. It's the most difficult and expensive to build, plus a moderate extra software hurdle to jump to get the Nucleo# working. Mine isn't as easy to use as Joe's, but - being simpler - it's cheaper and more straightforward to build. Gary's is easiest to build but the control interface is clunky. Some people can't get on with nested menus at all - they're just too annoying!

My dad came from a world where levers and buttons only did one simple thing and then you talked to a real person. He thought the computer menus I developed in the 1970s were insane. He had a point...

Dave

# Joe got me into Nucleo.  It's similar to the Arduino but considerably faster, much more memory, and extra pins. It can be programmed from the Arduino IDE by installing optional software, but not all the Arduino libraries work.  (Most do.) 

Another issue is it's 3.3V logic, not 5V, and the interface is electrically more delicate - easier to damage if the wiring is cocked up.  Nothing insurmountable, but a bit more to learn and understand.   I tend to use Arduino Nano's for rough simple work, and the Nucleo for anything remotely demanding.   The Arduino family has some high-end Nucleo-like processors, like the M0-Pro, but I've found the Nucleo easier to exploit, more powerful and it's cheaper.   

 

 

Edited By SillyOldDuffer on 02/06/2020 10:00:48

Paul White 302/06/2020 11:48:29
95 forum posts
17 photos

Hello all,

Not wishing to be argumentative but- my approach would be to consider the controller as a part of the project.

Other items- stepper, PSU, stepper controller, belts and gears, are by far the greatest part of the project spend thus

the comparative cost of the eelectronics is secondary.

Go for the most complete answer -Joe's all in one solution. I say.

Best wishes,

Paul

Joseph Noci 102/06/2020 11:58:17
671 forum posts
890 photos

Hah! Was wondering if you were lurking Paul! Nice to see you are about!

If anyone is interested in tackling a version on my setup, I will gladly assist. Paul built a more Hobber oriented version and as he proclaims, 'knows nothing about software, microprocessors, or programming'..

I am very willing to help, provide circuits, diagrams as needed, etc. My good wife is the software fundi, and will gladly help to get you going with the Nucleo - you do not need to know any software language or know how to write software! We will gladly modify the current software to make it do what you want within project bounds and help you get it going. As Paul said, the electronics cost and effort is small compared to the rest - you need to be able to read simple circuit diagrams ( as opposed to electrical diagrams, but those too..) , need to be able to solder basic electronic parts and wires, and be PC 'able'. The rest is common sense! If you do want to learn more about it, the softare, sourcar code, etc we will gladly provide and help where we can.

Joe

Robert Atkinson 202/06/2020 12:48:31
avatar
644 forum posts
16 photos

Part of the UI problem is related to the "Maker" approach to electronics where things are built from ready made modules like Arduinos, stepper drivers and serial LCD and switch modules. This makes it easy but limits variation and customisation. Unfortunatly it does not build understanding of the basic principals or skills. I've seen electronics magazine projects using breakout boards and screw terminals so you don't even have to solder.

The ME version would be making a loco from ready made bogies, boiler. cylinder and valve assemblies from different manufacturers. Better than nothing, but not good.

Robert G8RPI.

duncan webster02/06/2020 12:59:17
avatar
2590 forum posts
33 photos
Posted by Joseph Noci 1 on 02/06/2020 11:58:17:

Hah! Was wondering if you were lurking Paul! Nice to see you are about!

If anyone is interested in tackling a version on my setup, I will gladly assist. Paul built a more Hobber oriented version and as he proclaims, 'knows nothing about software, microprocessors, or programming'..

I am very willing to help, provide circuits, diagrams as needed, etc. My good wife is the software fundi, and will gladly help to get you going with the Nucleo - you do not need to know any software language or know how to write software! We will gladly modify the current software to make it do what you want within project bounds and help you get it going. As Paul said, the electronics cost and effort is small compared to the rest - you need to be able to read simple circuit diagrams ( as opposed to electrical diagrams, but those too..) , need to be able to solder basic electronic parts and wires, and be PC 'able'. The rest is common sense! If you do want to learn more about it, the softare, sourcar code, etc we will gladly provide and help where we can.

Joe

Having built Joe's ELS I can only echo what he says, just make it, program it with the supplied software and it works, no need to understand how. I also made one of SOD's dividing whizzbangs, again it just works. The only difficult bit is the front panel if you don't have CNC, but I just drew it in CAD and sent it to my local trafolite engraver. Next best would be those sticky back encapsulation pouches

SillyOldDuffer02/06/2020 13:35:30
5772 forum posts
1230 photos
Posted by Paul White 3 on 02/06/2020 11:48:29:

Hello all,

Not wishing to be argumentative but- my approach would be to consider the controller as a part of the project.

Other items- stepper, PSU, stepper controller, belts and gears, are by far the greatest part of the project spend thus

the comparative cost of the eelectronics is secondary.

Go for the most complete answer -Joe's all in one solution. I say.

Best wishes,

Paul

I wouldn't argue with that - it's the correct approach.

But cost is more than money. For example, learning how to make a Printed Circuit Board is a painful overhead if you don't have that electronics experience. Likewise, if you know nothing about programming microcontrollers, and struggle with computers generally, finding out how to set up for Arduino is a stiff trial, and Nucleo is another step beyond.

For chaps who already own a Rotary Table and just want to automate it, the Stepper Motor, Motor Driver, Power Supply and Box can all be bought as modules and joined up without needing a deep understanding.

More difficult to install the Arduino IDE, but once done it's straightforward to plug in an Arduino board, and compile and install an existing program to run on it. And because the Arduino has many modules, the hardware side of a project can be kept simple too. Low cost in terms of human effort, allowing users to concentrate on matters important to them rather than learning another skill-set. There's much in favour of simplified electronics and micro-controlling for customers who aren't interested in that side because the learning cost is so high.

For that reason, Joe's offer of expert help is excellent. He can smooth out the entire process. Decoding arcane computer error messages due to simple mistakes is an agonising time-waster when you don't know the ropes. Joe being practised in the black arts might take seconds to solve the problem. I'm happy to help with my version too.

It's easy when you know how. And when someone helps you cheat!

Dave

Bandersnatch02/06/2020 15:09:49
avatar
1634 forum posts
60 photos
Posted by SillyOldDuffer on 02/06/2020 13:35:30:

More difficult to install the Arduino IDE, but once done it's straightforward to plug in an Arduino board, and compile and install an existing program to run on it. And because the Arduino has many modules, the hardware side of a project can be kept simple too. Low cost in terms of human effort, allowing users to concentrate on matters important to them rather than learning another skill-set. There's much in favour of simplified electronics and micro-controlling for customers who aren't interested in that side because the learning cost is so high.

Incredible things, Arduinos. You can even make a Wireless Tin-Can Telephone.

Huh?

surprise

Edited By Bandersnatch on 02/06/2020 15:10:13

Brian Oldford02/06/2020 20:07:03
avatar
652 forum posts
15 photos

At the risk of re-opening a hornets' nest (despite having many years experience of such things) I have opted for the Uno/Sainsmart Shield option. Primarily because I had virtually all the pieces to hand.
If I'm honest I have too many projects on the go and I wanted something that would be quick and easy.

Dons tin hat etc etc. laugh

Joseph Noci 102/06/2020 21:45:24
671 forum posts
890 photos
Posted by Brian Oldford on 02/06/2020 20:07:03:

At the risk of re-opening a hornets' nest (despite having many years experience of such things) I have opted for the Uno/Sainsmart Shield option. Primarily because I had virtually all the pieces to hand.
If I'm honest I have too many projects on the go and I wanted something that would be quick and easy.

Dons tin hat etc etc. laugh

Don't see why you need to feel uneasy Brian! At the end of the day, the best solution is the one that works for you!

And sometimes you actually just need a stepper driven dividing head, not a complicated new project to get there...

Have fun!

Joe

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

Latest Forum Posts
Support Our Partners
emcomachinetools
Eccentric July 5 2018
Warco
Allendale Electronics
ChesterUK
cowells
Eccentric Engineering
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