Crystal’s Status Report – 11/22

This week I cut hundreds of dowels. I still need to cut more when the other dowels come in. This week I also successfully wrote the firmware to control 3 servo motors on the PWM expanders and 2 stepper motors. I was originally having issues with the PWM expander, but the issue was that I forgot to plug it into a power source. When I first flashed the code onto the STM, the stepper motor twitched. This was due to the step pulses being too fast. I then added the stepper motor code but the stepper motors just did not spin. I tried to debug this by unplugging the I2C PWM expander, but the stepper motor started twitching again. This was because with no I2C devices connected, the I2C reader was failing and was blocking for a short period of time. This made the stepping loop slower, allowing the motor to spin. When I reduced the timeout, the stepper pulses became fast again, causing the motor to twitch. So increasing the I2C blocking period was just slowed down the CPU to make the stepping speed possible. The second stepper motor also initially used illegal GPIO pins.
I am on schedule, but I am concerned about the ability to incorporate the reset actuators because that depends on when they come in. We also have not ordered all of the dowels yet because we need to wait for them to restock.
Next week I hope to write the firmware for the second PWM expander and write the button powered interrupt that will trigger the reset.

To accomplish my task, I needed to know how to use the CubeIDE, know how servo motors worked, and understand the ability / limitations of different microcontrollers. I practiced reading data sheets and how to internet search to acquire this knowledge.

 

Leave a Reply

Your email address will not be published. Required fields are marked *