top of page
Search

Week 8 (Continued): The Big (Pre) Finale

  • Writer: Jessica Zhang
    Jessica Zhang
  • Mar 11, 2022
  • 6 min read

Surprise! We're bringing you some bonus content for this week! Since this past week has been incredibly hectic (we were really grinding out the nitty gritty of this project before our demo day) we separated our blog posts this week into two!


Mechanical

Last post we talked about how the placement of our IR sensors were a little too close to the wheels which caused our robot to fall off the edge of our table while turning. In order to remedy this we wanted to place the IR sensors on the outside of the bot to gain more distance to the wheels. However, we realized that we could actually fix this problem in an easier way. We just bent the leads on our IR sensors so they would angle away from the wheel and it was just enough to keep our bot on the table!

We also started organizing the insides of our robot, including protoboard placement, zip tying wires, wrapping them around the inside of the robot and making room for the pot. This is when we realized we had A LOT of loose wires due to the high number of separate sensors and components. We were able to fit them all in the pot but for the next design iteration we would probably develop some custom PCBs and some ribbon cables to reduce the number of wires.

Lastly, as a precautionary step, we wrapped pump in some paper towel to catch any drips that come out of the tubes (although we didn't see any when testing, but better safe than sorry!) and we put a ziplock back in our pot to catch any water that drips from the soil.


Electrical

With our electrical progress, there were no major changes as most of our components are finalized and connected. As a general summary our components include:


• 3 pairs of IR emitters/detectors for edge detection

• 2 ultrasonic sensors for object detection

• 2 motor drivers - one to control the wheels, one to control the pump

• one ESP8266 wifi module for sending battery and water tank information

• 2 battery packs and connectors for them

• 1 power switch

• 1 buck convertor to step down12v to 9v

• 5 LDR light sensors

• 1 moisture sensor

• 1 capacitive touch module for level sensing


We did have some issues with our ultrasonic sensors when testing light detection, edge detection, and object detection together. Our ultrasonics appeared to be having spurious detections. We spent some time researching why this would happen and some people on the Internet had some interesting insights including taking a moving-average to remove the spurious detections. Unfortunately, since our robot needs to be decently fast with edge detection this wasn't a good option for us. During this process we also noticed that the spurious detection were only occurring with one ultrasonic sensor (the right one). That's when we started thinking it may be a bug in our code, why else would it only affect one sensor and not the other? This led us to trying many things including resetting the detection flags to false in different areas of the code, changing the threshold values, the ping timeout values, etc. Nothing helped so we moved onto electrical debugging. We swapped the inputs on the Arduino between the two ultrasonics and noticed that now the software was telling us that the left sensor was making false detections (which is technically still the same sensor since we swapped the Arduino inputs). We decided to swap out the ultrasonic sensor with a spare one our classmate/roommate had and TADA our issue disappeared. So, in conclusion, it was a hardware problem.


Software

We also got our wifi module and a basic proof of concept app working! After a long couple of days of research, debugging, more researching and more debugging we were able to send to the database, read from it and update it on our app! See below for a quick demo of our app reading the updating values from our robot!



We also decided to take a quick trip to E7 today to test our wifi module with the Eduroam wifi. Unfortunately, we couldn't seem to get the wifi module to connect to Eduroam, and after researching a bit on the Internet, we realized this is a common problem and we concluded it was probably due to the extra security with Eduroam. We then tried to use a HotSpot but this also failed us. Again, according to the wise electronic hobbyists on the Internet, this was also a common problem. So, for now, we've gotten it working on our home wifi and we decided to record a video of our wifi module working to show for our demo. Then we'll look into this more before the symposium.


Firmware

Not much change was required for our firmware. Our logic that we mention in previous blog posts has been working well for us. This include the edge detection logic, object detection logic (with 15cm threshold), and the light detection logic. These also work well when integrated into our State Machine code.

We did have some minor issues with our code for the capacitive level sensing though. We realized we needed to recalibrate the level detection. We believe this was just due to changes in the environment or slight shifts in the connections from the wires to the copper tank. This might be okay though, as slight deviations is okay as long as we're in the correct ballpark for water level values. We'd have to keep investigating this over the next couple of days, but for demo purposes this should be acceptable.

A change we did end up making though is using a polynomial fit for mapping the capacitance readings to a water tank percentage. We noticed we were getting pretty big discrepancies for when the tank was full and close to empty. This is just due to non-linearity in the capacitance measurements.

ree

The polynomial fit worked really well, as you can see in the plot above, and when we tested this out with our system it also gave us pretty accurate results (with the exception of the upper and lower end of the tank due to non-linearities)! The video below shows us doing a fun verification game where Laura guesses the percentage of the water tank and Jess confirms how close it is. This allowed us to verify the accuracy!



Putting it all Together

The last step for us was to put everything back together and power everything with the batteries. Unfortunately, we encountered some bad news while attempting to do this. We found out we somehow fried our dc-dc buck convertor at some point during testing. We hadn't noticed it until now because we were powering the Arduino with our laptop since we wanted access to the serial monitor for debugging information meaning we weren't using the 9V output from the buck converter. When we plugged it back in we released we weren't getting 9V out of the converter. We probed the input and we were definitely getting 12V in from the batteries, but there was nothing coming out: prime evidence of blowing the component.

We didn't have another spare buck convertor, which meant there was no way to power the Arduino via the VIN pin (12V is too high and would likely fry our voltage regulator on the mega again). In the meantime, we would just have to continue powering the robot with both the 5V from our PC and the 12V from our battery and just make sure to hold the cable to prevent tangling when doing the demo.

All that aside, peep below for a final look at our robot! The lid isn't fully closed for the reasons we stated above, but for demo purposes this would be fine and we plan to fix things permanently for symposium next week!


ree
Plant Buddy ready for demo!

The Demo

We would say the demo went pretty well but the defining moment of our demo was afterwards when we got to talk to our professors about our buck convertor issue. They believe it was high amounts of current that blew our buck convertor, likely from the motors and pump due to the spikes in current when turning on and off the pumps. To remedy this they recommended adding a fuse just before the input into the buck convertor to make sure that if anything blows, it'll be the fuse which we can easily replace.

Unfortunately, Rigidware has neither fuses nor buck convertors so we'll have to figure out what our next steps for next week are and where we can get a buck convertor and some fuses. Additionally, we talked to our professors about the wifi module issue with Eduroam and they said it has been a common problem with a lot of other groups and that they're going to try and provide us with an alternative wifi, so we'll have to figure that out too when we get closer to Symposium date. And finally, our todo list for next week:


• Create and print our Symposium poster

• Film and edit our marketing video

• Replace our buck convertor and add a fuse

• Test ESP module with new wifi

• Permanently fix everything in place to finalize our product


So with that we head into the big finale of this 8 month journey next week! Stay tuned for our final blog post and come check us out on March 18th!

 
 
 

Comments


© 2022

bottom of page