Our solenoid actuators and relay modules arrived on Saturday(18 July), and we promptly decided to head down to the lab on Monday(20 July) to test out our circuit and code to see if they worked. We also had a progress meeting coming up this week, and we wanted to test our components before the meeting.
At the lab
The first thing we realised was our solenoid actuators were not the push-pull type (can both push and pull), but the pull type. This means that when the current runs through the solenoid, the little rod contracts and the protruding part gets shorter. It drew a maximum current of around 1.5A, but got extremely hot very quickly when drawing that much current. This meant that for this solenoid actuator, it can only work for our idea of having the bars getting pulled by the solenoid actuator and depressing the button.
Because of this, Tony suggested we try using a servo motor to press the buttons. We looked up the code and hooked the servo motor up to the DC voltage supply and Raspberry Pi, but no matter how hard we tried, changing the pins, checking the voltage, we couldn’t get the servo motor to turn. We concluded that it might have been that the servo motor was spoiled (we tried with 2 servo motors), but we were wrong. The truth will reveal itself shortly.
Since our servo motor wasn’t working, we decided to test our relay module to see if it works, (shoutout to Kelvin and Qi Jie for helping us so much today!) and it didn’t. We tried over and over again until everyone went for lunch and we decided to grab lunch too. When we came back, Kelvin was working on it with Qi Jie, and they eventually found out that the reason why it didn’t work was because of…drumroll please… a faulty jumper cable!
This brings us back to the servo motor (because we had used the same jumper cable for the PWM output to the servo motor), and true enough, the servo motor and code worked once we changed the jumper cable.
Now that we had all our individual components working, it was time to put them all together and try. We hooked up the linear actuator to the relay module and the Raspberry Pi, and got the Raspberry Pi to control the linear actuator through the GPIO pin. Below is an annotated picture of the connections for our own reference.
We also decided to continue with the printing of our bars and HDB blocks that we didn’t print the previous round, so that we could get the very first prototype of our design out, before improving on it further using the more recent designs. We will be returning to the MnT lab on Tuesday (21 July) for our progress meeting with Dr Ho, and we will retrieve our print then.
Next steps
We might need to purchase another bunch of solenoid actuators that can both push and pull (meaning the rod goes through the whole rectangular casing) so as to fulfill our needs for the improved designs. Our brief discussion with Tony also led to the conclusion that stepper motors for vertical motion will be overkill, and a DC motor should suffice for our needs. He also suggested that we just use servo motors instead of solenoid actuators, and that will be something for us to look into in terms of design as well.
Lastly, our team leader, Zann, was sick with a fever, so to end off this post,
GET WELL SOON ZANN!