Hello all, I doubt that anyone has been following my progress with a great deal of anticipation and attention, but if there is anyone that has been doing so, I apologize for not posting more updates the past few weeks. I have been making progress, but it has been very very slow. However, I do feel that if I work as hard as I have been this last week for the next week, I will be able to complete my project to a point where I want to be.
Over the past few weeks I have primarily been shopping and researching and testing everything to do with relatively simple electrical parts. As I had previously mentioned before, I am almost completely clueless when it comes to having to make an electrical system. Fortunately, such a thing as the internet exists where I can ask all my questions.
The way that my circuit works is I have two servo motors and an SPDT switch that are connected to an arduino pro mini. The servo motors are connected to two pins that output pwm signals and the SPDT is actually connected to an input. When the switch is flipped one way, nothing happens, but when it is switched the other way a randomly generated code (programmed into the arduino) tells the servo motors what to do. One of the servo motor always opens the door and the other servo motor always flips the switch back. However, the speed and the timing always vary. As of right now, everything electrical surprisingly works exactly the way I want it to.
However, it was a long journey to get here as I ran into a number of problems. First, I wasn’t able to get my board to send the signals I wanted. I later found out this was due to the fact that the board was not as secure as I wanted it to be, which I simply fixed by soldering. It was frustrating because it was such a simple reason, but took me hours to figure out what was wrong. The next major problem that I had was that the 9V battery just wasn’t working. I am still not 100% sure why this is so, but based on loose internet searching it could have something to do with the low amperage it is able to exert. At first I was worried because I was using a 9V battery and the servos operate at 4.8-6V. Because of that I got a 5V voltage regulator. However, every time that I plugged the servo motors in, the voltage instantly dropped to 2V and nothing was getting the power that it needed. After multiple more hours of messing around with it I gave up on the battery. I found that whenever I powered the board and motors with my laptop, everything worked perfectly. However, I am obviously not able to put my laptop in my useless box. Therefore I found an alternative solution of using and external charging battery (typically used for phones). It has a Output of 5V and 2.4 A. Luckily, using this as an alternative to the laptop worked great. Finally, the last issue I had was that one of my motors would continually hum as if trying to rotate, but is unable to. This issue probably took me the longest to solve. In the end I found out it was because in the code I set the motor to rotate to 0 degrees. Because it is a 180 degree motor, I figured it went from 0-180. However, I found out that going to 0 degrees is actually impossible for it. So the motor continually tried to rotate to that position and was unable to. The motors actual range of motion according to the code is 30-210 degrees. I don’t understand why, but it worked.
Now I am in a good place in terms of the electrical components, which was the task I was most worried about. However, I am still far from being done. I now have to make the box that it will sit in and the mechanisms that will allow the motors to open the door and hit the switch. I plan to make these out of wood and spray paint them with a metallic coating. This way they will be lightweight and easy to manufacture, while maintaining that homeless futuristic look I am going for.
It may not look like much, but here is a video of the servo motors spinning. (Pretty depressing that I am actually proud of making something that is probably very easy for many of you to make haha)