I want to try an accelerometer.

580 views
Skip to first unread message

Dan Flemming

unread,
Oct 3, 2022, 11:13:20 AM10/3/22
to 3D Printing Tips and Tricks
I'd like to speed up my upgraded Ender 3 v2.
I watched a video about the setup and was wondering if this one was a good one.

3 accelerometers for $9

Thought I'd mount one for X/Z
And another for Y.
The 3rd I'll give to a friend to use on his 3 printers.

3PCS GY-291 ADXL345 3-Axis Digital Acceleration of Gravity Tilt Module IIC/SPI Transmission

I know this printer is a basic printer, but it prints very well and I'm stuck with it at this point in time.

Thanks.

Ian Nicholls

unread,
Oct 3, 2022, 4:44:04 PM10/3/22
to 3D Printing Tips and Tricks
I have a different brand of this ADXL345, but it looks the same.  You'll find mounts for your fan duct, on thingiverse or printables, or design (and publish?) your own.

I assume you're using Klipper?  I'm ignorant of how you can use it for the other firmwares.

There is a less accurate improvement if you follow Klipper's instructions for resonance testing without an accelerometer.  I don't think there was much visible improvement between that and when I did the same, using the ADXL345.

TobyCWood

unread,
Oct 3, 2022, 5:26:12 PM10/3/22
to 3D Printing Tips and Tricks
Ya know…
You really only use the accelerometers when setting Input shaping. It gives you the frequency of the resonance and the pattern of resonance fall off which you then use to pick an optimal cancellation profile. After that they are superfluous.

LukeH

unread,
Oct 3, 2022, 7:59:36 PM10/3/22
to 3D Printing Tips and Tricks
Except that with an accelerometer installed, Klipper can do an automated input shaping, where it performs movements, measures resonances, and sets input shaping parameters automatically. For many people, me included, this would be  faster and easier than doing it manually. For others, the required soldering and wiring would be harder than doing it manually (although they are skills you should probably have for 3D printer maintenance/upgrade).

Also, the accelerometer has mass (and stiffness) itself, and so resonance will be theoretically different if you were to remove the unit after you had set up input shaping. I doubt there would be a significant difference IRL though.

TobyCWood

unread,
Oct 4, 2022, 12:52:28 AM10/4/22
to 3D Printing Tips and Tricks
Toolchanger users are reporting no difference after removal of the accelerometer board which is quite small. I’ve yet to install one on mine. One of these days real soon. On newer TCs the tools have break out boards which already have the accelerometers in them… but RRF can’t do Input shaping yet for these setups.
Also, RRF does not auto tune nor will it do different shaping profiles for X and Y. Per the devs reasoning.

Luke Hartfiel

unread,
Oct 4, 2022, 4:13:02 AM10/4/22
to TobyCWood, 3D Printing Tips and Tricks

RRF doesn’t yet do automatic input shaping calibration, but Klipper will.

I would think for a tool changer, the mass of the tool head and carriage would be very large, compared to the mass of the accelerometer. For some single nozzle systems though that were built for speed, the mass would f the hot end has been stripped down as much as possible to to point where every gram matters.

On 4 Oct 2022, at 3:52 pm, TobyCWood <andyc...@gmail.com> wrote:

Toolchanger users are reporting no difference after removal of the accelerometer board which is quite small. I’ve yet to install one on mine. One of these days real soon. On newer TCs the tools have break out boards which already have the accelerometers in them… but RRF can’t do Input shaping yet for these setups.
--
You received this message because you are subscribed to a topic in the Google Groups "3D Printing Tips and Tricks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/3d-printing-tips--tricks/wNUwEf3znjQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 3d-printing-tips--...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-printing-tips--tricks/a9865f27-58c0-4982-bea3-38ffeee5596fn%40googlegroups.com.

Dan Flemming

unread,
Oct 4, 2022, 9:54:51 AM10/4/22
to Luke Hartfiel, TobyCWood, 3D Printing Tips and Tricks
Yeah,
I know after the initial input shaping setup and calibration they aren't used, but I think the calibration should be rechecked from time to time to insure maximum printing.

Dan Flemming

unread,
Oct 4, 2022, 9:57:07 AM10/4/22
to Luke Hartfiel, TobyCWood, 3D Printing Tips and Tricks
Another question,
Does the accelerometers work with Raspberry Pi 3B?

Ian Nicholls

unread,
Oct 4, 2022, 4:53:36 PM10/4/22
to 3D Printing Tips and Tricks
They do.  At least, the ADXL345 does with the pi-3.  I followed the wiring guide in the klipper instructions to make a cable 40-pin to 8-pin.  You need to mark pin 1 on both the cable and where they fit, so you don't plug them in backwards.

