# Spoof the DRO scales to drive a Dividing Head for Helical Milling



## MERLIncMan (Oct 16, 2020)

Fellows,

     The PM-727V arrives soon (sabre rattling in the straits of Taiwan notwithstanding....). I got the model with the DRO because - mandatory!

Anyways, yesterday the BS-0 dividing head arrived.  It is so little!  I laugh because it seems bigger in This Old Tony's gearing videos, I guess he's got smaller hands than me 
It's actually a pleasant "failure" on the part of China (or India) that the BS-0 is supposed to have a BS-7 taper in the headstock, but actually has MT2.  I have three tapers: R8, ER32, and MT2 (not counting the MT4 in the PM-1030, for which I've got an adapter) - I am super happy about that, I am loath to have too many adapters, what for cumulative errors and all...

So!  Having searched for a universal dividing head, I was stymied to find a ~5" (125mm) size, and they're all really expensive, and none come with MT2 - and would interfere with the power-feed on the mill in any case.  So, I cried and bought the BS-0, thinking the helix was forever beyond me.  Not so!

The mill DRO scales are 2 channel 90 degree 5v ~50mA square-wave TTL.  Arduino knows what to do with that!

The plan:  
1. Tap into the X-axis scale for the A and B (solder and shrink-tube a pigtail breakout).
2. There is a chip - 7474 I think - or a shield that can count the waves and send friendlier data to the Arduino (my weakest area - where I need the most help).
3. Arduino running the program... 16 key membrane keypad and a 2 or 3 line LCD
4. Stepper driver for a NEMA 23 (17 might work, but a bit weak)
5. ~1:2 timing belt-drive from the stepper to the dividing head input.

