This is a continuation of the previous blog post. As a recap, I will be covering points 4 to 6 in this post:

  1. Apologies from me, and updates on our workflow (Part 1)
  2. Progress Meeting #3 (Part 1)
  3. Arrival of our components (Part 1)
  4. Testing and operation of the T6 stepper motor (Part 2)
  5. Testing and operation of the new push-pull solenoid actuator (Part 2)
  6. What’s next (Part 2)

4. Testing and operation of the T6 stepper motor

Bright and early on 18 Aug, Tuesday, Glen and I (Yu Yun) went down to the MnT lab, full of optimism and hope. Little did we know that things wouldn’t go as smoothly as we thought. Bryan and Zann also came over after their lessons.

After arriving at the MnT lab at 10am, I started connecting the 4 wires of the stepper motor to the stepper motor driver, referencing an online tutorial. Perhaps it was too early in the morning for me, but I accidentally inverted the connections laterally (right became left and left became right). That was the first mess up. Luckily Glen noticed, and we didn’t spoil the stepper motor.

The next mess up was misreading the pairings on the stepper motor. There were pairings labelled in Mandarin on the side of the stepper motor that I didn’t notice. Once again, luckily Glen noticed, and we didn’t spoil the stepper motor.

After an hour or two, we still couldn’t get the stepper motor to work, so we called for help from the numerous TAs, and an intense debugging session started. We checked the connections, the code, the stepper motor driver, the stepper motor, and after independently testing all our components using the other hardware (the one with the Arduino Mega and 4 stepper motor drivers for extruder, x, y, z motion), we came to the conclusion that there was something wrong with the code. At this point in time, it was approaching 3pm, and we decided to take a break for lunch. One of the TAs, Qijie, continued working on getting the stepper motor to operate, and when we came back, he had worked his magic! (Note to self to seriously thank him and the other TAs properly after this whole thing is over)

The problem was, indeed, with the code. The stepper motor required a specific duration between the pulses, and our initial delay was too slow, which resulted in the stepper motor just vibrating without moving up and down. After changing the delay to 0.00002s, we got the stepper motor to work on the Raspberry Pi code, with the other hardware. The next step was to get the stepper motor working on the Raspberry Pi code, with our breadboard and stepper motor driver.

Obviously, it didn’t work. This time, our stepper motor started “singing”. We(just me) were impressed with its vocal range, and once again we had no idea what went wrong. After calling for help (again), and after numerous trials and errors, the TA realised that there were pins that were just floating (not connected to anything), so he suggested that we pull them to 5V and try again. Lo and behold, it finally worked. Below is a few pictures of the final connections on the breadboard which worked. An annotated and cleaned version will be uploaded to the working principle page when I get around to doing it.

5. Testing and operation of the new push-pull type solenoid actuator

Apart from the stepper motor and its shenanigans, we also tested the new solenoid actuators, and found out that we need to reverse the potential across the actuator in order to push and pull, ie if we connected 12V across the actuator, it will push out, and if we connected -12V across the actuator, it will retract. This was an unforeseen obstacle, and after a brief consultation on the internet and with Tony, we decided to try using a H-bridge.

We previously noticed that there were DRV8833 modules in the rotating drawers, but they were not yet soldered. As the final objective of the day, I taught Zann some soldering, and we each soldered one side (5 pins each) of the module. I also introduced to her how to check if we soldered the pins properly (doing continuity test with a multimeter) to make sure that there were no shorts between pins and that the pins were connected to the board.

As it was approaching 6pm and there was no one else left in the MnT lab, we left the lab and I almost locked myself in (because I didn’t know there was a magnetic lock and a button to release the magnetic lock).

On 21 Aug, Friday, all four of us went down to the MnT lab once again, and it seems like it was a lucky day for us! The whole disheartening process of debugging the stepper motor on Tuesday gave me a deeper understanding of what I should look out for, and how to test and debug when things aren’t going right, and for the first time, I managed to get the H-bridge working without calling for help. Granted, the H-bridge connections are at least twice as simple as compared to the stepper motor driver connections, but a win is a win. Below is a photo of the H-bridge connections.

A photo of the H-bridge connections

I also wrote a quick blink-style code (signals separated by a delay), suggested by Glen, to test if we could get it to work with the Raspberry Pi, and it worked like a charm!

Bryan and Zann continued working on the attachment of the solenoid actuator to the stepper motor. We added more holes and lengthened the arm even more, and some pictures of the attachment is shown below.

Before we left, we started printing another attachment from the body to the stepper motor (the white one) with 3mm holes to prevent the screw from obstructing the path of the blue arm, so that we can fasten the bottom of the stepper motor, stabilising it and preventing it from back-forth swaying. The current white attachment was printed with 4mm holes because I made a mistake when measuring the hole size. We left it printing over the weekend, and will go back to the MnT lab to retrieve it.

6. What’s next

Now that all our components are working independently, the next big goal is to put everything together. We have to think about the following things:

  1. How the entire circuit is going to look like (circuit diagram), with the power supplied from A23 batteries
  2. How we’re going to make the circuit (Design PCB, or solder the whole thing ourselves?)
  3. Where the Raspberry Pi is physically going to be located

That’s all for now, I’ll be updating the relevant pages soon.

Finally, some progress! (Part 2 of 2)

Leave a Reply

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