Page 1 of 3

Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Fri Dec 16, 2016 11:06 am
by mhackney
[youtube][/youtube]I know Trash80 posted his Teensy 3.2 version a few days ago - we've exchange PMs. It is good work and it did make me realize "simple is better". I had a version working very similar to his 6 weeks ago and have been using that on my V1 with the HE280. It is based on the ultra inexpensive Adafruit Trinket 3.3V that runs an ATTiny85 processor. These are $8.97 from Amazon with Prime 2 day shipping or $6.95 plus shippingdirect from Adafruit. My original intent was to take the ATTiny85 and design a custom board for it that plugs directly into the HE280 eight pin connector and reuses the 3 probing wires in the whip. While this would allow probing with the hot end actively heating, I now think it isn't that big of a deal and would be much more involved installing (remember that big piece of shrink tubing you had to stretch and stretch over the 8 pin connector? You'd have to cut it off!). So, I'm publishing my simpler, near the Controller mounted, version and be done with it! (note, I AM still working on the free-standing accelerometer probe)

Since Trash80 posted details for folks to follow first, I'll call mine Yet Another Accelerometer Adapter - or YAAA for short. I've posted all of the files on Git.

You will notice that I take great pains to document the code and configuration, that's just my nature!
IMG_8774.JPG
IMG_7154.JPG
Trinket-Duet Connections.jpg
This version plugs into the Duet's E0 endstop port. I'll post config updates later today. You might see that there are 4 wires in the connector harness, the intent is/was to use the Duet's Probe port, as David Crocker described the other day in Trash80's thread, to configure the sensitivity via firmware. That is not yet implemented. This version does not reset at the start of each probe cycle as Trash80's does - in 6 weeks I have not had a single probe failure. It just works.

You'll also see an LED in my photos, that was a status LED so I could debug the thing. There is a little red LED on the Trinket that will flash when a probe hits so you don't need the extra LED. In fact, I need to use it's pin for the version that takes advantage of the MOD pin on the Duet Probe connector.

This version *should* work with any 3.3v or 5v endstop connector control board - like Smoothie. But I have not tested it yet.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 12:26 pm
by CloudColorZack
ATTiny is on the way.

What changes need to be made to the config.g? Any changes to the bed.g file? Trash80's changes look like they're specific to the Z probe input, but I'm just a script kiddie that knows how to follow directions, so I'm not actually sure.

By the way, you're like half the reason I bought a Rostock, and 100% of the reason I bought a Duet. I'd be VERY far behind where I am with this printer now if not your posts across the interwebs and your blog. Seriously, keep doing what you're doing.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 12:31 pm
by mhackney
It depends on where you started from! If you had Duet running previously with FSR probe, then you don't need to do anything in config or bed.

If you are migrating from a RAMBo then you need to get everything else working in Duet's config and then update the bed.g and enable probing using a switch input in config.g. I'm still working on the changes, I'll try to post something later.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 1:00 pm
by CloudColorZack
It's funny you mention the FSR probe-- I actually bought the ultibot kit you recommended on your blog!

...I quickly realized how difficult it would be to fit the FSRs in a Max V3.

I put in the Duet during assembly, and have been calibrating manually with relative success since I put her together.

Are you saying the setup for the config.g and bed.g should be exactly the same as for the FSR? If so, I could probably just parse it from your instructions and your gcode for the FSR setup... not that you shouldn't also share what you have when it's done ;)

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 1:11 pm
by mhackney
Yes, they should be the same. The only minor gotcha might be the probe points since the V3 HE280 has the large fan array that might interfere with a column. That's what I hope to test tonight. But the probe configuration itself is the same.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 2:19 pm
by bvandiepenbos
Thanks for all your work on this Michael.
:)

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 20, 2016 6:48 pm
by Eric
There's a bit of "hidden circuit" here, since for I2C to work the GND supplied to the HE280 must be the same GND that's on the endstop connector. And, of course, the HE280 still needs power as well. Important info for anyone with a hybrid hotend, using the HE280 solely for the probing feature.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Thu Dec 22, 2016 6:48 pm
by mhackney
I made some updates to the code on GitHub. https://github.com/mhackney/YAAA/tree/master