Mine is a flat ribbon cable, which as some have noted, may cause electrical interference, but that hasn't affected me; I only calibrate, and don't print with it plugged in.  Position the cable so it doesn't interfere much with the measurements (i.e. loose, and above)

Kamesh M Sundaram

unread,
Oct 4, 2022, 4:56:43 PM10/4/22
to Ian Nicholls, 3D Printing Tips and Tricks
Any idea how I can connect and accelerometer if I run klipper from a laptop instead of a raspberry pi?


You received this message because you are subscribed to the Google Groups "3D Printing Tips and Tricks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3d-printing-tips--...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-printing-tips--tricks/22eb9045-7ec3-45d2-8a6a-df058f66e601n%40googlegroups.com.

Luke Hartfiel

unread,
Oct 4, 2022, 5:50:46 PM10/4/22
to Dan Flemming, TobyCWood, 3D Printing Tips and Tricks

I don’t know from personal experience, but it should be totally fine. I can’t think of a reason it wouldn’t work.

On 5 Oct 2022, at 12:57 am, Dan Flemming <newmi...@gmail.com> wrote:



Luke Hartfiel

unread,
Oct 4, 2022, 5:55:56 PM10/4/22
to Dan Flemming, TobyCWood, 3D Printing Tips and Tricks
I would think that if you wanted to use a laptop, instead of a Raspberry Pi for Klipper, then you might consider connecting the accelerometer to the SPI pins on your control board (which the laptop can reach through the USB connection).

Your board would need to have fast-ish SPI for that to work well, so 8-bit boards wouldn’t work.

On 5 Oct 2022, at 8:50 am, Luke Hartfiel <lhar...@gmail.com> wrote:



Kurt at VRFX

unread,
Oct 4, 2022, 6:25:07 PM10/4/22
to 3d-printing-...@googlegroups.com

I'm going to make a WAG here. But, doesn't Klipper need to run on Linux, and isn't a Pi a Linux based unit? So, if the PC is running MS Windows - then I don't think you can run Klipper. But, again - this is a WAG...

-K

You received this message because you are subscribed to the Google Groups "3D Printing Tips and Tricks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 3d-printing-tips--...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/3d-printing-tips--tricks/B600C2B0-C5B7-4344-8F75-B9B105E69BE3%40gmail.com.

Luke Hartfiel

unread,
Oct 4, 2022, 8:43:36 PM10/4/22
to Kurt at VRFX, 3d-printing-...@googlegroups.com

Not all laptops run Windows :)

Macs run Unix with a fancy front end, plus you can install Ubuntu or Red Hat on just about anything.

I would guess that a repurposed old laptop, with Ubuntu installed would run Klipper fine. It would probably have more computing grunt than a Raspberry Pi, plus more storage, a built in screen, etc.

On 5 Oct 2022, at 9:25 am, Kurt at VRFX <vr...@optonline.net> wrote:



Kurt at VRFX

unread,
Oct 4, 2022, 9:03:23 PM10/4/22
to 3d-printing-...@googlegroups.com

Yes Luke - that is completely True what you say!
But - based upon statistics - there are Crap loads more PC laptops out there than Mac - thus my assumption.
Sure, an old PC laptop - wipe & install a Linux kernel - then you're good to go. But, again - my assumption is that the person asking the question was looking to use a preexisting laptop with a preexisting OS - and so - I assumed Windows. I do know that Mac has a Linux kernel now (starting with OS X) - although prior to OS X - its not Linux.
Still - at this point - I think its up to Dan to answer some Questions...

Right Dan???

-K

Dan Flemming

unread,
Oct 4, 2022, 10:00:14 PM10/4/22
to Kurt at VRFX, 3D Printing Tips and Tricks
There's a video on YouTube about linking a laptop with kipper to run the accelerometer, saw it but didn't watch, cause I'm using a pi.

Dan Flemming

unread,
Oct 4, 2022, 10:03:35 PM10/4/22
to Kurt at VRFX, 3D Printing Tips and Tricks
I'm pretty sure there are a few programs that you can run klipper through on a windows machine.

Search for using an accelerometer and klipper on YouTube.

Luke Hartfiel

unread,
Oct 4, 2022, 11:37:58 PM10/4/22
to Dan Flemming, Kurt at VRFX, 3D Printing Tips and Tricks

Like I said, according to the Klipper documentation, “DXL345 can be connected to a Raspberry Pi directly, or to an SPI interface of an MCU board (it needs to be reasonably fast).”

