7i76E analog output
- Gorts Revenge
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
13 Jan 2023 03:22 #261769
by Gorts Revenge
7i76E analog output was created by Gorts Revenge
Is it feasible to reallocate the analog output for something other than the spindle? If so, how would this be done (in the HAL files)?
I'd like to use it to send an analog signal to a separate processor (ARM micro-controller with a 12 bit ADC) which will be in control of a slightly unorthodox (and somewhat complicated) coolant supply. Basically, I need to send it some user-definable control signals and I'd rather avoid serial comms if possible. The analog would be mighty convenient (at least for half of it) if that's possible.
I'd like to use it to send an analog signal to a separate processor (ARM micro-controller with a 12 bit ADC) which will be in control of a slightly unorthodox (and somewhat complicated) coolant supply. Basically, I need to send it some user-definable control signals and I'd rather avoid serial comms if possible. The analog would be mighty convenient (at least for half of it) if that's possible.
Please Log in or Create an account to join the conversation.
- rodw
- Away
- Platinum Member
Less
More
- Posts: 10788
- Thank you received: 3552
13 Jan 2023 08:18 #261780
by rodw
Replied by rodw on topic 7i76E analog output
the 7i76e already has some analog inputs that have nothing to do with the spindle.
Please check the docs.
You need to set a mode to enable them when loading hm2-eth in your hal file
Please check the docs.
You need to set a mode to enable them when loading hm2-eth in your hal file
Please Log in or Create an account to join the conversation.
- rodw
- Away
- Platinum Member
Less
More
- Posts: 10788
- Thank you received: 3552
13 Jan 2023 08:20 #261781
by rodw
Replied by rodw on topic 7i76E analog output
My bad you want outputs sorry!
THere will be a seperate daughter card that could be used with the 7i76e
THere will be a seperate daughter card that could be used with the 7i76e
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19464
- Thank you received: 6529
13 Jan 2023 12:25 #261790
by tommylight
Replied by tommylight on topic 7i76E analog output
I would venture a guess that you can use the spindle output to drive an arduino input.
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17945
- Thank you received: 4814
13 Jan 2023 15:28 #261799
by PCW
Replied by PCW on topic 7i76E analog output
Unless you need the isolation of the analog output it might be simpler to signal
the micro-controller with a PWM (pwmgen) or Frequency (stepgen) output.
the micro-controller with a PWM (pwmgen) or Frequency (stepgen) output.
The following user(s) said Thank You: Gorts Revenge
Please Log in or Create an account to join the conversation.
- Gorts Revenge
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
13 Jan 2023 17:15 #261809
by Gorts Revenge
Replied by Gorts Revenge on topic 7i76E analog output
A PWM or a straight pulse output would work great. Technically, I could even get away with a very slow pulse output of a few hundred mS (coded flip-flop timer). That would be done with the Classic Ladder module in the HAL file?
Please Log in or Create an account to join the conversation.
- PCW
- Offline
- Moderator
Less
More
- Posts: 17945
- Thank you received: 4814
13 Jan 2023 18:08 #261814
by PCW
Replied by PCW on topic 7i76E analog output
You can do this with the software hal pwmgen component
The following user(s) said Thank You: Gorts Revenge
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23162
- Thank you received: 4860
14 Jan 2023 12:15 #261932
by andypugh
Replied by andypugh on topic 7i76E analog output
Depending on how many states you want, you could binary-encode on GPIO pins. 3 pins gives you 8 levels. How many do you need?
And I know you said that you wanted to avoid serial, but bit-banged SPI is another option. Here is an example (admittedly this is a reciever)
github.com/LinuxCNC/linuxcnc/blob/master...onents/max31855.comp
And I know you said that you wanted to avoid serial, but bit-banged SPI is another option. Here is an example (admittedly this is a reciever)
github.com/LinuxCNC/linuxcnc/blob/master...onents/max31855.comp
The following user(s) said Thank You: Gorts Revenge
Please Log in or Create an account to join the conversation.
- Gorts Revenge
- Offline
- Junior Member
Less
More
- Posts: 23
- Thank you received: 0
19 Jan 2023 00:30 #262376
by Gorts Revenge
Replied by Gorts Revenge on topic 7i76E analog output
Sorry for the delayed response and thanks for the input.
You're right, you can usually get where you need to go using combinations of discrete states; what you're correctly referring to as binary coding.
For anyone curious but maybe a little befuddled by the lingo, you can use your on/off input states on a given number of inputs as a matrix with different combinations assigned to discrete states (outputs). In mathematics, they'd describe the potential density of the matrix as n!/k!(n-k)!, where n would be the number of states (2: on or off) and k is your number of available inputs. it's essentially the math that makes your computer go zoom. It's a great and (if you ask me) under-employed trick.
In the end, the means of pursuit in the endeavor were muted by the fact that what I was trying to do proved to be impractical. I was muddling with an eco-freindly coolant system, using Peltiers to super-cool some modified canola oil (yeah, go ahead, I'd be laughing too...).
Unfortunately, the canola turns into mud at around 5c and the stuff that made it "modified" comes out of solution well before that.
On the plus side, the modified canola (without the refrigeration) turned out to be a very competent coolant, roughly equivalent or superior to "Tap-magic". The final recipe ended up at about 80% canola, 15% naphthalene and the remainder made up of various stuff I'd be reluctant to list publicly in the modern world (basically, all the stuff that makes any cutting fluid work: sulfer, moly, etc.). The naphthalene serves in making the latter stuff miscible in the canola. And there you go, for what it's worth.
You're right, you can usually get where you need to go using combinations of discrete states; what you're correctly referring to as binary coding.
For anyone curious but maybe a little befuddled by the lingo, you can use your on/off input states on a given number of inputs as a matrix with different combinations assigned to discrete states (outputs). In mathematics, they'd describe the potential density of the matrix as n!/k!(n-k)!, where n would be the number of states (2: on or off) and k is your number of available inputs. it's essentially the math that makes your computer go zoom. It's a great and (if you ask me) under-employed trick.
In the end, the means of pursuit in the endeavor were muted by the fact that what I was trying to do proved to be impractical. I was muddling with an eco-freindly coolant system, using Peltiers to super-cool some modified canola oil (yeah, go ahead, I'd be laughing too...).
Unfortunately, the canola turns into mud at around 5c and the stuff that made it "modified" comes out of solution well before that.
On the plus side, the modified canola (without the refrigeration) turned out to be a very competent coolant, roughly equivalent or superior to "Tap-magic". The final recipe ended up at about 80% canola, 15% naphthalene and the remainder made up of various stuff I'd be reluctant to list publicly in the modern world (basically, all the stuff that makes any cutting fluid work: sulfer, moly, etc.). The naphthalene serves in making the latter stuff miscible in the canola. And there you go, for what it's worth.
Please Log in or Create an account to join the conversation.
Time to create page: 0.064 seconds