On 11/10/26 05:31, andy pugh wrote:
On Mon, 9 Nov 2026 at 18:20, Sam Sokolik <[email protected]> wrote:
In his configs - the base thread is 150000ns - which without reset
functionality (I don't know if the gpio in the rpi allows for that) is
3.3khz.
hal_gpio does export a reset function, so you can get 1 step per
thread cycle (rather than one every second step cycle)
There is a faster way that Bertho's spi driver (rpspi) uses, Andy. It
uses 3 gpio pins to drive the 7i90, at 42+ megabaud transmit, and 25
megabaud for receive from the 7i90. That is the omly connection between
the pi and the lathes interface. No ethernet involved...
A mesa 7i90 and 3 7i42TA's gives me 72 IO pins to drive my 11x56
Sheldon. This includes signals to some Crydom clone relays to control
the lathes power, 2 stepper drivers (4 if needed), 3 encoder inputs and
a PCM output to a mesa spinx1 to control the VFD's speed & direction.
One encoder in is from an AT667 triplet watching the spindles main gear
and 2, each with mode pin s in place of the missing index on those dials
so they are 3 pins each, reading a pair of $22 100 PPI dials I put on
the new apron which effectively are the X&Z cranks I took off, drilling
8 1/4-28 boltholes in the front face of the carriage & bolted on a big
1/2" thick plate to anchor the Z ball nut, hold the X motor, the encoder
dials and mode push button switches. The mode buttons change the encoder
dials in how many steps per click are represented, in a 1-2-5-10 etc
gain sequence from a fraction of a thou per click to as fast as the
motors can drive it which is about 125 IPM for Z and around 60 for X.
There is no disconnect as the dials can do it all.
The rj45 jack on the rpi4b isn't used with that setup other than
furnishing a net connection to the world for updates of the software and
OS. I can run firefox, prowling the planet, but firefox is an IRQ 700
lb hog, messing with the lathes smooth motions, so I don't run firefox.
The pi is mounted upside down which make that spi bus ribbon about an
inch long, and is src terminated by 120 oh chip r's on a board Jon Elson
designed. I don't think in the last decade plus it has ever made a
mistake. And since I swapped the original motor/drivers out for closed
loop 3 phase stepper servos the ONLY loss of home is when I check the
auto-shutdowns these drivers can initiate if the motor miss-behaves. I
can run a carbide chipped tool into a stationary chuck jaw, and it winds
about a step, trips everything off in its tracks, the carriage and tool
bounce back about 10 thou, at 60 IPM, no broken chip in the tool or mark
on the chuck jaw. Lift the tool holder off the post, re-home the lathe,
fix whatever it ran into, put the tool holder back on the post and
resume the job. Just one problem, I've only tested it, never happened
mid-job since I changed motors. A decade & change later it still just
works.
Yeah, its $300's more costly than a SainSmart parport card but it just
works. I feed it g-code and it does it with no arguments. I have
kill-a-watts, the pi when driving the lathe, draws 13 watts + the
monitor. Only power failures stop the pi and I did have a small UPS on
it which has since died & been bypassed. Its running right now.
Obviously I'm proud of it but I had lots of help from the people on this
list at the time I did it. You know who you are, and I thank you, a lot.
Cheers, Gene
--
There are four boxes to protect liberty
Soap, ballot, jury, ammo
Please use in that order!
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users