Without an RPi, like if you were running Klipper on a laptop or anything else running Linux, you would have to use option 2…






On 5 Oct 2022, at 1:03 pm, Dan Flemming <newmi...@gmail.com> wrote:



Luke Hartfiel

unread,
Oct 4, 2022, 11:40:00 PM10/4/22
to Kurt at VRFX, 3d-printing-...@googlegroups.com
Kurt, 

Theoretically, I bet you could even run Klipper as a virtual machine on a Windows laptop…

On 5 Oct 2022, at 12:03 pm, Kurt at VRFX <vr...@optonline.net> wrote:



Luke Hartfiel

unread,
Oct 4, 2022, 11:48:14 PM10/4/22
to Kurt at VRFX, 3d-printing-...@googlegroups.com

Duncan Reed

unread,
Oct 5, 2022, 9:45:09 AM10/5/22
to 3d-printing-...@googlegroups.com


Nitpicking I know but MacOS X does not run a Linux Kernel, it is derived from BSD Unix via NexT (the other computer company Steve Jobs setup).

I have run both Hackintoshes (a normal PC running MacOS) and old Mac hardware running Linux. Both are possible but the former is a real pain in the backside, and not really worth the bother.

But not particularly relevant to the conversation, information only.

Kamesh M Sundaram

unread,
Oct 5, 2022, 11:04:14 AM10/5/22
to Duncan Reed, 3D Printing Tips and Tricks
As the person who raised the laptop question, please let me clarify. Like someone suggested I have repurposed a laptop and installed Linux mint. I asked around and there seems to be an accelerometer from fysetc that is USB at the other end. The gentleman said he has an extra one that he is sending to me. Will try it out and report. 

Dan Flemming

unread,
Oct 6, 2022, 9:55:40 PM10/6/22
to Kamesh M Sundaram, Duncan Reed, 3D Printing Tips and Tricks
I'd  also like to know if a solid desk over a push cart is better to get accelerometer readings from.

I'm thinking I'll remove it from the cart, calibrate it and print a few samples,  then return it back to the cart and print the same samples for a comparison.

I'd think the solid desk would give the best results, but I'll find out for sure.

Luke Hartfiel

unread,
Oct 6, 2022, 11:27:05 PM10/6/22
to Dan Flemming, Kamesh M Sundaram, Duncan Reed, 3D Printing Tips and Tricks
Surely the printer needs to be in the location and situation that you would usually print in? If it is usually on a cart then I would use the accelerometer with the printer in a cart.

The whole point is for the accelerometer to detect resonances that input shaping will cancel out, be that from the carriage movement, racking of the printer frame, or the cart or table wobbling with the printer movements.

FWIW, my printer is built on a low platform that has casters and can be wheeled around the garage (the printer external dimensions are about five feet tall, and about two feet across - not conducive to sitting it on a bench, unless you want to use a ladder to work on it). Accelerometer setup and input shaping worked fine on its wheeled platform.

On 7 Oct 2022, at 12:55 pm, Dan Flemming <newmi...@gmail.com> wrote:



Dan Flemming

unread,
Oct 7, 2022, 9:23:41 AM10/7/22
to Luke Hartfiel, Kamesh M Sundaram, Duncan Reed, 3D Printing Tips and Tricks
Thanks Luke,
That makes sense.

Kurt at VRFX

unread,
Oct 7, 2022, 10:46:19 AM10/7/22
to 3d-printing-...@googlegroups.com

Understood. My Bad - guess it was a Bad WAG on my part...

TobyCWood

unread,
Oct 7, 2022, 1:00:29 PM10/7/22
to 3D Printing Tips and Tricks
IMO...
The purpose of the accelerometer is to measure resonance within the X/Y kinematic system. In particular resonance at the hotend/carriage. Any vibration beyond that such as the cabinet the over all printer is sitting on is probably beyond the scope of the measurement and Input Shaping would not work well to control that anyway.

Luke Hartfiel

unread,
Oct 7, 2022, 5:26:14 PM10/7/22
to TobyCWood, 3D Printing Tips and Tricks
I don’t see how the system could differentiate between movement of the kinematic system and movements caused by, say, racking of the frame.

All the accelerometer can measure is the difference in 3D space between the commanded movement and what actually happens, then applies damping algorithms to get the layer as close as the former.

On 8 Oct 2022, at 4:00 am, TobyCWood <andyc...@gmail.com> wrote:

IMO...

Luke Hartfiel