Program logic is such that I can divide or jog by degree (I found someone's sketch) for simple indexing, but here is where it gets crazy!

I intend to add code such that the TTL gives the Arduino side A of a triangle, and it uses User Input as side B (rotations / unit of linear travel) and by magic of the Tangent, I get a dividing head slaved to the X axis!

Tan = A/B, where A = X axis travel and B = arc of rotation
ARCTAN(A/B) is my helix angle (b), so A*TAN(b) = B
Arduino does steps/rev (with drive pulleys and dividing head worm ratio figured)
Thusly, while in Helix Mode of the program, turning the leadscrew of the X-Axis causes proportional rotation of the dividing head, according to the helix-angle that I select - yes?

The program is to allow for standard divisions (by integer divisor, or by degrees arc; a DivisionMaster clone) and jogs, but have the added menu for Helix:
1. We'll call the dividing head Axis A
2. Enter helix angle OR
3. X : A ratio

This is the plan.
I will need to purchase a NEMA 23, a driver for it, some timing pulleys and belt, and whatever TTL-interpreter chip is best for single axis DRO decoding. I already have the arduino, keypad, and LCD.
Then I will need to adapt the arduino-rotab-driver sketch that I found.

I will 3D print an ABS enclosure for the brains, and machine a mount for the stepper to mount to the T-slots on the mill, between the dividing head and the power-feed bracket - with a key to the dividing head to make it line up easily when mounted on the mill. I will use a nice connector for the X-axis-scale-breakout so that the whole works can easily be removed, and since I'm at it, I'll figure out how to get this thing to also run my 4" tilting rotab as well.  Might even put a breakout on the Y-axis-scale as well, but probably not necessary.

The whole project should not cost more than $100 ~ $150 as I already have the BS-0, and some of the electrics.  Not bad for an MT2 universal dividing head - the cheapest universal head is B&S-10 taper, 8", and ~$950.00 delivered...

SO!
Seeing as this is intended for my PM-727V, and unless I am mistaken most PM mills have the same DRO scales, this seemed to be the place to put this post - I apologize if that is incorrect.

I hope this to be a community-type project (my coding is terrible - except in Qbasic and DOS!!!) and it'll all be available to you PM-bench-mill owners.

Suggestions?  Comments?  Criticisms?  Angry at me because I put this in the wrong forum group?

Wanna play with the magic-pixies with me??  I need help - especially with the TTL-to-arduino side...

Thanks guys, I hope you like the plan!


----------



## brino (Oct 16, 2020)

First, Welcome to the group!

Don't worry, no one here will get too uptight about this being in the wrong place.



MERLIncMan said:


> I hope you like the plan!



I'd need another read (or two) to understand it better.
All I really got from the first time thru is that you've got an idea and you're excited and determined to implement.

I will be following along!

-brino


----------



## MERLIncMan (Oct 16, 2020)

Revised Standard Abridged Version:
Semi-Universal Dividing Head + Arduino = Helical Milling!


----------



## RJSakowski (Oct 16, 2020)

An interesting concept.  I had seen some strictly mechanical versions for similar machining tasks.  Topologically, it is the same as threading on the lathe.  The spindle is the driving element and the lead screw advances in sync with the spindle to cut the helix.  The Clough ELS substitutes electronics for the gears to accomplish the same task.

In one way, your task is less complicated as every position on a linear scale is unique.  

  I look forward to reading about your progress.


----------



## Winegrower (Oct 16, 2020)

If I live my life well, I'll never have to mill a helix.   But this seems like a fun and interesting project.   Best wishes!

And you offer an interesting perspective change...when I got my BS-0 I thought it was bigger than expected.


----------



## markba633csi (Oct 16, 2020)

The scale output is TTL (0-5 volt) already so I would think you could feed it straight to the Arduino. No?
 A 7474 is a flip-flop, would trigger a data edge by a clock or give a divide by 2
-Mark


----------



## Aukai (Oct 16, 2020)

All this was in English,,,,,  right?


----------



## benmychree (Oct 16, 2020)

I think I'll stick with my geared version ----


----------



## 7milesup (Oct 16, 2020)

This looks dang exciting.  

Oh, Welcome to the best machining group on the web!!!


----------



## ttabbal (Oct 16, 2020)

Well, I made a Clough ELS, so I guess I could make this too, if I had a dividing head.  My brain keeps threatening to duct tape a stepper to my little rotary table. I could probably adapt the setup to that. I don't know when I'd use it, never been quite sure why one couldn't do the same thing on the lathe with the right TPI or similar and the proper cutter.


----------



## Lo-Fi (Oct 17, 2020)

Welcome! 

Helical milling is fun, I've been working on my geared setup. Look at TouchDRO and the Clough electronic leadscrew projects for inspiration, they both deal in encoders and linear travel. Looking forward to seeing the project as it progresses.


----------



## MERLIncMan (Oct 31, 2020)

benmychree said:


> I think I'll stick with my geared version ----


Well, you're just one of those lucky guys who found him a fully universal DH then aren't you 

I'd love a BS-2, but it's super expensive, and the headstock taper is B&S-10 rather than the stealth MT2 (that is supposed to be a B&S-7, but is not) of my BS-0 HD.

Also, the change gears would interfere with the power-feed (or vice versa) as, for some reason, all table accessories bolt on the left....

Anywho - I'm a bit jealous of your change gears, but I'll have infinite divisions! - well, up to the max of the microstep I suppose


----------



## MERLIncMan (Oct 31, 2020)

markba633csi said:


> The scale output is TTL (0-5 volt) already so I would think you could feed it straight to the Arduino. No?
> A 7474 is a flip-flop, would trigger a data edge by a clock or give a divide by 2
> -Mark



Arduino will accept the TTL easily (AFAIK), but arduino has issues with converting the pulses or something... the 7474 was suggested by somebody on some forum somewhere for making an arduino-based DRO, the idea being that it does "the heavy lifting" (whatever that means) and gives more arduino-friendly digital signals.

I honestly haven't figured it out yet... When I began this adventure, I figured the arduino would have no issue with TTL, but apparently the clock speeds or something... yeah... I recall reading 40mHz somewhere... can't remember the context 

Still putting together the details on that part. 

You sound like you know what's up? Wanna do weird tinkery stuff with a mag-scale?


----------



## MERLIncMan (Oct 31, 2020)

ttabbal said:


> Well, I made a Clough ELS, so I guess I could make this too, if I had a dividing head.  My brain keeps threatening to duct tape a stepper to my little rotary table. I could probably adapt the setup to that. I don't know when I'd use it, never been quite sure why one couldn't do the same thing on the lathe with the right TPI or similar and the proper cutter.



YOU!!

YOU!!!!!

(!!)

Yes.... let us plot together!

The dividing head is merely adjunct, peripheral, end-user... the ability to slave a stepper to a TTL scale, with suitable options for the ratio of that slavery; this is the meat-n-taters of the idea 

The applications are ENDLESS!!!

Yes... let us scheme?

(Pardon the enthusiasm...)


----------



## MERLIncMan (Oct 31, 2020)

Thank you sir!




7milesup said:


> This looks dang exciting.
> 
> Oh, Welcome to the best machining group on the web!!!


----------



## ttabbal (Oct 31, 2020)

MERLIncMan said:


> YOU!!
> 
> YOU!!!!!
> 
> ...




Indeed enthusiasm is there.  

Well, first thing is reading the scale. I only have glass scales here. I understand they use quadrature encoding. It sounds like you want to use a magnetic scale? Do you have any idea what the waveforms look like? The touchDRO project documents some different types of scales. They might have some useful code to start with.


----------



## markba633csi (Nov 1, 2020)

Use your bookmarking feature often for those little tech tips you see on other forums- sometimes saves hours of work not having to blaze a trail that someone else has already blazed, I've found.  
(Speaking of the Arduino interfacing stuff, that is)
Nothing more frustrating that coming across something useful on the net then needing it a couple days later and forgetting where you saw it.
-Mark


----------



## MERLIncMan (Nov 1, 2020)

ttabbal said:


> Indeed enthusiasm is there.
> 
> Well, first thing is reading the scale. I only have glass scales here. I understand they use quadrature encoding. It sounds like you want to use a magnetic scale? Do you have any idea what the waveforms look like? The touchDRO project documents some different types of scales. They might have some useful code to start with.



I do believe that the PM DRO is magnetic rather than glass - the docs say 90 degree square waves 0-5v. I'll go for a search on TouchDRO and see what I can purloin. Stealing the A and B leads from the scale ought to be rather straightforward, and I think one CAN put that directly into Arduino digital I/O pins, but I recall that it tends to lose a pulse here and there doing it this way - necessitating some conditioning of the TTL. I would need to identify the proper shield/module (I believe it is 7474 based) and then find the libraries for that connection. 

Will read up a bit more and report back.


----------



## MERLIncMan (Nov 1, 2020)

markba633csi said:


> Use your bookmarking feature often for those little tech tips you see on other forums- sometimes saves hours of work not having to blaze a trail that someone else has already blazed, I've found.
> (Speaking of the Arduino interfacing stuff, that is)
> Nothing more frustrating that coming across something useful on the net then needing it a couple days later and forgetting where you saw it.
> -Mark



You are correct, of course.  Is why my bookmark bar is.... a bit overloaded 

I found it while reading on the Arduino-DRO using Igaging scales.  I do not believe that Igaging scales will match the PM DRO scales, but there are many generic TTL scales, and I should be able to find a shield/module/schematic on that logic.

Besides, in Google's haste to command and control everyone on the planet, they've accidentally made it possible for me to retrace my own steps - if I put the right search-string back into their searcher, the first links to come up are the ones that I've already visited, with dates even.

But yes, I should use my bookmarks more - and organize them somehow :/


----------



## ttabbal (Nov 1, 2020)

MERLIncMan said:


> I do believe that the PM DRO is magnetic rather than glass - the docs say 90 degree square waves 0-5v. I'll go for a search on TouchDRO and see what I can purloin. Stealing the A and B leads from the scale ought to be rather straightforward, and I think one CAN put that directly into Arduino digital I/O pins, but I recall that it tends to lose a pulse here and there doing it this way - necessitating some conditioning of the TTL. I would need to identify the proper shield/module (I believe it is 7474 based) and then find the libraries for that connection.
> 
> Will read up a bit more and report back.




I don't have PMs DRO, so I can't be sure. If you post a pic of the scale, we can find out though. 

If the signal from the scale is too fast for arduino, it might be better to use a different microcontroller. There are some with hardware built in to deal with fast signals. If it's quadrature, which you can boil down to TTL square waves, then the one Clough42 used on the ELS is a good choice. It has a hardware quadrature decoder built in that simplifies it significantly and helps prevent missed signals.


----------



## MERLIncMan (Nov 1, 2020)

Due to Precision Matthew's fame, my mill comes Monday, but my DRO won't be here till Thanksgiving or so - they have stocking and supply issues 

The documentation for the scale says: "Pitch is 0.02mm; EPS is 5v; Output 2 Channels of TTL square wave with a phase difference of 90 (with zero position signal); current is 50mA". My invoice from PM says "Upgraded DRO (glass to magnetic)"
----lots of interpolation going on here (the pun is intentional!)

I am unfamiliar with the programming of other microcontrollers - do they have a dedicated IDE and can they use C like the Arduino? That's not a good question - low level 
This other microcontroller seems right as you describe it, but I'll need libraries for the LCD, Keypad, and Stepper-controller, then I'll have to puzzle out it's program logic. If this alternative brain has a fair following, or uses Arduino libraries, it should be pretty straightforward.
I've already got a menu tree in mind, so I think I can go ahead and write some pseudo-code with variables and library callouts - but I've got to pick hardware before I can actually write the code.

I will look to find Clough42's ELS - have you a link to his goodies?


----------



## ttabbal (Nov 1, 2020)

GitHub - clough42/electronic-leadscrew: Lathe electronic leadscrew controller
					

Lathe electronic leadscrew controller. Contribute to clough42/electronic-leadscrew development by creating an account on GitHub.




					github.com
				




It uses a C IDE they supply. It seems to have support for most of the same sorts of things arduino has, though it wouldn't be source compatible.


----------



## jwmelvin (Nov 1, 2020)

MERLIncMan said:


> I am unfamiliar with the programming of other microcontrollers - do they have a dedicated IDE and can they use C like the Arduino? That's not a good question - low level
> This other microcontroller seems right as you describe it, but I'll need libraries for the LCD, Keypad, and Stepper-controller, then I'll have to puzzle out it's program logic. If this alternative brain has a fair following, or uses Arduino libraries, it should be pretty straightforward.



Check out Teensy. It has extensions to Arduino IDE (Teensyduino) so it’s super easy to get started and there are a lot of libraries for the Teensy hardware. Teensy 4 has hardware quadrature decoding and there’s a library: 





__





						Teensy 4.x H/W Quadrature Encoder Library
					

I have a library based on NXP Quad Encoder SDK driver for the Encoder module but modified to support the Teensy 4.x infrastructure.    NOTE:  you will need to incorporate the Update imxrt.h for encoder structure #402 to make use of the library.    There are 4 hardware quadrature encoders...



					forum.pjrc.com


----------



## MERLIncMan (Nov 1, 2020)

Oh sure, now I've got to decide between Arduino, Teensy, and LaunchXL....  

Arduino I know, and I've actually got an extra RAMPS board with stepper drivers built in from my FLSUN Prusa I3 clone - I cannibalized one of the driver boards to add a second extruder to my 3D printer - but this board will likely not drive a NEMA 23, so it doesn't matter anyways.

Teensy looks easier, but I am uncertain how to translate a rotary encoder for a linear scale - they appear to give the same info, whether hall or optical or otherwise... it seems it doesn't matter as long as I don't exceed the wattage?

The LaunchXL seems more powerful, and the ELS page already has a lot of what I need - working out the 16 keypad and LCD shouldn't be too bad, but it has wattage conversion details (apparently for all the necessary modules)...

Wahhhh!!! 

I'm going to make some notes and I'll be back!

At the moment though, I've got to unstuck my kitchen drain - schmutz passed the trap, and so it's off to buy a snake!


----------



## jwmelvin (Nov 1, 2020)

MERLIncMan said:


> Teensy looks easier, but I am uncertain how to translate a rotary encoder for a linear scale - they appear to give the same info, whether hall or optical or otherwise... it seems it doesn't matter as long as I don't exceed the wattage?



Teensy is great if you come from Arduino. If linear scales give the same quadrature (two square waves 90° out of phase), which I believe most do (e.g., TTL output), then you should be fine. But for sure there are plenty of good platforms.


----------



## BGHansen (Nov 1, 2020)

Curious what type of gear cutter you'll be using. I thought helical gears were generally cut on a universal mill (horizontal with a table that rotates). I cut some small helical gears on my Tormach, but had to mount the 4th axis on a tilt table.

Bruce


----------



## MERLIncMan (Nov 1, 2020)

BGHansen said:


> Curious what type of gear cutter you'll be using. I thought helical gears were generally cut on a universal mill (horizontal with a table that rotates). I cut some small helical gears on my Tormach, but had to mount the 4th axis on a tilt table.
> 
> Bruce



Haven't gotten so far as that - one step at a time I'd say. I was more thinking towards barrel-cams - just a slot on a circumference.
But, now that you mention it, if I were in such a pickle, I might end up grinding a negative-involute on an endmill - that's what we call it right? A negative of the shape that I want? I'd have to do some voodoo magic to put an involute on the flutes, and I'd use a size smaller than the target root-dimension so as to allow for cutter flex, and I'd have to take two passes minimum. With the cutter as a "point" contact, I could pivot about it without ferschnookering the already cut teeth, or binding the cutter - restrictions apply of course - but it's vaguely related to cutter-relief or lead-angle whilst cutting threads on the lathe.

For weird angles, I'm considering how to let the DH do it's pivoty thing, without binding up on the stepper motor - perhaps mount the motor to the top or something. No super crazy helix angles, but I could do helical-bevel gears 

I suppose I could go nuts and put the works on a trunnion, then have it drive the DH, to which a Rotab is attached - then I could make all sorts of crazy things in the 2" of head clearance left! 

Seriously though - the project is mostly for barrel-cams... make a piston do a screwy motion


----------



## 7milesup (Nov 1, 2020)

"ferschnookering".   You have to be careful about that one.  Once into the Fershnook nook of facinorous plotting, it can quickly turn into a fadoodle.


----------



## MERLIncMan (Nov 16, 2020)

7milesup said:


> "ferschnookering".   You have to be careful about that one.  Once into the Fershnook nook of facinorous plotting, it can quickly turn into a fadoodle.



It is my general policy to avoid the fadoodle, wherever possible, as it inevitably leads to the Fubar - and you don't want the Fubar.... noooo the fubar must be avoided - one might say it is verboten. Akin to the antiquated spelling: "Verschnuke".


----------



## MERLIncMan (Nov 17, 2020)

ttabbal said:


> I don't have PMs DRO, so I can't be sure. If you post a pic of the scale, we can find out though.
> 
> If the signal from the scale is too fast for arduino, it might be better to use a different microcontroller. There are some with hardware built in to deal with fast signals. If it's quadrature, which you can boil down to TTL square waves, then the one Clough42 used on the ELS is a good choice. It has a hardware quadrature decoder built in that simplifies it significantly and helps prevent missed signals.




Well sir, Milly has come, and I just got done putting on the X-axis scale/reader - she works! And, having received the DRO goodies, I now have the actual gizmo to examine. I posted a pic of the back of the brains - it's an EL-400. I also posted two pics of the documentation that came with the scale/reader (it is magnetic).

It's 5v quadrature, and I believe I have the necessary pinouts to find the A and B leads.

I did find rumours of a library for Arduino - <digitalWriteFast.h> outlined HERE

My thoughts are that, if I can avoid having to use another shield ($$), or buying another microcontroller (also $$) then I won't panic as much when I purchase the Nema 23 and associated driver board.

To steal the signals, I thought about using one of those blank ports on back of the DRO display - one is a 9pin serial, and the other is a 15pin. I thought that I could find some connectors to fit (likely the 15 pin) to connect to my Arduino box. This would allow me to send X and Y, or even XYZ signals to the Arduino, and then I can select which axis I want the DH to slave - on the off chance that I want to drive my Rotab on this proportional scheme....

My question for you - as this project is effectively identical to your ELS, with some extra bits added - do you believe I am barking the correct tree here with the digitalWriteFast library, so as to use my Arduino, or do you maintain that I should use the microcontroller that you did?

Too bad there isn't just a microcontroller with quadrature encoders AND stepper drivers already on it (with room for a keypad and LCD) - seems like there would be consistent demand for that in robots and CNC and all...

Is there one?  Is this the one you have recommended to me?

Am I out of my mind?  

Thanks brother!


----------



## ttabbal (Nov 17, 2020)

I've never tried to use an arduino to read quadrature signals. I get the impression that reading them can use a fair bit of cpu cycles. In addition, you need to calculate the pulses and send them to the stepper. The precision required can also require a lot of cycles. And stepping signals need to be somewhat long. That can be handled with interrupts or hardware timers though. 

All that can add up to the processor being stressed. The one I mentioned from the ELS project has hardware quadrature decode, so you don't need to use cpu cycles for it. It also means that you will be less likely to miss signals, though you would probably never move the table fast enough for that to be an issue. It also has a floating point unit, so you get high precision calculations for low cycle counts. It's also much faster. 

It's hard to say how much that will all matter. I haven't tried it, so it might be a non issue. If you already have the micro, might as well try it. You can write some test code to see how much time things take so you can see if the chip can keep up.


----------



## MERLIncMan (Nov 18, 2020)

You offer a good detail - floating point - I was thinking about that last night after my post. The 'duino will still need to do operations on the scale pulses to convert them into stepper pulses based on user input. I've never made an arduino do trig before - or any other math for that matter - so I haven't a clue if it has a "math co-processor" or some not-1986 equivalent. If the little thing has to count pulses as well as calculate conversions, she may well let loose the magic blue smoke   

Yeah.... going to need a different board. I'll look at yours again and compare it to some others. 

You know why it's windy in Utah?

................. because Nevada sucks, and Colorado blows


----------



## ttabbal (Nov 18, 2020)

Arduinos are great for the price, but they are low cost low power devices. They can do a surprising amount, but there are limits.  You wouldn't damage it trying, unless some sort of wiring problem fried it. But my suspicion is that it would be a bit much to expect of the little guy. Particularly without heavy use of interrupt driven code. The usual wait loop would waste too much time. They don't have a floating point math unit. It's not necessary to use float, but if you have one it's usually faster than fixed point integer work. 

lol... our neighbors can be amusing for sure. I can't give my home state a complete pass on crazy though, we all have our issues.


----------



## Joe in Oz (Nov 22, 2020)

Any thoghts on putting an encoder on the divider's stepper motor as an 'angular readout' for feedback?


----------



## MERLIncMan (Nov 22, 2020)

Joe in Oz said:


> Any thoghts on putting an encoder on the divider's stepper motor as an 'angular readout' for feedback?



     I certainly considered this avenue. It isn't a bad idea for giving certainty to the drive - accounting for lost steps - but using closed-loop adds more complexity to a project that is already at the distant end of my skill-set.
     I am confident that I can get a microcontroller to blip a stepper according to some maths, and I'm certain that I can program a menu-tree into said controller, and show it on an LCD. I am nervous about trying to make a TTL govern the maths, uncertain of how to get that TTL into the program to begin with, and entirely lost on how I would get said program to use a second source of TTL to test its math on the first TTL.

     But, all the quadrature decoder modules that I've seen so far are at least 2 channel - I had thought just to add the option to read from the Mill's Y as well as X - your thought would be reading from the Mill's X, and the dividing-head's A axis....

     Then I'd have to try to understand the algorithms used to compare closed-loop. I can compare variables without a problem (if U = A then  yay! - U being User's intention), but if steps go weird, such that U <> A, then what do I tell the gizmo to do?