Mostly cleanup and removed the LED from the code. I need to update the board photo to remove it there also. The open pin is now being used to trigger resetting the accelerometer if connected on the Duet's Z probe 4 pin connector as David described in Trash80's thread. I also changed the implementation for detecting a probe event. I was reading the probe's registers directly in the first released version. This was a holdover from some earlier experimentation. As Trash80 pointed out to me, it is better to handle the interrupt signal directly. I made that change as well.

The version I've been using and testing for the last couple of months actually read the interrupt pin directly so I would recommend using this new version.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sat Dec 24, 2016 2:43 pm
by mhackney
I've updated GitHub with a drawing and support for the Duet WiFi and 0.8 4 pin probe connector. I've also done a little tuning to improve reliability.

I'm now auto calibrating AND grid-based compensating on Duet WiFi with the 1.17 (final release posted today) firmware and this probe adapter!

Here are the config changes you need to make.

1) If connecting on the E0 end stop 3 pin connector
You only need to change one line in config.g

Code: Select all

M558 P4 X0 Y0 Z0 H5 F1800 T6000
note, if you are getting false triggers, increase the probing speed F1800 in increments of 120 up to 5400 - but use the lowest value when you get reliable probing

2) If connecting on the 4 pin probe connector (Duet .8 and WiFi) but not wanting to reset before every probe
You only need to add one line in config.g

Code: Select all

M558 P5 X0 Y0 Z1 H5 F1800 T6000
note, if you are getting false triggers, increase the probing speed F1800 in increments of 120 up to 5400 - but use the lowest value when you get reliable probing

3) If you want to use the 4 pin probe connector and reset the accelerometer before every probing run
You need to add one line in config.g

Code: Select all

M558 P5 X0 Y0 Z1 H5 F1800 T6000
and in bed.g remove the existing M561 and G28 and add:

Code: Select all

M561                  ; clear any bed transform, otherwise homing may be at the wrong height
G31 X0 Y0               ; don't want any probe offset for this
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
I use 2 above. In 100s of runs I've never had to reset the probe. It is pretty simple and just works. I can't verify that 3 works, I've tried it but it wasn't clear if it actually performed the reset as there is no way to observe it.

If you want to do delta grid-based compensation that was added to firmware 1.17, simply add this to your config.g file (I put it below the Z probe M558 definition):

Code: Select all

; grid compensation
M557 R110 S15
Note, R110 is a bit small. I am sneaking up on the largest probe radius I can do on my V3 and I'll update here when done.

And now for some results!

G29 auto calibration
6 factors, 13 points - deviation after 0.026 (oh yeah)

Diagonal 291.060, delta radius 144.228, homed height 408.381, bed radius 120.0, X -0.374°, Y -0.512°, Z 0.000°
Endstop adjustments X-0.26 Y0.45 Z-0.19, tilt X0.00% Y0.00%

G30 grid compensation
Run this immediately after G29 without homing in between

177 points probed, mean error -0.00, deviation 0.05

And this is the height map that Duet Web Control now generates:
Screen Shot 2016-12-24 at 2.19.41 PM.png

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sat Dec 24, 2016 7:02 pm
by DerStig
So with this I can swap a Duet into my V2 running a HE280? Sorry for being dense but is there a conversion thread here? this would solve ALL my issues

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 9:57 am
by mhackney
Yes, that's exactly what this can do. I am working on a complete documented process for converting a V2 or V3 to a Duet including printable mounts and pigtails to make the conversion from RAMBo really easy. Give me a few more days, I'm almost done.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 3:09 pm
by DerStig
mhackney wrote:Yes, that's exactly what this can do. I am working on a complete documented process for converting a V2 or V3 to a Duet including printable mounts and pigtails to make the conversion from RAMBo really easy. Give me a few more days, I'm almost done.

