Mechanical (Shadi and Per-Terje):
Week 13 :
We assembled all the parts together and we discussed the ability to find a solution to print the surrounding case for the system, and we decided to divide the case into 8 parts to fit Marius printer workspace.
week 14 :
We started designing the new surrounding case for the system, we divided the casein into 8 parts, we redesigned the new parts to be able to connect it by using bolts and nuts.
Software (Marius):
Week 13:
Since all the parts were ready for assembly, we met on the 19th of November to get all the components in place. After being done with the assembly we still have a few crucial steps to finish:
- Wiring the entire system and cable management (Erlend)
- Figure out a way to print the surrounding case for the system (Per-Terje & Shadi)
- Finalize programming and testing (Marius)
There are still some wiring that needs to be taken care of after getting the programming working correctly, and Shadi is trying to figure out a way to print the surrounding case for the vehicle. Hopefully, by doing some adjustments to the design and dividing it into different parts, I am able to print it with my 3D-printer. This will make the final prototype look a lot better than it’s doing right now.
Week 14:
After assembling all the different parts of the system, Erlend (electro) did some wiring and cable management on the system (19th- 26th of November). This meant that I wasn’t able to work on the project at all these days. I received the system on Thursday the 26th of November and started working on the programming. I had to divide all the code I had written into smaller parts and started by getting the gear motors running. I quickly came upon a problem where the gear motors did not run at all, so I had to remove all the cables on the system, change a few of them and reconnect them. Unfortunately, this ruined all of Erlend’s work the past week (see the image above in Figure 01).
After reconnecting all the cables the system is working again, but the power source seems problematic. The gear motors are working correctly, but all the other sensors and components are not working at all. Again, I had to spend a lot of time getting this working, and after some help from Erlend, we got it working by changing the power source of the Arduino card from a 9V battery to a power bank for smartphones.
Programming Iteration #1
During the weekend (27-29th of November), I was finally able to start on the programming since all the bugs were now fixed. Luckily, I have most of the code already since I been working on this regularly throughout the semester. This way I can just create a new project in Arduino and add more functionality for each iteration. In the first iteration, I started by getting the line follower sensors working properly, and also added the code for turning the vehicle when it detects two black lines. So when the system detects two black lines the first time it will turn around 180 degrees and going back the way it came. This way the system is able to water plants on both sides of the “track”. When the vehicle gets back to its initial position (the start position), it detects two black lines for the second time and should go into power savings mode.
Programming Iteration #2
In the next programming iteration, I started adding more functionality to the system. In this iteration, I had to add the power bank as the power source for the Arduino since the ultrasonic sensor and a few other components didn’t work when having the regular 9V battery as a power source.
I added the ultrasonic sensor code I have used before, and also a way for the vehicle to turn when detecting a plant. My main problem right now when dealing with the turning functionality is that the gear motors are not running at the same speed, so I have to do a lot of testing to be able to match the speed on both gear motors. The wheels are also not perfect as they are having some problems with traction, and seem a bit lose (can be seen on the video in Figure 04). This makes the programming a lot harder since I can’t really rely on the fact that the wheels will operate identically every time.
Programming Iteration #3:
The next iterations will be done in the upcoming week (week 15), and I will be focusing on the following topics:
- Crane operation functionality: Add the code for operating the crane up and down.
- Soil moisture readings: Add the code for reading the moisture level in the soil.
- Water pump: Add the code for activating and deactivating the water pump.
Hopefully, I will also be able to start printing the parts for the case of the system at the start of this week.