- 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?
25 Nov 2021 18:49 #227578
by andypugh
Replied by andypugh on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
Roughly speaking, the EXTRA_SETUP (optional) is like the setup() in an Arduino sketch, and the FUNCTION() is equivalent to the Arduino main loop.
Butt whilst it tis OK to pause / wait in Arduino code, a HAL component function has to run through to completion every time it is called (typically every 1mS)
Butt whilst it tis OK to pause / wait in Arduino code, a HAL component function has to run through to completion every time it is called (typically every 1mS)
Please Log in or Create an account to join the conversation.
26 Nov 2021 00:36 #227598
by cakeslob
I think that is this, right?
github.com/sleepybishop/linuxcnc/blob/fi...s/max31855_bspi.comp
if you have an arduino and a mesa card, you mgiht be able to do what the mojov3 FPGA board does, its a spartan6 with onboard arduino, and someone has written a comp to use the arduino analog pins as an adc
github.com/LinuxCNC/linuxcnc/compare/mas...op:fishybearG-master
load all the commits, its kinda buried
here is my post from the one thread about 3doprinter configs, and what i found reguarding other people using mesa cards for 3dp
forum.linuxcnc.org/additive-manufacturin...nfigs-comps-examples
Replied by cakeslob on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
Of course, if you want a _real_ project then you could write a driver for the MAX38155 using the Mesa BSPI module.....
I think that is this, right?
github.com/sleepybishop/linuxcnc/blob/fi...s/max31855_bspi.comp
if you have an arduino and a mesa card, you mgiht be able to do what the mojov3 FPGA board does, its a spartan6 with onboard arduino, and someone has written a comp to use the arduino analog pins as an adc
github.com/LinuxCNC/linuxcnc/compare/mas...op:fishybearG-master
load all the commits, its kinda buried
here is my post from the one thread about 3doprinter configs, and what i found reguarding other people using mesa cards for 3dp
forum.linuxcnc.org/additive-manufacturin...nfigs-comps-examples
The following user(s) said Thank You: travis036
Please Log in or Create an account to join the conversation.
26 Nov 2021 10:56 #227637
by travis036
Replied by travis036 on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
Something i thought of, if i am running BSPI to my MAX31855 modules, my bed heater thermocouple will be fine, but my head thermocouple will be about 10feet (Mesa to machine cable) + about another 10feet through the two 56" cable drag chains on the Y and X axis. the top of the X axis just rides up and down with the Z axis, so no extra chain for the Z rise and fall.
but 20 feet of wire is a bit much for SPI... so i thought, RS-485 can run the same voltage over longer distance. so why not use a pair of RS-485 transceivers, one for clock, and one for data return (no data is sent to the MAX31855), and the chip-select pin can be a single wire. it will take twice the wires, but i can run a cat5e cable for the twisted-pair for the RS-485 differential signal, and use the 3rd and 4th pairs for power and ground for the transceivers and the MAX31855 at the far end.
only question i have, how do i find the BSPI pins on my Mesa7i80HD-16? the dmesg method doesn't seem to work for me. though if i botch the configs and cause LinuxCNC to error, it shows the Mesa pin config, but no BSPI pins are shown. if i change:to be:and do the same (cause a botched config to generate an error), will it then show the BSPI pins? or am i supposed to selet what pins are used?
~Travis
but 20 feet of wire is a bit much for SPI... so i thought, RS-485 can run the same voltage over longer distance. so why not use a pair of RS-485 transceivers, one for clock, and one for data return (no data is sent to the MAX31855), and the chip-select pin can be a single wire. it will take twice the wires, but i can run a cat5e cable for the twisted-pair for the RS-485 differential signal, and use the 3rd and 4th pairs for power and ground for the transceivers and the MAX31855 at the far end.
only question i have, how do i find the BSPI pins on my Mesa7i80HD-16? the dmesg method doesn't seem to work for me. though if i botch the configs and cause LinuxCNC to error, it shows the Mesa pin config, but no BSPI pins are shown. if i change:
loadrt hm2_eth board_ip="192.168.1.121" config=" num_encoders=0 num_pwmgens=5 num_stepgens=4"
loadrt hm2_eth board_ip="192.168.1.121" config=" num_encoders=0 num_pwmgens=5 num_stepgens=4 num_bspis=2"
~Travis
Please Log in or Create an account to join the conversation.
27 Nov 2021 12:27 #227738
by travis036
Replied by travis036 on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
working with an arduino and a .comp file (compiled and installed) to control my master power, other than the 5V buss powering the Mesa 7i80 and the arduino.
.comp file here: github.com/travis-farmer/linuxcnc/blob/master/serialcon.comp
arduino sketch here: github.com/travis-farmer/linuxcnc/blob/m...ialcon/serialcon.ino
hal config that uses it:everything loads and compiles without errors, even the .comp via halcompile.
yet nothing is sent to the Arduino, and nothing is received from the arduino. i have confirmed the serial port dev is correct, so as i am somewhat new territory, writing .comp code, i am unsure where my error would be. anybody have any thoughts? questions? the arduino and .comp will be used to control master power for my machine, and report back power bus volts.
~Travis
.comp file here: github.com/travis-farmer/linuxcnc/blob/master/serialcon.comp
arduino sketch here: github.com/travis-farmer/linuxcnc/blob/m...ialcon/serialcon.ino
hal config that uses it:
loadusr -W serialcon
net serialcon.volts_five => pyvcp.volts-five
net serialcon.volts_twelve => pyvcp.volts-twelve
net serialcon.volts_twentyfour => pyvcp.volts-twentyfour
net serialcon.volts_stepper => pyvcp.volts-stepper
net xpos joint.0.pos-fb => serialcon.xposition
net ypos joint.1.pos-fb => serialcon.yposition
net zpos joint.2.pos-fb => serialcon.zposition
yet nothing is sent to the Arduino, and nothing is received from the arduino. i have confirmed the serial port dev is correct, so as i am somewhat new territory, writing .comp code, i am unsure where my error would be. anybody have any thoughts? questions? the arduino and .comp will be used to control master power for my machine, and report back power bus volts.
~Travis
Please Log in or Create an account to join the conversation.
27 Nov 2021 16:19 #227754
by travis036
Replied by travis036 on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
got it ![:) :)](/media/kunena/emoticons/smile.png)
well, partly... i needed HAL to send a signal to the Arduino to let it know it is alive, and if the arduino doesn't get the signal for over 5 seconds, it powers down the power supplies.
so, 5V will come from an old ATX power supply via +5v-StandBy, which is just enough current for the Mesa card and the Arduino. 12v will come from the ATX +12v bus. 24v will come from the ATX +12v bus, by way of a step-up dc-to-dc converter (low current on 24v). the stepper voltage will be powered on by a 12v relay, powered by the ATX +12v turning on. it will be an independent switch mode power supply. currently 36v, but thinking of stepping up to 40v or so.
so that is planned out (not solved until it is in action). really it is overly complicated. a future revision will simply take an input signal from the Mesa card to signal when to power on. E-STOP off, likely. so i need a pin to go high when E-Stop is off, and to confirm, another pin to go low from the same signal. this way, if both are low, or high, then power off (incorrect signals) when the signals are correct, power on. i could use a charge-pump... but all my stepGen signals are in use, currently... can i bitbang a charge-pump on any pin? probably with a custom .comp file... i could just turn a pin on and off at a certain rate, faster than N seconds. then the arduino checks for a change at least every N seconds... seems pretty easy to figure out... solved that![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
![:) :)](/media/kunena/emoticons/smile.png)
well, partly... i needed HAL to send a signal to the Arduino to let it know it is alive, and if the arduino doesn't get the signal for over 5 seconds, it powers down the power supplies.
so, 5V will come from an old ATX power supply via +5v-StandBy, which is just enough current for the Mesa card and the Arduino. 12v will come from the ATX +12v bus. 24v will come from the ATX +12v bus, by way of a step-up dc-to-dc converter (low current on 24v). the stepper voltage will be powered on by a 12v relay, powered by the ATX +12v turning on. it will be an independent switch mode power supply. currently 36v, but thinking of stepping up to 40v or so.
so that is planned out (not solved until it is in action). really it is overly complicated. a future revision will simply take an input signal from the Mesa card to signal when to power on. E-STOP off, likely. so i need a pin to go high when E-Stop is off, and to confirm, another pin to go low from the same signal. this way, if both are low, or high, then power off (incorrect signals) when the signals are correct, power on. i could use a charge-pump... but all my stepGen signals are in use, currently... can i bitbang a charge-pump on any pin? probably with a custom .comp file... i could just turn a pin on and off at a certain rate, faster than N seconds. then the arduino checks for a change at least every N seconds... seems pretty easy to figure out... solved that
![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
Please Log in or Create an account to join the conversation.
27 Nov 2021 19:00 - 27 Nov 2021 19:48 #227769
by travis036
Replied by travis036 on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
github.com/travis-farmer/linuxcnc/blob/m...rge_pump.compexample of use in HAL:it is a little quick and dirty, but hey, if anybody needs a BitBanged Charge Pump with diffrential output. and you can set the rough speed by altering the timer delay, currently ~250ms.
i hope somebody else finds a use for it as well.![:) :)](/media/kunena/emoticons/smile.png)
now i just have to design the Arduino end, and be done with it, so i can get back to my 3D printer planning.![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
loadusr -W bb_charge_pump
net estop-net halui.estop.is-activated => bb-charge-pump.enable
setp hm2_7i80.0.gpio.024.invert_output false
setp hm2_7i80.0.gpio.024.is_output true
setp hm2_7i80.0.gpio.025.invert_output false
setp hm2_7i80.0.gpio.025.is_output true
net pump-zero bb-charge-pump.pump.0 => hm2_7i80.0.gpio.024.out
net pump-one bb-charge-pump.pump.1 => hm2_7i80.0.gpio.025.out
i hope somebody else finds a use for it as well.
![:) :)](/media/kunena/emoticons/smile.png)
now i just have to design the Arduino end, and be done with it, so i can get back to my 3D printer planning.
![;) ;)](/media/kunena/emoticons/wink.png)
~Travis
Last edit: 27 Nov 2021 19:48 by travis036.
Please Log in or Create an account to join the conversation.
30 Nov 2021 22:09 #228074
by andypugh
We run hundreds of thermocouples all over vehicles to a central spot, and don't worry about the wire lengths at all.
Replied by andypugh on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
You can just extend the thermocouple wires (needs to be proper themocouple extension wire, of the right sort, but it's not particularly expensive).Something i thought of, if i am running BSPI to my MAX31855 modules, my bed heater thermocouple will be fine, but my head thermocouple will be about 10feet (Mesa to machine cable) + about another 10feet through the two 56" cable drag chains
We run hundreds of thermocouples all over vehicles to a central spot, and don't worry about the wire lengths at all.
The following user(s) said Thank You: travis036
Please Log in or Create an account to join the conversation.
- garrettmin
-
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 0
11 Jul 2022 19:18 - 11 Jul 2022 20:45 #247098
by garrettmin
Replied by garrettmin on topic thinking of digging into 3D printing, can i just add a head to my CNC router?
1. The goal is to adapt a 3-5 Axis Machine Frame, LinuxCNC & MESA Controller to the job of 3D Printing.
A1. LinuxCNC & MESA are not Tailored to 3D Printing which is not included in PNCConf. For 3D Printing with LCNC & MESA, one could attempt the HAL as formated in this post or similar to obtain the appropriate result.
HM2 HAL for 3D Printing:
Minimum Requirments:
A1. LinuxCNC & MESA are not Tailored to 3D Printing which is not included in PNCConf. For 3D Printing with LCNC & MESA, one could attempt the HAL as formated in this post or similar to obtain the appropriate result.
HM2 HAL for 3D Printing:
Minimum Requirments:
- Controller Temperature:
- Analog Thermistors
- Heat Controller
- Controller Extrusion:
- Steppers
Last edit: 11 Jul 2022 20:45 by garrettmin.
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?
Time to create page: 0.103 seconds