Best way to get a couple of analog values into HAL?

More
28 Jan 2025 23:44 #320025 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?

 

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
29 Jan 2025 00:15 #320028 by tommylight

Thinking out loud... I could read the pot values with a dime store 8 pin uC and do a voltage to frequency conversion,....
 

LM331 Is cheap and easy to find, amazingly i can find it here, although i can not find M3 screws!
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
  • Cant do this anymore bye all's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
More
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.
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
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
29 Jan 2025 04:44 #320043 by rodw
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
Powered by Kunena Forum