top of page
Search
  • Writer's pictureOwen Minnes

An Update on CookMate Dispensing Functionality

A core feature of CookMate is its ability to dispense raw ingredients from one of six containers into the rotating cooking pot below. In a previous blog post, we shared the design of the dispensing mechanism, consisting of two stepper motors: one which acts in rotation to align one of six containers with the dispensing location, and the other which provides linear actuation, opening the latch and allowing ingredients to drop out.


Physical Design Verification


As was described previously, the original ingredient container ‘carousel’ was redesigned to reduce cost and weight of the 3D printed components. The redesigned containers were subsequently tested to ensure that the design would be adequate to ensuring system functionality. Some specific tests included:

  • Ensure that ingredients of low viscosity would not pose problems of leakage

  • Latch retraction tests performed to ensure that this could be done smoothly

  • Container ‘carousel’ removal tests to ensure ease of removal for washing


Once it had been confirmed that the physical properties of the container design were acceptable, additional containers were printed in order to facilitate further system tests, this time with actuation of electrical components through firmware.



The first actuation test which was performed was that of rotating the ‘carousel’. This would confirm that control could be provided to accurately align a dispensing container with the dispensing location. It was quickly noted however on performing this test that the stepper motor which had been selected would not be capable of providing sufficient torque to rotate six containers full of ingredients, given the amount of static and dynamic friction inherent to the system. This issue was quickly addressed by procuring a larger stepper motor with a higher torque rating. As a result of this upsize in motor, a slight redesign to the motor housing was required. Rather than reprinting the existing housing, an extension piece was printed, as shown in the image below.



Carousel Rotation


With a new motor in place, the carousel rotation was ready to be tested. To perform this testing, a carousel rotation driver was developed in firmware, which could make API calls to an A4988 (stepper motor controller) driver. The functions exposed by this driver are as follows:


DRV_carousel_init: initialize the driver module

DRV_carousel_run1ms: a function which should be called every 1ms to update driver state and perform necessary functions

DRV_carousel_select_position: a function which rotates the carousel to the selected position


There are seven possible positions to which the carousel may be rotated. Six of these correspond to each of six containers. The seventh corresponds to a position which allows for easy removal of the carousel for cleaning. These positions are summarized in the enum below.


typedef enum
{
 DRV_CAROUSEL_CONTAINER_A,
 DRV_CAROUSEL_CONTAINER_B,
 DRV_CAROUSEL_CONTAINER_C,
 DRV_CAROUSEL_CONTAINER_D,
 DRV_CAROUSEL_CONTAINER_E,
 DRV_CAROUSEL_CONTAINER_F,
 DRV_CAROUSEL_REMOVAL_POSITION,
} DRV_carousel_position_E;

Calibration and selection of positions are performed by means of dead-reckoning from a fixed ‘home’ position, determined by using an optical limit switch. To achieve optimal accuracy, the driver facilitates a homing procedure prior to any position selection, and then uses a fixed number of stepper motor counts to provide the required rotation to reach that position.


A short video is provided to demonstrate the carousel rotation.



Latch Retraction and Extension


The second actuation to be implemented was the mechanism for linearly retracting a latch. As described previously, this was to be done using a lead screw stepper motor. The design of the control firmware for this was similar to that for the carousel rotation. A driver was developed, exposing the following functions:


DRV_latch_init: initialize the driver module

DRV_latch_run1ms: a function which should be called every 1ms to update driver state and perform necessary functions

DRV_latch_retract: retract the latch

DRV_latch_extend: extend the latch


To facilitate homing and calibration, an optical limit switch was mounted such that it would trigger when the latch reached the fully retracted position. Extension would then be performed by rotating the stepper motor by a fixed number of counts away from the limit switch. A picture of the mounted limit switch, within the tracks for the latch retractor is shown below.



Testing was performed, using this driver, to ensure that retraction and extension could be properly performed. A video of this test is shown below.



Next Steps


Now that the individual carousel rotation and latch release functions have been tested and proven to be working, they are now being integrated with the complete system application such that system level testing and fine-tuning can be performed. Stay tuned for more updates on that progress.

33 views

Recent Posts

See All
bottom of page