Best way to get a couple of analog values into HAL?
- slowpoke
- Offline
- Elite Member
-
Less
More
- Posts: 190
- Thank you received: 26
28 Jan 2025 23:44 #320025
by slowpoke
Best way to get a couple of analog values into HAL? was created by slowpoke
I want to add a couple of physical pots to control Jog and feed speeds.
I'm using a 7i96s, and I don't believe that particular card has analog input capability.
I'm sure there are many ways to accomplish this. On my mill I used Arduino Connector and it works well, so that's an option, however fair bit of carry on for just a couple of analog inputs.
Thinking out loud... I could read the pot values with a dime store 8 pin uC and do a voltage to frequency conversion, and then apply those variable frequency signals to two digital inputs on the 7i96s if there an easy way (in HAL) to then measure that frequency and apply the result to:
halui.axis.jog-speed
and
halui.feed-override.scale
Or, perhaps there are other better ways, any suggestions?
I'm using a 7i96s, and I don't believe that particular card has analog input capability.
I'm sure there are many ways to accomplish this. On my mill I used Arduino Connector and it works well, so that's an option, however fair bit of carry on for just a couple of analog inputs.
Thinking out loud... I could read the pot values with a dime store 8 pin uC and do a voltage to frequency conversion, and then apply those variable frequency signals to two digital inputs on the 7i96s if there an easy way (in HAL) to then measure that frequency and apply the result to:
halui.axis.jog-speed
and
halui.feed-override.scale
Or, perhaps there are other better ways, any suggestions?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 19798
- Thank you received: 6694
29 Jan 2025 00:15 #320028
by tommylight
www.ti.com/lit/ds/symlink/lm331.pdf?ts=1...Fwww.google.com%252F
Replied by tommylight on topic Best way to get a couple of analog values into HAL?
LM331 Is cheap and easy to find, amazingly i can find it here, although i can not find M3 screws!Thinking out loud... I could read the pot values with a dime store 8 pin uC and do a voltage to frequency conversion,....
www.ti.com/lit/ds/symlink/lm331.pdf?ts=1...Fwww.google.com%252F
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1199
- Thank you received: 420
29 Jan 2025 02:46 - 29 Jan 2025 02:51 #320037
by Cant do this anymore bye all
Replied by Cant do this anymore bye all on topic Best way to get a couple of analog values into HAL?
M3 screws follow the socks.
On a serious note I'm going to delve into the abyss that is BSPI, and see if I can do something to read a SPI ADC. Hopefully something that one can get readily from Aliexpress. Though that kind of shenanigans with require at least 4 pins.
On a serious note I'm going to delve into the abyss that is BSPI, and see if I can do something to read a SPI ADC. Hopefully something that one can get readily from Aliexpress. Though that kind of shenanigans with require at least 4 pins.
Last edit: 29 Jan 2025 02:51 by Cant do this anymore bye all.
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
Less
More
- Posts: 11059
- Thank you received: 3673
29 Jan 2025 04:44 #320043
by rodw
Replied by rodw on topic Best way to get a couple of analog values into HAL?
there is always the THCAD2. You might be able to use a MUX2 to swap the inputs
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
Time to create page: 0.059 seconds