About lathe spindle encoder
- The Egyptian
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
21 Oct 2024 10:05 #312729
by The Egyptian
About lathe spindle encoder was created by The Egyptian
Hi , is there any way to connect encoder to arduino to count encoder pulses and send the count to linuxcnc
i want to use 2000ppr encoder so i want to use arduino insted of pc to count pulses
any help will be appreciated
i want to use 2000ppr encoder so i want to use arduino insted of pc to count pulses
any help will be appreciated
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19011
- Thank you received: 6371
21 Oct 2024 15:53 #312766
by tommylight
Replied by tommylight on topic About lathe spindle encoder
What RPM?
There is a project here using ESP32 in wireless mode for spindle encoder counting that works very well as described by the maker,
github.com/futurelink/linuxcnc-spindle-encoder
If you do have a high RPM spindle, do not bother with it as Arduino will not be able to count, for a 24000RPM with 2000PPR encoder you will have to count 3200000 counts per second or 3.2MHz !
Using interrupts in arduino might just get to count up to 1MHz, but that would be really pushing it.
There is a project here using ESP32 in wireless mode for spindle encoder counting that works very well as described by the maker,
github.com/futurelink/linuxcnc-spindle-encoder
If you do have a high RPM spindle, do not bother with it as Arduino will not be able to count, for a 24000RPM with 2000PPR encoder you will have to count 3200000 counts per second or 3.2MHz !
Using interrupts in arduino might just get to count up to 1MHz, but that would be really pushing it.
Please Log in or Create an account to join the conversation.
- The Egyptian
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
22 Oct 2024 10:43 #312837
by The Egyptian
Replied by The Egyptian on topic About lathe spindle encoder
thanl you for replay , but i want to use arduino with 600ppr encoder can i
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19011
- Thank you received: 6371
22 Oct 2024 13:04 #312850
by tommylight
Replied by tommylight on topic About lathe spindle encoder
What is the spindle speed?
Please Log in or Create an account to join the conversation.
- The Egyptian
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
24 Oct 2024 04:04 #313025
by The Egyptian
Replied by The Egyptian on topic About lathe spindle encoder
spindle speed 2000-2500 rpm
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19011
- Thank you received: 6371
24 Oct 2024 11:41 #313056
by tommylight
Replied by tommylight on topic About lathe spindle encoder
2500rpm/60sec=41.66RPS
600PPR*4=2400counts per revolution
41.66*2400=100000 counts per second.
It should work as long as you use the interupts in arduino, so no "digital_read" in the code.
600PPR*4=2400counts per revolution
41.66*2400=100000 counts per second.
It should work as long as you use the interupts in arduino, so no "digital_read" in the code.
Please Log in or Create an account to join the conversation.
- The Egyptian
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
24 Oct 2024 13:55 #313086
by The Egyptian
Replied by The Egyptian on topic About lathe spindle encoder
My problem is how to write hal configuration for this operation i'm fimilier with arduino code but i'm new to linuxcnc can you help me with hal config
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19011
- Thank you received: 6371
24 Oct 2024 14:20 #313091
by tommylight
Please Log in or Create an account to join the conversation.
24 Oct 2024 14:22 #313092
by PCW
Replied by PCW on topic About lathe spindle encoder
How do you intend to send the count and control signals to the PC?
Please Log in or Create an account to join the conversation.
- The Egyptian
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
24 Oct 2024 18:05 #313122
by The Egyptian
Replied by The Egyptian on topic About lathe spindle encoder
i'm trying to do my best but i hope to find some help here
all i want is to read encoder away of pc becouse parallel port is too slow
i'm trying to use arduino becouse it's the only hardware available in my country , i built a cnc lathe it works very good but when i do some thread the encoder read well in slow speed under 500rpm but when speed up the encoder out of rang and the machine stops
any help on this case
all i want is to read encoder away of pc becouse parallel port is too slow
i'm trying to use arduino becouse it's the only hardware available in my country , i built a cnc lathe it works very good but when i do some thread the encoder read well in slow speed under 500rpm but when speed up the encoder out of rang and the machine stops
any help on this case
Please Log in or Create an account to join the conversation.
Time to create page: 0.083 seconds