For the wildcard week I decided to work with robotics and therefore also servo motors which I have been having trouble with in the output week, which is why it would be a good oportunity to get further into. I searched for some different projects that was doable in one week. I found some different mechanism but the best one was this robotarm which I thought was a very good project.
I started by designing a simple model in Fusion 360 for the robotarm which I decided to laser cut in wood. As I have learned over the past weeks it's always good to make sketches on paper before going onto making them in 3D modeling softwares. As seen on the sketches it was all about making it fit with the standard servo motor.
Once I had the sketches figured out it was easy to make the 2 dimensional drawings in Fusion 360.
Once I had all the pieces I glued everything together. I was thinking that maybe glue wasn't going to be strong enough for a project like this. A press fit construction would probably be stronger but also more time consuming to make. Luckily when I cheeked the glue the next day the structure was stable.
As seen in the picture I secured the motors with tape. A thing I could have studied more for a better model is weight distribution. There is no reason why the middle servo motor is not right on top of the one in the bottom which would have a made a much more stable model. to make it all stable enough I therefore had to make use of the screws which comes with the servo motors. After having made this enhancement to the model the overall stability increased drastically.
Next was to assemble the circuit from the project I referred to. This is a very important step were concentration is key since there is much room for error with this many wires.
After having looked over the circuit again and again I had finally assembled it.
I uploaded the code provided in the project through the Arduino IDE.
When I plugged everything i could not control the motors but I was receiving information in the serial monitor but once I pressed one of the buttons it would simply keep printing information to me. I wasn't able to interrupt it without unplugging the power. I tried to go over the circuit again for any mistakes but when I was measuring the power from the Arduino it was not giving me anywhere near the 5V expected. I also read about the specs of the servo motors he was using in the project and the ones I had. His servos were drawing 3-6V were mine were drawing 4.8-6V. This indicated that the circuit didn't get enough power. From the project the guy who invented the circuit also provided a version of it with external power.
I assembled everything according to the new circuit with an external battery of 6V. As shown in the picture beneath I was also connecting a mulitmeter to try and figure out what was going on.
Unfortunately this did not solve the issue. After that I thought it was better to try a whole new circuit with a new code. This project I had been following had so many different aspects to it and therefore also a lot sources for error. Instead I decided to make a circuit with only the three servo motors. I connected the yellow "servo wire" to a pin on the Arduino. I used the breadboard as VCC and GND with power from the Arduino as well. I therefore also found a code that only contain instructions about the three servos.
Still the servos would not turn at all. I still thought that this might had something to do with power. I tried to put a little delay between the commands of the servos, so that the Arduino would not have to ping all three at once. This made the servos respond and work as intended! To make use of the robotarm I modified it to push a small ball by changing the delay and angles in the code.