Welcome! Log In Create A New Profile


3DTouch and reprap firmware

Posted by BramV 
3DTouch and reprap firmware
July 01, 2017 04:23AM
Hi I'm still having some issues with properly setting up the 3DTouch probe on RADDS (similar to duet) using DC42 fork of reprap firmware.

I connected the control pin of the probe to PWM1 and the probe pin to the ADC-channel.

The probe reads analog signal from the PWM channel to do stuff.

M280 P60 S10 lowers the probe,
M280 P60 S90 retracts the probe
M280 P60 S120 lets the probe goes into test mode, and
M280 P60 S160 reset any 'alarm' (if it detected that it couldn't move the probe up or down properly

the control signal seems to work, at least when I set the probe type to analog (which it isn't)

As far as I could measure, the probe generates a digital high signal when triggered.

The strange thing is, when I select the correct probe type (according to dc42), type 5:
M558 P5 F200 T5000 H3

I lose control over the probe, it doesn't retract or deploy anymore. it does seem to generate a trigger signal, but only once because it doesn't properly retract and deploys after a trigger (it does that automatically normally)

Also when I put the probe in test mode (it retracts and deploys over and over again), it stops doing that when I set the probe type to 5.
I'm really confused about why that is.

I've looked at the code and this is what happens when you specifiy probe type 1 or probe type 5:

case 1:
case 2:
AnalogInEnableChannel(zProbeAdcChannel, true);
pinMode(zProbePin, AIN);
pinMode(zProbeModulationPin, OUTPUT_HIGH); // enable the IR LED

case 5:
AnalogInEnableChannel(zProbeAdcChannel, false);
pinMode(zProbePin, INPUT_PULLUP);
pinMode(zProbeModulationPin, OUTPUT_LOW); // we now set the modulation output high during probing only when using probe types 4 and higher

there seem to be 3 pins referred: zProbeAdcChannel, zProbePin, and zProbeModulationPin.

from pin_radds.h:
const Pin Z_PROBE_PIN = 5; // RADDS "ADC" pin
const Pin Z_PROBE_MOD_PIN = 34;

from platform.cpp
zProbePin = Z_PROBE_PIN;
zProbeAdcChannel = PinToAdcChannel(zProbePin);
#if defined(DUET_NG) || defined(__RADDS__)
zProbeModulationPin = Z_PROBE_MOD_PIN;

so zProbePin and zProbeAdcChannel seem to refer to the same pin, which is the ADC pin, and the modulation pin is pin 34. This is not related to the PWM signal right.. or is it? I'm confused about all the different pin numberings that are used.

Anyone has any idea what is going on? Or what i could try?

Re: 3DTouch and reprap firmware
July 01, 2017 11:27AM
I know nothing about the 3D Touch probe. Is it similar to BLTouch? If so, then the Z probe Modulation pin is not the right pin to send the deploy command from. See [duet3d.com] and [www.duet3d.com].

Edited 1 time(s). Last edit at 07/01/2017 11:28AM by dc42.

Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Full disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet.
Sorry, only registered users may post in this forum.

Click here to login