Notifications
Clear all

Any way to stop a stepper motor based on load or amps?

5 Posts
2 Users
1 Likes
948 Views
(@jamesgi001)
Member
Joined: 1 year ago
Posts: 13
Topic starter  

I am building a prototype of a digital coffee grinder where the grinder burr gap is controlled by a geared NEMA 17 stepper together with an Arduino Mega.

I need to stop the stepper when zeroing the burrs and have tried Omron IR break beam sensors to do this and, while this method kinda works, it gives inconsistent results. Next, I tried an ACS 712 (5amp) current sensing module on both the supply 12v to the Polulu controller and also across one of the coils to see if the burrs contacting each other created any kind of change in amps though this also did not create any usable data or results. There seemed to be no change in amps at all when loading up the retract. The gearing (3:1) also may be isolating the stepper from the load as well. When the IR fails to stop the stepper due to misalignment, it will stall, but its ugly.

I also read that back EMF can be used to check stepper stall? I am now scratching my head for a good way to detect the burrs have fully closed?

I would most appreciate any suggestions anybody has on how to do this? Thanks in advance!


   
Quote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

@jamesgi001,

Sounds like an interesting project.  I typically use the Polulu  A4988 driver boards.  Unfortunately, the A4988 does not support the back EMF ability.  On 3D printers using the A4988, they must use some kind of switch to find the stops.  Some other ideas...

In either version it might be helpful to measure relative to the back stop and then just count the number of steps needed to cause full closure of the burrs.  That way if a bean is in the way you don't get an invalid zero.

Good luck with your project.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
(@jamesgi001)
Member
Joined: 1 year ago
Posts: 13
Topic starter  

Thanks so much @Inq! By the sound of it the TMC2209 driver might be exactly what I am looking for. I had not heard of this driver before though I have used L298, ULN2003 and A4988 many times. This is very interesting! I will test and see if it works. If it works as you say in a 3D printer it should be OK for my grinder.

The IR detector you suggested may also be of interest. Obviously this has been around for a while as one of the applications is 'mechanical motions in VCR'! Time for documentation update? It may be possible to set this up for higher accuracy than the break beam sensor I am currently using so maybe a Plan B to consider.

Also a good suggestion with regards the bean in the way of closing. This is most certainly an issue, as you rightfully point out. I am using a servo motor as the main grinder motor and I run it in reverse slowly while closing the burrs which seems to clear most of the beans out of the way. 

I will update this post after testing. Thanks again - I owe you a coffee!

You gotta love this forum.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
 

Here are some references that got my thoughts cooking...

https://3dwork.io/en/tmc-drivers/

There are several YouTube links in there that highlight this, like 

Posted by: @jamesgi001

I will update this post after testing.

As I mentioned, I haven't gotten to play with them yet, but if you do proceed with them... please do keep your thread updated with your progress.  I'd really be interested!

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
(@jamesgi001)
Member
Joined: 1 year ago
Posts: 13
Topic starter  

This seems like such great (German?) tech that is way ahead of other controllers.

https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2209_Datasheet_V103.pdf

I found this page that has some code I will test for sure.

https://github.com/teemuatlut/TMCStepper/issues/178

I ordered the (BigTreeTech) controller just now on Amazon so will learn more next week. 

I am quite sure this will do exactly what I need though clearly some new things to learn here!

Great lead - I will post results ASAP.


   
Inq reacted
ReplyQuote