You are my hero! Aside from built in wifi any reason not to use a .85 duet?

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 3:19 pm
by Xenocrates
DerStig wrote:
mhackney wrote:Yes, that's exactly what this can do. I am working on a complete documented process for converting a V2 or V3 to a Duet including printable mounts and pigtails to make the conversion from RAMBo really easy. Give me a few more days, I'm almost done.

You are my hero! Aside from built in wifi any reason not to use a .85 duet?
There's a few. The Wifi has much better drivers for the steppers (Nearly silent, high amperage capacity, configurable microstepping with very high values, and some work on missed step/stall detection). It also has a more powerful processor and hardware support for an external SD card, while the .8.5 could theoretically use one but lacks the dedicated connectors and pins. The Wifi also has beefier hotend power connectors, and a somewhat replaceable fuse (It's SMD, so you could do it, but it sucks without good tools) to protect the processor if something shorts.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 5:14 pm
by crocky
mhackney wrote:Yes, that's exactly what this can do. I am working on a complete documented process for converting a V2 or V3 to a Duet including printable mounts and pigtails to make the conversion from RAMBo really easy. Give me a few more days, I'm almost done.
I'll wait patiently.... I have a new Duet WiFi and a Teensy 3.2 ready to go but I have to design and print a Hair Dryer bracket before I can start pulling the Rambo out of it.... I already have a base board printed which lets the Duet fit where the Rambo is located and has two fans fir good airflow... I've got a 7 inch PanelDue that I will fit after I get the Duet all going properly and get a good housing designed for it....

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 5:29 pm
by mhackney
I posted two models to thingiverse this week for the conversion. One is a mount adapter and the other a case for the 7" PanelDue. Print those before ripping apart too.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 6:12 pm
by DerStig
mhackney wrote:I posted two models to thingiverse this week for the conversion. One is a mount adapter and the other a case for the 7" PanelDue. Print those before ripping apart too.

Thanks I'll print those. They look like they are for the V3?

Thank

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 6:14 pm
by crocky
The link to Adafruit is for the 5 Volt Trinket... I have to find them local to me, not a pro or anything else in the name?

I have found one and will order it today... Gives me some time to get the hair dryer stand finished :)

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 6:15 pm
by crocky
DerStig wrote:
mhackney wrote:I posted two models to thingiverse this week for the conversion. One is a mount adapter and the other a case for the 7" PanelDue. Print those before ripping apart too.

Do you have a link to the thingiverse parts?

Thank
Have a look in the Duet area of the forum :)

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 10:21 pm
by mhackney
Or search eclecticangler on thingiverse.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Sun Dec 25, 2016 10:26 pm
by mhackney
I fixed the link to point to the 3.3v version.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 27, 2016 8:29 pm
by DerStig
mhackney wrote:Give me a few more days, I'm almost done.
Are you done?????!???!?!?!?! I'm dying to do this conversion

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Tue Dec 27, 2016 11:36 pm
by RichWP
Got my Duet WiFi in the mail today! Thanks Michael, for your work on this... I'm looking forward to doing the conversion.

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Wed Dec 28, 2016 3:54 pm
by mhackney
I just posted the conversion instructions and files on my blog: http://sublimelayers.blogspot.com/2016/ ... v3-to.html

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Wed Dec 28, 2016 4:29 pm
by DerStig
mhackney wrote:I just posted the conversion instructions and files on my blog: http://sublimelayers.blogspot.com/2016/ ... v3-to.html

THANK YOU!!!!!!!!

Re: Yet another Duet-to-HE280 accelerometer probe adapter

Posted: Wed Dec 28, 2016 4:32 pm
by mhackney
Post questions and feedback as you go on the sticky thread I created for this please.