unread,
Oct 7, 2022, 5:30:51 PM10/7/22
to TobyCWood, 3D Printing Tips and Tricks
The only limitation might be super low frequency “resonances” (like if the table had one leg much shorter than the others and lurched to on side when the carriage was all the way to the right or something), since there would be no way to measure that properly.

On 8 Oct 2022, at 8:26 am, Luke Hartfiel <lhar...@gmail.com> wrote:



Dan Flemming

unread,
Oct 8, 2022, 7:08:47 AM10/8/22
to 3D Printing Tips and Tricks
Another question:

Once I setup klipper and I'm ready to start printing, will my slice codes still work with klipper?
Or do I have to re-slice?

I'm pretty sure I can use my slice codes, just want to make sure...

Luke Hartfiel

unread,
Oct 8, 2022, 7:28:43 AM10/8/22
to Dan Flemming, 3D Printing Tips and Tricks

Your GCode files should still work. The resonance compensation is independent of any sliced files.



On 8 Oct 2022, at 10:08 pm, Dan Flemming <newmi...@gmail.com> wrote:

Another question:

tray

unread,
Oct 8, 2022, 7:47:07 AM10/8/22
to 3D Printing Tips and Tricks
> Surely the printer needs to be in the location and situation that you would usually print in?

Only if you have accelerometers on both the head and the bed, and are subtracting the difference. If you have a single accelerometer, it'll try to minimize your motion error with respect to the ground, rather than the relative motion of the nozzle and print. So for the single accelerometer case, you'd want it on a stable surface.

That said, bigger objects have lower frequency response, and the cart might be massive enough to fall off the bottom of the response curve of the SW?

Luke Hartfiel

unread,
Oct 8, 2022, 5:21:48 PM10/8/22
to tray, 3D Printing Tips and Tricks
Like I said low frequency movements of any part of the system (below about 12 or 15Hz) don’t do well with resonance compensation anyway, regardless of their source, and need to be fixed manually, but anything of higher frequency should be able to ge damped by the system. The math should cope.

Dan Flemming

unread,
Oct 10, 2022, 9:21:03 AM10/10/22
to 3D Printing Tips and Tricks
Ok, so I got my ADXL345 and soldered the pins.
Downloaded and printed the X bracket that fits on the nozzle, also the bed bracket.

I watched "EB3D Printing" video on "Klipper installation guide for the Creality Ender 3v2", but l'm a little confused...
I notice that Klipper installs on THE SAME sd-card as octopi.
I've already installed and have been using Octoprint for many months.

IN THE VIDEO
In the Install Klipper section:
Does this require a separate sd-card?
(looks like the 3v2firmware.bin is on a new sd-card)
Eject the sd-card and insert it into the printer's sd-card slot.
He says to flash the firmware.
DOES THAT HAPPEN AUTOMATICALLY?     (by turning on the printer? he doesn't say anything about that).
Will that sd-card STAY in the sd-slot?   (I wouldn't think it would!)

Hope someone can guide me on this...
Thanks,
D

Dan Flemming

unread,
Oct 10, 2022, 12:44:23 PM10/10/22
to 3D Printing Tips and Tricks
I got an error while installing klipper:

pi@octopi:~/klipper $ make
  Compiling out/src/sched.o
make: arm-none-eabi-gcc: Command not found
make: *** [Makefile:64: out/src/sched.o] Error 127
pi@octopi:~/klipper $

An ideas?

Luke Hartfiel

unread,
Oct 10, 2022, 3:36:19 PM10/10/22
to Dan Flemming, 3D Printing Tips and Tricks
Klipper and Octopi do indeed live together in the same as card for the Raspberry Pi - they are designed to work together.

To flash your printer (since Klipper is part on your printer and part on your RPi), you copy the new .bin firmware to an otherwise blank SD card, stick it in your printer and cycle the power. Your firmware will update and the file extension for the file on your SD card will change (usually to .cur).

On 11 Oct 2022, at 12:21 am, Dan Flemming <newmi...@gmail.com> wrote:

Ok, so I got my ADXL345 and soldered the pins.

Dan Flemming

unread,
Oct 10, 2022, 6:44:51 PM10/10/22
to Luke Hartfiel, 3D Printing Tips and Tricks
After all day I finally got klipper installed and communicating with octoprint.

I had to delete klipper, add the line
"sudo apt update --allow-releaseinfo-change"

BEFORE installing klipper.

Because
The repository "http://raspbian.raspberrypi.org/raspbian buster InRelease" changed its "Suite" value from "stable" to "oldstable"

And never bothered to update the installation programming (even though I'm quite sure they know about the issue).

Now onto other troubles with the configurations...
Reply all
Reply to author
Forward
0 new messages