Your idea is of better quality than my skills with a microcontroller


----------



## MERLIncMan (Nov 22, 2020)

Gentlemen!

     You may or may not have seen my drive to cause the DRO of the X axis to then slave my BS-0 dividing head, such that I can do helical cuts by virtue of a microcontroller and a stepper - no money or room for a universal-gear-driven-dividing-head.
     The intention is essentially an expanded clone of a Division Master (which I would buy if it had the ability to index its divisions to another axis' readout).

     In investigating the linear scale signals (5V ~90mA, Quadrature TTL) for my EL400 DRO (PM-727v Milly), I wanted to know what was the function of the USB-B connector on the back of the DRO...

     Microcontrollers (had considered Arduino) aren't exactly ready as-is to drive a stepper based on user-defined ratios of a TTL signal, so I was looking at other options, primarily for the input of the TTL signal. (Yes, I know that some microcontrollers are better suited to this task, vis. the robotics guys).

     Then I saw it.... that USB sends a Hyper Terminal Readable serial signal of the real-time position of the scales... already decoded... I found it on DROPros version of the instruction manual (same machine as mine, but the PM version of the manual has no information about the USB connectivity)

!!!!

If the USB sends a 9600 baud generic serial signal of the already-decoded position of the scale, then it seems my task shifts from making a microcontroller read a TTL (hardware issue with dropping pulses), to causing a microcontroller to read a simple data-stream from a USB serial.....

YAY! (I think)

So.... while I have an RPi B+, I am disinclined to confine it to this project (hope to build a tricorder with it some day). I have an Arduino Uno. I also have a 16key membrane keypad and an LCD.

I intend to investigate whether or no an Arduino can read serial stuff (or is its USB only for downloading firmware) - but Arduino doesn't have floating-point (as another member pointed out to me in my other thread)

I think that using the serial signal from the DRO itself is a much better avenue than attempting to breakout the raw TTL from the scales - I won't have to try and solder anything into the DRO and risk ****ing it up.

It would be a simple USB cable from the DRO brain to my Helical-driver brain.

My question for you guys: Which cheap and simple microcontroller is able to use USB serial in this manner to then drive a stepper-motor based on a user-defined ratio?

Thank you for reading


----------



## ttabbal (Nov 23, 2020)

Nice that you confirmed that. So what you're looking for is USB Host. Rpi can do it, as you know. The easy mode here would probably be a Rpi, and it would be tough to beat the price and ease of use. The older V1 units might be available cheap. Pi Zeros can do it if you add the little adapter cable. The newer PIC32s can do it, along with a host of ARM based boards. Some of the newer Arduino ARM boards might be able to, I've never looked into it. 

For example, a Pi Zero could read the USB data, calculate the changes and toggle a GPIO pin connected to the input of a stepper driver. If you start from one of the stripped down Linux distros I would think it would be plenty fast for the required math, but you would have to test it. And the up side is that if you do need a faster one, you can always get a Pi4.


----------

