An Electronic Lead Screw controller using a Teensy 4.1

Back to the thread in progress.

PCB has been assembled! Sort of made a mistake in populating the connectors, but there aren't that many pins to de-solder. Had intended to mount the connectors on the back side, rather than the top side, but got all giddy with the new boards. For now, actually, it will be easier for me to have the headers facing up.

Had to touch up some solder joints under the stereo microscope. Boy, it is so much easier that way! Did the necessary fix up of the blobs shorting out the transistors. The display fit in the right place. Didn't have any 11mm standoffs, just 10mm, so stacked two M3 washers for about 1mm extra spacing. The 3.2" diagonal touch display fits like it should. Mounting holes for the display and the pins are lined up. That wasn't a given, since I had to design my own footprint. As a precaution, the Teensy, the buffer and the display are using sockets. I haven't even peeled off the protective film on the display.
PXL_20220929_002057187.jpg
The board should be good for powering up, flashing and testing. He crosses his fingers... Can't resist going downstairs to power it up.
 
Might be a little early to totally celebrate, but, the board powered up with no drama and ran an older version of my SW. (I had forgotten that I had programmed that Teensy! Thought I would have a blank screen.) The display works, and the touch panel is functional. I have not tested the interfaces to HW yet, but I am quite encouraged. Need to wire up some cables and stuff to do that. I can go to sleep happy tonight. You can see the rats nest above the new PCB. The single board replaces the three discrete assemblies and is miles more robust. Both systems are running. What a relief!
PXL_20220929_014132521.jpg
 
Removed the headers and replaced them with mini-terminal strips for each function. After using solder wick, I gave up and resorted to the hot air gun. Heated it up enough and then tapped the assembly downward. Gravity and the fact that a body in motion tends to stay in motion, nicely dropped out the header pins. Much easier! Less board marking as well. Haven't decided if I need to rear mount the connectors or not. For now, they will go on the top side. I am going to hook up the encoder and the stepper motor this afternoon to the PCB. Version 0.2 (do I dare to call it V1.0?) may have different more robust connectors installed on the back side. Think it will make the assembly a lot easier. Still, this is much improved over the rats nest. So far, I have not found any functional issues with the board, which is gratifying.
PXL_20220929_153645127.jpg
 
After wiring the driver and the encoder to the board, using the terminal blocks, the PCB is controlling the lathe! I have removed the other rats nest & Teensy from the area. It's not necessary to have around. Man, this PCB is so much nicer to use. Only thing left to do for checking out the design is to integrate in the DRO read heads. If only I could find the piece of paper with the wire color code I determined... I'll find it, or I will ohm it out again. Beats me where that piece of paper is, though.

Curiously, the RPM is reading negative when the lathe is set to FWD. I did not switch wires (anywhere). Could have been a recent SW change that altered the sense. I did patch in some LH code. Probably need to revert the code (change back to RH) and make sure everything still makes sense.

For RH threading, FWD has the top of the spindle rotating towards the operator. For convention's sake, this should be +RPM. Therefore, REV should be -RPM.

For LH threading, I would think the sense of FWD and REV for the spindle should be the same. It would seem I need to scrub/review the lead screw direction for LH threading. Think I have the control logic incorrect, somewhere.
 
Have hooked up the X DRO input. It works, sort of. I have a display garbage issue that needs to be fixed. Custom fonts, do not include a background. This means you have to overwrite the background to get rid of the last number that was displayed. I'm not doing it quite right, apparently. I need to clean it up, so I can calibrate the DRO. Hard to do this, if the numbers are not quite legible! But so far - everything on the PCB is working. Next will be the Z DRO input.
 
Nice! It's always nice to solder parts down and have them work! Looks like it's coming along really well. Now comes the fun part of playing with it to find all the little bugs.

With the DRO, are you planning on setting Start/Stop points for threading and turning? That would be a really nice feature.

Does your encoder have a Z pulse? If so, using the DRO you could auto sync to a thread to let you engage/disengage the half nut without worrying about which lead you were on... ;) (It's on my wish list of features...)
 
Nice! It's always nice to solder parts down and have them work! Looks like it's coming along really well. Now comes the fun part of playing with it to find all the little bugs.

With the DRO, are you planning on setting Start/Stop points for threading and turning? That would be a really nice feature.

Does your encoder have a Z pulse? If so, using the DRO you could auto sync to a thread to let you engage/disengage the half nut without worrying about which lead you were on... ;) (It's on my wish list of features...)
Z DRO cable is 1/2 done. Z input is working. I have to finish the cable on the Z head, by soldering in a connector. Basically, the whole PCB is working as well if not better than the rats nest. All circuitry is running. No cuts or jumps needed. Dang, a first pass success. There's stuff I could change for the better, like putting in some protection circuitry, some test points and better connectors, but it's pretty darn good for a first board.

Ahem, my code has no bugs. :grin: It's doing exactly what I told it to do - whether I meant it or not!

Setting start and stop points for turning and threading is on my wish list. One of the reasons why I integrated the DROs. I haven't figured out the threading part, though. More inportantly, I have to figure out how to make the UI for it. A 320x240 screen forces you to make some harder choices than if you had a lovely 1920x1080 touch screen.

My rotary encoder has a Z pulse. The encoder tool library however doesn't use it in a way that I want. I will have to look into the library to see if I can add the feature.

I am thinking about building up another board, so I can explore using a higher level graphics tool. Having a compact board with a display and no crazy flying wires is pretty good to use for this.
 
Um, I didn't have any trouble sourcing a TI F280049C from DigiKey. They are showing 207 currently in stock. I don't know if you want to shift gears at this point, or not, but they are available.
 
Um, I didn't have any trouble sourcing a TI F280049C from DigiKey. They are showing 207 currently in stock. I don't know if you want to shift gears at this point, or not, but they are available.
For a long time they were not available. They just came back into stock, within the last week or so.
 
Back
Top