Source Code Repository Required
|Brian Oldford||01/06/2020 16:47:19|
684 forum posts
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.
|1654 forum posts|
Plenty of info at this link to HMEM **LINK**
You may have to register to view but worth being a member there anyway.
6195 forum posts
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
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.
|Brian Oldford||01/06/2020 19:20:17|
684 forum posts
Edited By Brian Oldford on 01/06/2020 19:20:31
5395 forum posts
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.
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 Lousick||02/06/2020 02:30:37|
|1501 forum posts|
There are bigger displays available and I can read my DRO screen from across the room.
|250 forum posts|
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 1||02/06/2020 07:46:17|
|739 forum posts|
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.
6195 forum posts
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...
# 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 3||02/06/2020 11:48:29|
|101 forum posts|
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.
|Joseph Noci 1||02/06/2020 11:58:17|
|739 forum posts|
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.
|Robert Atkinson 2||02/06/2020 12:48:31|
755 forum posts
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.
|duncan webster||02/06/2020 12:59:17|
2736 forum posts
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
6195 forum posts
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!
1716 forum posts
Incredible things, Arduinos. You can even make a Wireless Tin-Can Telephone.
Edited By Bandersnatch on 02/06/2020 15:10:13
|Brian Oldford||02/06/2020 20:07:03|
684 forum posts
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.
|Joseph Noci 1||02/06/2020 21:45:24|
|739 forum posts|
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...
Please login to post a reply.
Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!
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.