trash80 wrote:DerStig wrote:I have no idea what you just wrote but I want it.
so what you are saying is that I can use that with the Accel board and a E3D hotend on my MetalMax with a Duet WiFi board. Could you dumb down the post so I can do it?
EDIT: Changed to use the Z-probe connections on the Duet and updated code & wire diagram below
Yes.
I can try though this is probably a more advanced topic and should be taken with care. You may need to tweak the accelerometer sensitivity on your setup (located in the accelerometer.ino file) or adjust speeds for triggering to work reliably. I only have the one printer I tested with.
I used a Teensy 3.2 because I happened to have a few around the shop, and they are fast to develop with. You can get them at pjrc.com or SparkFun, Adafruit, Amazon, etc. It's a $20 Arduino compatible microcontroller, you need to download and install Teensyduino from pjrc.com though.
(An advanced user could get away with a much lighter weight microcontroller, such as a Pro Mini or an Attiny with some logic level conversion)
- Download the code available here
https://github.com/trash80/HE280AccelerometerInterface which can be flashed using the Arduino application.
- Connect the HE280's SCL, SDA, and INT lines into the Teensy's pins 19,18, and 2 respectively.
- Connect the Teensy pins to Duet Z-Probe 4 pin connector... Teensy Pin 13 -> Z_PROBE_IN, Pin 3 -> Z_PROBE_MOD, 3.3v -> 3.3v, GND -> GND.
- Edit config.g and add or change the M558 command:
Code: Select all
M558 P5 X0 Y0 Z1 H10 F1100 T6000 ; Z probe is an digital output probe and is not used for homing any axes
- Edit bed.g and replace the G28 home command at the top of the file with the following:
Code: Select all
M558 P3 ; drive mod pin on Probe Z connector LOW
G28 ; home the printer
M558 P1 ; drive mod pin on Probe Z connector HIGH
M558 P5 ; release mod pin connector and set the type to 5
- Finally you can reset the Duet and try the probe, you may need to add a offset to z probe offset after calibration to fine tune (I don't know why, maybe because my bed is sorta slightly flexible), I used G31 X0 Y0 Z-0.3 P500
- Last note, run the probe after a restart and the hotend is at room temperature.
I made a super simple diagram for the HE280 to connect to the Duet- though you should not use this as reference, there might be a mistake (I double checked it but you never know)
[img]
https://github.com/trash80/HE280Acceler ... g?raw=true[/img]
I have not had any probing issues as discussed in the forum elsewhere due to the i2c wire length, except when trying to probe after a print which may be something I can look into later, because upon power up it works every time.