minimize cable to extruder
i would like to build a PCB with stepperdriver for the extruder( only if possible ) , power mosfet for the heater analog input for the thermistor and n° 2 digital low power output for the vent's .
this i would like to control in from fimware by i2C or somthing else .
is it possible that the firmware supports the "remote board" .
this i would like to control in from fimware by i2C or somthing else .
is it possible that the firmware supports the "remote board" .
Comments
For fan/heater it is not supported but doable if you can program. Just modify the function setting fan, heater or getting temperture to send values instead of doing analog read, changing pwm ... SO if you can program that would be no problem. But you need step/dir/enable signal for stepper in addition.
i make two sketches , one for the master( to be integrated to the repetierfirmware and the second the slave for the arduino on the pcb for extruder .
in this way i need at the extruder PCB only the 12Vdc , 5V and GND + two wires for the I2C. likeyou told me i need also the step and direction signal for the stepper driver wich is mounted to the PCB.
so i can read the value of two hotend teperature, control 2x mosfet for heater, control 2x fan for hotend+ 2x fan for colling+ steper enable. on only 5 wires + stepper pule and direction.
my problem now is that i'm not sure in wich way i ca integrate (and how) the master sketch to the repetierfirmware .
I am grateful for every idea
thomas
NB i surely in the end i've to clenup the sketch from junk needed for controll
master sketch ------------------------------------------------------------------------------------------------------------------------------
slave sketch ---------------------------------------------------------------------------------------------------------------------------------
All is in Extruder.cpp. Only thing is your loop is bad on slave side. You will never get a do all command. For each action you need an own command and after getting the command read the payload or reserve some bits as payload. E.g. lets say bits 0-3 are commands so you can have 16 actions and you can add in bits 4-7 also 4 bit payload e.g. enable or disable a light/enable/.. For setting PWM you need a extra byte with value of course but you can encode in bit which of the 2 heaters is meant.
That you need to find all the places where normally pins/pwm is set or analog value gets read and add some code like in your master part to execute exactly that action. That is why you need individual actions and can not make a all in one solution.