- Hardware & Machines
- Additive Manufacturing
- thinking of digging into 3D printing, can i just add a head to my CNC router?
thinking of digging into 3D printing, can i just add a head to my CNC router?
i think i would prefer a LinuxCNC based PID, rather than an Arduino <=> Python <=> LinuxCNC based PID system. even if i use an Arduino just to get the temperature from whatever source. it would minimize the debug issues in getting the arduino PID to tune out right. i would just have to change a setting or two in a LinuxCNC config, test it, and move on. if the arduino ONLY handels the reading of the temperature, and reporting the temp to LinuxCNC via python, once it works, it works. no tuning and recompiling needed.andypugh post=227349 userid=723For a heater you would be OK with a 100Hz software PWM anyway.
As the temperature is reported by the arduino between 0 and 255, i could formulate a packet of bytes, and even include some arduino analog readings, if using digital temp sensors, or a thermocouple module. never know when analog readings may come in handy
![;) ;)](/media/kunena/emoticons/wink.png)
i could even use the arduino to step up to a 16-bit ADC, and send a floating point value in the packet for more precision (if i find the need).
for instance, i could use an MCP9600 board from Adafruit, and a Type-K thermocouple to get some good and fairly accurate readings of temp. then it is just a matter of the LinuxCNC PID, and Mesa 7i80 output pins to control everything. and i can control the various fans with a PWMgen output too. the ideas are endless.
but i have seen no reference to using a LinuxCNC PID for temp control... wait, google found something this time round: www.forum.linuxcnc.org/10-advanced-confi...-temperature-control
will have a read and see what i come up with.
![:) :)](/media/kunena/emoticons/smile.png)
![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
Please Log in or Create an account to join the conversation.
uk.rs-online.com/web/p/instrumentation-amplifiers/1923153/
LinuxCNC has a driver.
linuxcnc.org/docs/2.8/html/man/man9/max31855.9.html
Though I also have a bunch of these PCBs going spare which an Arduino Nano can be soldered to along with 6 of the MAX31855 chips:
I don't seem to be able to find the schematics or Gerbers, though.
Attachments:
Please Log in or Create an account to join the conversation.
![:) :)](/media/kunena/emoticons/smile.png)
found these modules on Digikey: www.digikey.com/en/products/detail/maxim...MAX31855PMB1/3758888
i am not particularly good at SMD soldering, but those digikey modules may be a real possibility.
![:) :)](/media/kunena/emoticons/smile.png)
i will plan for this option, and when i can afford some of the digikey modules, i will get some. need at least 2, plus a spare (i always order spares, because you never know)
i see all pins are shared, except the data input pins... can i use any of my mesa 7i80HD-16 pins that are available? or are there specific pins i need to use?
so to confirm, if i have two on my 7i80, the hal would look like:loadrt max31855 personality=2setp hm2_7i80.0.gpio.024.is_output true
setp hm2_7i80.0.gpio.025.is_output truenet spi.clk.in hm2_7i80.0.gpio.024.out max31855.0.clk.out
net spi.cs.in hm2_7i80.0.gpio.025.out max31855.0.cs.out
net spi.data0.in hm2_7i80.0.gpio.026.in_not max31855.0.data.0.in
net spi.data1.in hm2_7i80.0.gpio.027.in_not max31855.0.data.1.inaddf max31855.0.bitbang-spi servo-threadand read max31855.0.temp-celsius.0 and max31855.0.temp-celsius.1 to get my temperatures? i may also want to read the faults and use some pyvcp indicators to detect faults, just in case.
but it looks very interesting... very interesting indeed! without the Arduino, there is less to attach to my LinuxCNC computer too, so less chance of an issue. it all just stays attached to my mesa.
Just found this too: www.adafruit.com/product/269 as the digikey module is a 3.3v module, and the adafruit module is 3.3v or 5v, as it has onboard level-shifters.
question: how long a wire run can i use for the thermocouple wire? and should i use twisted-pair, or is plain straight-wire (already run on my machine wire bundle) suitable to use?
I do have available an old "soft" CAT5 wire (likely stranded twisted-pair, or foil-wrapped-cotton twisted-pair... haven't checked) that i could cut the bad ends off of and run through the machine wire bundle, if it fits. i wish i had used larger cable drag-chain during the build...
~Travis
Please Log in or Create an account to join the conversation.
In practice deviating from this only introduces as much error as the temperature difference between where the wire changes and the amplifier module.
The "magic" of a thermocouple is in the wires themselves, the end is purely an electrical connection.
Please Log in or Create an account to join the conversation.
if needed, i could in theory step-up the voltage at the Mesa card end (or rather the circuit in between the mesa and transmission wires), and step the voltage back down at the other end... or use fiber-optics, even if only for the extruder hot-end. just some cheap plastic optical fiber for the clock, CS and data return... would be just 3 fibers, though the optical-fiber TX and RX ends are a little costly...
but just the same, there are ways around it if SPI cannot transmit over that much wire.
~Travis
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
i can do amazing things with C++, but certainly not that amazingandypugh post=227515 userid=723Of course, if you want a _real_ project then you could write a driver for the MAX38155 using the Mesa BSPI module.....
![;) ;)](/media/kunena/emoticons/wink.png)
![;) ;)](/media/kunena/emoticons/wink.png)
my Python is even worse... i had to do a lot of research to figure out enough to get the little Arduino comm script working together, and then i was caught completely off guard when it actually worked the 27th time through...
![;) ;)](/media/kunena/emoticons/wink.png)
My native language is Arduino C++, as i call it. i can do amazing things with a ton of spaghetti code
![;) ;)](/media/kunena/emoticons/wink.png)
now, if you will excuse me, i have a perfectly good Arduino, that interfaces great with LinuxCNC, via Python, that i now need to find a new use for...
![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
Please Log in or Create an account to join the conversation.
I was teasing, mainly, as I guess you just want to get on with this. But if you can do Arduino you can certainly do HAL drivers.
My native language is Arduino C++, as i call it. i can do amazing things with a ton of spaghetti code
Here is a starting point, it's a HAL driver for a gyro using the Mesa UART (a very close relative of the Mesa BSPI).
github.com/LinuxCNC/linuxcnc/blob/master...sa_pktgyro_test.comp
An example using the BSPI (very similar) is:
github.com/LinuxCNC/linuxcnc/blob/2.8/sr...ivers/mesa_7i65.comp
I am not really suggesting that this is the way to go at the moment, just planting seeds....
Please Log in or Create an account to join the conversation.
![;) ;)](/media/kunena/emoticons/wink.png)
i understand the teasing, but planting seeds with me can either grow something great... or a corpse flower (looks great, but smells like death)...
![;) ;)](/media/kunena/emoticons/wink.png)
either way, it spurs the mind.
![:) :)](/media/kunena/emoticons/smile.png)
~Travis
Please Log in or Create an account to join the conversation.
- Hardware & Machines
- Additive Manufacturing
- thinking of digging into 3D printing, can i just add a head to my CNC router?