Click on the links below to jump to the right section
10-02-21:
We started this project by creating an outline and overview of what we wanted to accomplish. Since the Spot Micro robot is an open-source project, we extensively researched current designs and created a plan to contribute to such a large project.
Our objective was to create a robot dog based on Spot from Boston Dynamics.
We completed a project draft, which organized our plans for the project.
We also created a parts list and cost estimate.
0/04/21-10/08/21:
We researched different types of builds for the robot (remixes of different designs)
Examples: Signal detection, robot arm, flashlight attachment, additional parts, Thingiverse remixes, etc.
Brainstormed potential design features or changes (stronger joints, additional accessories)
Looked at different hardware options and buying locations
We will need to acquire servos that are strong enough with the range of motion we need.
10/08/21: Completed peer review and looked at feedback
10-25-21:
Today, Ronit and I researched different possible designs to reference for our Spot Micro Dog. We came across multiple reference designs on Thingiverse, and we are currently debating between designs that use glue vs screws, 996R vs PDI servos, and other differences.
This week, we hope to reconcile the difference between designs and clarify our own design and build plan so that we can quickly purchase the materials needed for the project.
We are planning to follow this guide for our robot, however, we will make customizations and changes to the design.
10-26-21:
Today, we made some important decisions on our project.
We decided to use PETG as the main filament material for the project since the increased durability and flexibility in comparison to PLA is worth the more intensive printing process.
We also decided to use 996R servo motors from Amazon, and we will be following the SpotMicroAI version guide for our robot dog.
We will also use the Raspberry Pi Zero W as the main microcontroller for our project.
We are yet to decide a battery to power our project, but we know we will need :
a 5V Step-Down UBEC to power the Raspberry Pi
a 6V 20A Step-Down SBEC to power the Motors through a PCA motor controller board.
10-27-21:
Today I researched the specific components that we will be buying.
6V 20A Step-Down SBEC to power the Motors through a PCA motor controller board: https://www.amazon.com/HobbyKing-2-12S-Selectable-Voltage-Output/dp/B00USQZDFI
Rocker switches: https://www.amazon.com/ZUPAYIPA-Solder-Rocker-Switch-Toggle/dp/B01N2U8PK0/ref=sr_1_19?dchild=1&keywords=rocker+switch+basic&qid=1635341293&sr=8-19
PCA Board: https://www.amazon.com/SunFounder-PCA9685-Channel-Arduino-Raspberry/dp/B014KTSMLA
10-28-21:
Today, I still continued with identifiying the hardware we will buy:
I found black PETG filament to purchase: https://www.amazon.com/REPRAPPER-PETG-Printing-Filament-1-75mm/dp/B07YP4FQH5
10-29-21:
We finalized the parts list to buy. We are trying to use high-quality but affordable components. The total cost for electronic components will be $185.
We also began researching hardware components.
We plan to follow this guide for our electronics setup.
We plan to use the 3D models from this resource.
11-1-21:
Today, I purchased the electronic components. Most parts should arrive later this week. I also continued with researching the hardware components. We will need:
8 × 'M5×15'
40 × 'M4×20'
8 × 'M4×15'
48 × 'M4 nut'
4 × 'M3×20'
28 × 'M3×10'
16 × 'M3 nut'
8 × 'F625zz Flange ball bearing'
11-2-21:
Today, we created a list of hardware components to buy:
We will use a mixture of metric screws, nuts, and ball bearings for the leg motion.
11-03-21:
Today, we worked on our plan for 3D printing out the parts. We plan to use our personal 3D printers for greater color selection and control of the printing process.
11-04-21:
Today, I started printing out our 3D print PETG parts. We began by printing out the leg parts. We also finally purchased the hardware components.
11-05-21:
Today, we received the Raspberry Pi and 5V Buck Convertor. We began planning out how to print our other parts, as well. This weekend, we will continue to 3D print parts.
11-08-21:
Today, we laid out our different hardware, 3D printed, and electronic components. We are still waiting for the 20A Buck Convertor and the additional screws to arrive. We also need to 3D print out more parts.
We began preparing to print the robot's foot parts in TPU (a flexible material) today, as well. Hopefully, these parts will act like rubber and provide grip to the robot's legs.
From left to right:
Upper row - MPU6050 Sensor, 16 by 2 LCD Screen, PETG Leg Cover Parts
Lower row - 5A Buck Convertor, PCA Board #1, Ball Bearings, PCA Board #2, Raspberry Pi Zero W, Micro-USB Data Cable
11-09-21:
Today, we received the 20A SBEC. We also printed out two foot parts and a lower leg section for the robot. Besides the wires to connect the components, we have all the electronics we need. We plan to print out all the leg parts and assemble them first.
11-10-21:
Today, we began printing out the robot's exterior pieces in white PLA. The parts are very large (due to the size of the robot), so the print will take over 24 hours to complete. We have also figured out that printing will take the most time, so hopefully, we can work on other parts of the project while we print out the necessary parts.
11-10-21:
Today, we continued working with the 3D printed parts. We mocked up a plan for how to assemble the leg components. We plan to continue printing out more parts in the following weeks.
11-11-21:
Today, we were able to finish printing the bottom and top covers, and we started laying out the parts for one of the leg pieces. We also went to Mentor Matching Engine and requested a mentor for our project. Lastly, we got the extra M4 * 20mm screws today, so we have all of the hardware components for our project at this point.
11-12-21:
Today, we laid out all of the parts we 3D printed so far and got a sense for the scale of our robot. We also assembled one of the legs and realized that there were a couple of weak spots in the design. Ronit redesigned these parts to increase the thickness at the weak spots and I began to 3D print the upgraded leg parts. Also, the original Rear Cover snapped where the screws attach to the main body, so Ronit redesigned that component for more thickness as well. The redesigned version also has cutouts for the LCD Display and the Power Switch.
11-15-21:
Today, we continued to work with the 3D prints and hardware. We attempted to assemble one of the leg pieces, but the Leg Cover piece broke when hammering the bearing into place. We will likely need to sand the 3D printed part in order to improve the fit of the bearing. We also planned out how we will l print additional 3D printed parts.
11-16-21:
Today, we stress-tested the redesigned Leg Piece vs the old Leg Piece, and it was able to withstand the force we applied with our hands. The old piece was able to handle a good amount of force too, but it broke eventually, which proves that the redesign was necessary.
The part to the left in the image highlights the weak sections of the 3D printed part, which snapped when forces were applied.
The part to the right in the image shows the stronger, redesigned 3D printed part.
11-17-21:
Today, we tested the fit of various 3D printed parts. We 3D printed more front and rear pieces, which were modified in order to become more durable. We also did more research about the robot's parts and code. Unfortunately, some 3D parts and models are missing online, meaning we will need to create many of our own parts. We plan to continue 3D printing parts and assembling and soldering the electronic components.
11-18-21:
Today, we continued working with the 3D printed and electronic components. I brought in XT60 connectors so that we can connect our battery to the robot. We also planned out how to assemble and connect the other electronic components. We will use a mixture of pin connectors, XT60 connectors, and direct soldering to connect wires. We want to include multiple connectors to easily disassemble the robot. The connectors will let us separate 3D printed parts and electric parts without having to cut wires. For example, the robot's end piece has a switch and LCD screen. By adding a connector instead of directly wiring the parts, we can just unplug that single piece and make changes, instead of having to cut the wires.
11-19-21:
Today, we continued working with our electronics. I 3D printed the baseplate for the Raspberry Pi Zero W and the two PCA9685 boards. This part will hold those electronic components. The battery will sit below it, as well. I also 3D printed more leg components, including the middle leg part which I printed at reduced infill (from 100% to 50%) in order to save weight. Over the weekend, I plan to continue 3D printing parts.
11-22-21:
Today, we continued with testing our 3D printed parts. Over the weekend, I printed out the baseplate that will hold our circuit boards. I also printed out another front piece and the side panels to hold the board in place.
We will need to modify the side plates, however, because our battery's height means the side plates do not sit properly.
We will also need to modify the exterior pieces again, because due to the increased thickness of those parts, the interior pieces do not sit properly.
11-23-21:
Today, we did a mock assembly of the robot dog to get an idea of how the parts will fit. We will definitely need to modify the designs to improve the fit of different parts.
Parts to modify:
Middle leg portions and the joints (we need to modify how the servo horns fit into the 3D printed parts)
Exterior pieces (we will need to make these thinner)
Interior connector pieces (we will also need to make these thinner)
Side panels (we will need to adjust how these fit with the baseplate)
11-29-21:
Since we just got back from a Thanksgiving break, we were not able to work on the robot for several days.
Today, we continued testing how the different 3D printed parts fit together. We likely will make the outer pieces thinner, which should help us maintain the functionality of the inner prints and not have to change them.
I also looked into the robot's code. We should be able to use the code from a previous person's build, but we might need to modify parts of it to make it work with our robot.
11-30-21
Today, I printed out a new upper leg part. This part fits our motor's "servo horn" better, which means it will connect to the robot and to the servo better. I will need to continue printing these parts for a total of 4 upper lag parts.
I also tested more 3D printed parts. We have decided to make the outer pieces thinner in order to make sure the internal parts fit properly. This will reduce weight and improve the ease of assembly, but we do have some concerns about the parts breaking.
12-1-21:
Today, we continued working with the 3D printed parts. I started to redesign the 3D models with Inventor CAD software to improve the assembly process and stability of the robot.
I modified the baseplate's side panels to have different notches. These notches hold the baseplate (which has all of our circuit boards) at a specific height above the battery. Originally, these notches were not at the right height.
I plan to continue 3D printing more parts in the following days.
12-2-21:
Today, I modified the baseplate's screw holes to thread more tightly. The original part held the circuit boards loosely, but we want there to be a tighter fit to hold the electronics better.
I also continued with 3D printing more leg parts, including additional joints.
12-3-21:
Today, I tested the fit of our leg parts with the main body.
The bearing is somewhat loose when connected to the robot's shoulder part, so we will probably need to glue it.
We will need to test how the parts thread together with screws. Currently, there are some issues with the spacing of parts.
12-6-21:
Today, I continued working with the 3D-printed parts.
I tested how the front and back portions will connect together. I assembled the servo motor with a joint piece, then I tested how those two parts would fit into the back frame.
I also continued modifying the models of the different 3D-printed parts. I changed some of the fit with the mid-leg part, but I still need to modify it more.
12-7-21:
Today, I continued modifying the mid-leg part. The 3D model's geometry is very complicated, but I was still able to change the part. I added extrusions to the portion that holds the servo horn in place. This will ensure the servo can rotate properly.
12-8-21:
I redesigned the baseplate's side panels. I had modified them before but had to redo them again to fit better.
I also did some more research on the part assembly. It turns out we have to use at least 8 star-shaped servo horns (we have 12 total star-shaped servo horns). We also can use either 4 star-shaped servo horns or 4 oval-shaped servo horns for the legs (we have 12 total oval-shaped servo horns). I plan to use the oval-shaped servo horns for the legs because that would give us spare servo horns in case we break or lose any.
12-9-21:
Today, I printed out the side panels. They worked out perfectly and the main board fits between the notches well.
The image shows the original side panel on the left (with one notch) and the redesigned side panel on the right (with three notches).
We also did another mock-up of our Robot Dog using the new parts and electronics
12-10-21:
Today, I continued working on redesigning the mid-leg part.
Instead of reprinting the entire piece, I only printed out the section I redesigned in order to test the fit with the servo horn.
I still need to modify the part to make the servo horn fit, as it still doesn't sit properly.
12-13-21:
Today, I continued modifying the mid-leg part.
I have to edit the part by changing less than a millimeter of material because of the tolerances of the part.
I also have to reprint the part after I redesign it, which can take up to 30 minutes even though the part is quite small.
12-14-21:
Today, I continued modifying the mid-leg part.
I also printed the rear-inner shoulder part (shown below) again, as there were issues with the original 3D-printed part.
12-15-21:
Today, I continued modifying the mid-leg part.
I reprinted the part multiple times to test the servo horn fit.
12-16-21:
Today, I continued modifying the mid-leg part.
I reprinted the newest revision and the servo horn fit properly. The difference between the original part and the modified part is shown below.
Outer dimensions
Original part: 10.816 mm
Modified part: 6.537 mm
Inner dimensions
Original part: 10.256 mm
Modified part: 6.775 mm
12-17-21:
Today, I printed out the entire redesigned leg part. Over winter break, I will print 4 separate parts for all 4 legs (2 left parts and 2 right parts)
12-18-21 to 12-31-21:
I printed out more 3-printed parts over break.
1-4-22:
We just got back from winter break, and I brought the parts I printed at home to school.
I started to assemble the leg components.
I will need to reprint the joint parts, because the ones I printed previously had many errors.
I might need to reprint the lower leg parts because some are low quality, although they should still function.
I removed supports from the reprinted rear-inner shoulder part, as well. The original part also had some errors. Luckily, the outer shoulder part printed out fine initially.
1-5-22:
Today, I reassembled the rear shoulder assembly. I replaced one of the printed parts, as the original part had errors and was more likely to break than the reprinted part.
I also added nuts to the assembly to secure the parts better, as originally I just threaded the screws into the 3D-printed plastic.
I also replaced the shoulder joint piece with another reprinted part, which should be much stronger.
1-6-22:
Today, I worked on the assembly of some of the parts.
I discovered that the servo horns can be screwed into the motors with M3 screws, but the ones we have (M3x8mm) are too long and will not properly work.
I also noticed some wobble with the servo horn when it was placed in the rear outer shoulder part. I will likely have to modify the part to fit better.
Reprinted part (left) and original part (right)
1-7-22:
Today, I began modifying the outer shoulder part with Inventor CAD software to fit the servo horn better.
I also continued with reprinting more parts, including joints and shoulder parts.
1-10-22:
I continued with modifying the outer shoulder part with Inventor CAD software to fit the servo horn better.
I reprinted test versions of the piece and got the servo horn to fit properly. Now I will need to reprint two sets of the modified parts.
I also may need to reprint two of the right shoulder pieces, as the supports are interfering with the part.
1-11-22:
Today, we planned out the assembly and testing for the robot.
I will assemble 4 legs (consisting of 3 motors, one lower leg part, one mid-leg part, one mid-leg cover part, and one shoulder/joint part per leg)
Once Ronit finishes creating the wiring and electronics, we will test the legs.
I also wrote to our mentor on Mentor Matching Engine to discuss potential issues we may have with our assembly and testing process.
3D-printed parts may not fit properly
The motors might not work properly with the electronics
1-12-22:
I organized our 3D-printed parts and laid them out to see what parts we still need to print.
I put the broken, old, or low-quality parts in separate boxes from the new parts.
I partially assembled the shoulder sections for the robot.
Tomorrow, I plan to create a mock assembly of the robot and prepare the 3D-printed parts for assembly.
1-13-22:
Today, I began to assemble the robot's parts. I created two legs, complete with the cover part, lower leg part, mid-leg part, and shoulder part, along with three servo motors.
I only used one screw (instead of all 4 screws) to secure the servo horn, as we will likely need to dissassemble the parts later.
I also partially assembled the middle section.
1-14-22:
Today, I assembled two additional legs (to have four total).
I also assembled the main panel to the frame/chassis of the robot.
Using the parts we have assembled, I created a mock-up of the robot design to see how it will look when finished. We still need to replace some of the parts and finish the electronics and code.
I will still need to print more shoulder joints, another lower leg part, and two more servo horn shoulder parts.
I also purchased new screws to secure the servo horns. The new 3M x 6 mm screw is on the left while the original 3M x 8 mm screw is on the right. The shorter length enables to screw to better secure the servo horn to the motor (the original screw is too long)
1-18-22:
Today, I brought in some of the parts I reprinted over the weekend.
I created more shoulder joints for the robot.
I reprinted two of the lower leg pieces.
I printed a test part to test the fit of an inner piece.
In regards to the servo horn fitting into the inner piece, only one side fits properly. I will need to 3D model and reprint that part.
I redid some of the assembly. I added screws and nuts to a lower leg part. I also added screws to the servo horns.
I plan to redo the inner piece and remake it (2 versions, one for each side of the robot).
I also plan to print out an extra shoulder joint for the right side.
1-19-22:
Today, I continued with the assembly of the legs.
I secured the parts with more nuts and screws.
I tested the servo horn fit with the reprinted part. Everything fits well, but I will have to see if the servo will rotate properly.
Ronit also gave me the white PETG filament to print, as he is having issues printing the filament on his own printer.
I will need to print:
1x Rear shoulder assembly part
4x mid-leg covers
Tomorrow, I plan to reassemble the legs with the new parts
1-20-22:
Today, I continued with the assembly of the legs.
I secured the parts with more nuts and screws.
I replaced the lower leg part for one of the legs with an upgraded version.
I also replaced the joint part of one leg with a higher-quality part.
I printed two copies of the modified rear shoulder assembly part. It should fit the servo horn better now.
I still need to print:
4x mid-leg covers
Tomorrow, I plan to continue with the legs.
I will need to add the new leg covers to all four legs and secure them with screws
I will need to add the motors to the joints of three legs.
I also plan to work on the chassis assembly.
I need to replace the shoulder assembly parts.
1-21-22:
Today, I continued with the assembly of the legs.
I secured the parts with more nuts and screws.
I also reprinted one of the mid-leg covers. I changed the orientation of the print to hopefully reduce the risk of it snapping or breaking.
As well, I tested the reprinted mid-leg cover piece's fit with the ball bearing. It fits much better than the original cover piece.
1-24-22:
Today, I continued with the assembly of the legs.
I secured the parts with more nuts and screws.
I also added the new mid-leg covers which I reprinted.
We also acquired an Xbox One wireless controller to use for our robot. We hope to be able to download the code soon and test the legs and electronics.
1-25-22:
Today, I completed the assembly of the legs and added them to the main body to see how everything will fit.
There are some spacing issues in the leg parts. I plan to 3D model and print a spacer piece to add to the legs to prevent the servo horn from moving and disconnecting the motor from the bearing.
I also plan to get the software ready for the robot. I will need to download several different programs and prepare the Micro SD Card to be used in the robot.
1-26-22:
Today, I added spacers to each joint of the robot (for a total of 4 spacers). This prevents the servo horns in the joints from being shifted out of position, but the spacers also add friction to the rotation of the joint, which may be a problem.
Because we also have issues with the servo horns moving out of position on other parts of the robot (the upper leg and lower leg servos), I will likely print 8 more spacers (4x for the upper leg, and 4x for the lower leg).
I also attached the lower panel cover to the robot. It fits well, but we still need the front and rear parts for everything to fit properly.
I will also need to print another front part, because the original part broke.
1-27-22:
Today, I continued with adding spacers to each joint of the robot (for a total of 8 spacers).
4x spacers on the lower limbs
4x spacers on the upper joints
I still need to reprint another mid-leg cover. I also need to add more screws to the leg assembly.
We also briefly added the exterior pieces to the robot to see how everything will look when the robot is finished.
1-31-22:
I continued working with the construction of the legs.
I modified the design of the mid-leg cover to reinforce it. I printed out the new design and it worked well. Hopefully, it will be less likely to snap or break.
I still need to print 3 more of the leg cover parts (1 more for the right side leg and 2 more for the left side legs)
We also connected the servo wires to the 2 PCA boards.
I plan to take the electronics and the assembled legs home in order to download the code and set up the electronics. We need access to wifi and custom computer programs to set up the Raspberry Pi Zero W, which means we can't do it at school.
MG996R Servo Motor Wiring Diagram
Raspberry Pi Zero W
2-1-22:
Last night, I took the electronics and the assembled legs home in order to download the code and set up the electronics.
Unfortunately, I was not able to get the Raspberry Pi Zero W set up with my router or WiFi network.
I will likely need to troubleshoot issues and see if I can make the Raspberry Pi work properly.
Other people have experienced similar issues: https://forums.raspberrypi.com/viewtopic.php?t=201850
I am using the following two resources to both set up the electronics and install the functioning software:
2-2-22:
Today, I continued trying to troubleshoot issues with the Raspberry Pi Zero W.
We tried connecting a data transfer cable, but it would not connect to the computer properly. We were not able to transfer any files with the cable.
We also still can't get the WiFi connection to work. We tried plugging in both a power supply cable and the data cable, and even though the Raspberry Pi lights up, we can't get it connected to the computer.
Raspberry Pi Zero W Layout
2-3-22:
Today, I continued trying to troubleshoot issues with the Raspberry Pi Zero W.
I still cannot get the Raspberry Pi to connect to my computer. I have thought of 3 potential issues:
The cables I am using don't work. Even though the Raspberry Pi lights up when connected, my cables might not be the best for data transfer. I might want to try different Micro-USB cables.
The files on the Micro SD Card in the Raspberry Pi aren't set up properly. To use the Raspberry Pi, you have to set up certain ssh files. If I set them up wrong or if the Micro SD Card get corrupted, the files won't work.
The Raspberry Pi itself is not working properly. Even though it lights up when plugged in, the WiFi or data transfer might not work. If this is the case, we will likely need to purchase a new Raspberry Pi.
Raspberry Pi Zero W Layout
Raspberry Pi Zero W Layout
2-4-22:
Today, I continued trying to troubleshoot issues with the Raspberry Pi Zero W. I did some more research online, and I think I will try downloading different software and then try to connect the Raspberry Pi to WiFi.
Most likely, I will take home the electronics next week and try to set up the Raspberry Pi at my house again.
Besides working with the electronics, I also did post-processing on the TPU 3-D Printed foot parts. I cleared their supports and added them to the Robot Dog's feet, but did not glue them yet.
2-7-22:
Today, I replaced some of the leg parts. Some of the mid-leg covers cracked, so I printed out more of the newly-designed, reinforced parts. I also added the spacers to the legs to make sure everything aligned properly.
Hopefully, we will be able to bring the robot to one of our houses this week to get the WiFi functionality set up.
2-8-22:
Today, I redesigned and reprinted some new spacers. I made them slightly thinner to improve how well the legs could rotate. I also added some spacers to the upper joint parts, which now means there is no excess wiggle.
I plan to test the legs soon with the code, and then add them to the main body again.
2-9-22:
Today, I worked on reprinting more parts.
I printed a new front cover part, as the old one broke along one of the edges.
I also printed an extra mid-leg cover for each leg (1x right and 1x left) in order to have spare pieces in case the current ones ever break.
2-10-22:
Today, I worked on assembling the rear cover, as Ronit had finished re-doing the electronics with that part. We will have to be careful with the 3D-printed plastic.
Over the weekend, we plan to work on setting up the software with the electronics.
I also printed out parts to hold ultrasonic sensors in the front of the robot. Although we don't plan to add sensors yet, we just have the parts in case we decide to add them later in the build.
2-11-22:
We also were able to get the WiFi set up with the Raspberry Pi. We had to change a few aspects of the project to do so:
Instead of using the files from GitLab (which uses "PINN"), we decided to follow a YouTube tutorial that uses Raspbian.
Using these files, we were able to turn on the Raspberry Pi and it automatically connected with the WiFi.
Using the Windows Command Prompt, we were able to "ping" the Raspberry Pi on the local network.
Using the ping, we were also able to access the IP Address of the Raspberry Pi, which lets us verify that it is working.
Over the next few days, we hope to upload the rest of the code to the robot. Right now, we just have the WiFi connection enabled. We still need to download the code that runs the robot.
2-14-22:
Now that we have the WiFi set up, we began following the next steps for getting the software ready.
We used these steps for the process: https://gitlab.com/public-open-source/spotmicroai/basic-instructions
We are currently in the process of completing step 3, which primarily consists of setting up the controller.
However, we ran into issues trying to run this line in the Windows Command Prompt:
curl https://gitlab.com/custom_robots/spotmicroai/basic-runtime/-/raw/master/utilities/self_install.sh | bash
Based on our research, we found that the "curl" function (which should upload the entire file from GitLab to the Raspberry Pi over WiFi) is no longer supported by GitLab and we need something called a "private access token" to curl files from a repository. I am not sure how to get this since even though the repository is for public use, we do not have private access to it.
Hopefully, we should be able to find another way to run this software.
2-15-22:
Today, we continued working with setting up the wireless Bluetooth Xbox One Controller.
Instead of using the "curl" function to link the GitLab .sh file to the Raspberry Pi, we manually entered every single line of the file into the Windows Command Prompt.
See the file below:
We were able to partially install this software, but we weren't able to successfully run every line of the .sh file.
We also did not set up the other part of Step 3, which was to enable I2C.
We likely will need to continue working with this software in the following days.
2-16-22:
We began working on setting up the I2C function for the Raspberry Pi.
In the Windows Command Prompt, we went to the Raspberry Pi's Interfacing options, then selected the setting to Enable I2C.
I2C is a communication bus that lets us connect in serial (daisy connection) many devices.
A daisy chain or connection is a wiring scheme in which multiple devices are wired together in sequence or in a ring, similar to a garland of daisy flowers. Daisy chains may be used for power, analog signals, digital data, or a combination of them.
RaspberryPI has I2C bus capabilities and it also has the needed pull-up resistors built in, so we just need to connect to it the devices.
Every connected device must have a different I2C address, usually, if you have 2 of the very same board you need to solder a pin or reconfigure a jumper to change one of them and their I2C hardware address.
The I2C bus allows multiple devices to be connected to the Raspberry Pi, each with a unique address, that can often be set by changing jumper settings on the module. It is very useful to be able to see which devices are connected to your Pi as a way of making sure everything is working.
Along with this I2C functionality, we can check if we have any device connected to I2C in order to know its address. We will need the address in our Python script later to use it. Essentially, every device has its own "ID" which can tell us which device is connected.
To check the I2C devices, we can use the following commands in the Windows Command Prompt:
ssh pi@192.168.1.XX
i2cdetect -y 1
This will give us all the I2C addresses in the area.
Next, we plan to sync the Bluetooth Xbox One Controller with the Raspberry Pi.
Notice the empty address information, as no devices are detected
Notice the different I2C addresses, each one is a connected device
2-17-22:
We began working on setting up Bluetooth Xbox One Controller.
There are several steps needed to sync the controller with the Raspberry Pi.
To connect to theRaspberry Pi, these commands are required to be run in Windows Command Prompt:
ssh pi@192.168.1.XX
sudo bluetoothctl
agent on
default-agent
scan on
The commands set up the Bluetooth scanning options.
After these lines are entered, different Bluetooth addresses will start popping up.
The controller is in the following format:
[NEW] Device XX:XX:XX:XX:XX:XX Wireless Controller
With this address and with the controller in pair mode, we connected to it with the following line:
connect XX:XX:XX:XX:XX:XX
On Windows Command Prompt, there was an attempt to connect and finally, it got paired.
We then made the the RaspberryPi remember that controller, so every time we switch it on, it will connect to it automatically:
trust XX:XX:XX:XX:XX:XX
We had several issues getting the Xbox Wireless Controller to connect.
The controller would sometimes stop Bluetooth pairing. We had to manually turn on Bluetooth pairing and ensure it stayed on, otherwise it wouldn't connect.
In Windows Command Prompt, even when we entered the connect XX:XX:XX:XX:XX:XX line, it would sometimes fail to connect. We just had to keep entering the line over and over until it finally paired properly.
Helpful resources:
Notice the various different lines for Bluetooth connectivity. Here is what each one does:
sudo bluetoothctl enables the Bluetooth options.
It is a command-line utility that allows you to connect and pair with Bluetooth devices efficiently.
agent on registers a function to process messages sent from the agent to the device.
default-agent sets up a default "Bluetooth agent."
The Bluetooth agent is what manages the Bluetooth 'pairing code'. It can either respond to a 'pairing code' coming in, or can send one out.
Not using an agent will mean the 2 devices cannot negotiate the 'pairing code'.
scan on enables the scanning of Bluetooth devices. Specifically, it starts the discovery of all the local Bluetooth addresses (including remotes, smartwatches, and the Xbox Wireless Controller).
connect XX:XX:XX:XX:XX:XX makes an attempt to connect to the specific device. In our case, that means connecting to the Bluetooth address of the Xbox Wireless Controller,
trust XX:XX:XX:XX:XX:XX makes the RaspberryPi remember that controller, so everytime you switch it on, it will connect to it automatically.
All the Bluetooth addresses are listed after the sudo bluetoothctl is entered
Notice the Xbox Wireless Controller device address:
Device C8:3F:26:87:77:13
Next week, we plan to test the functionality of the Xbox Wireless Controller.
2-22-22:
Today, we worked on testing the Xbox Wireless Controller.
We checked if the Xbox Wireless Controller was connected with the following commands:
cat /proc/bus/input/devices
ls /dev/input/js*
cat /proc/bus/input/devices will provide the needed information for all devices except USB multimedia/office keyboards.
ls /dev/input/js* checks if a joystick is connected (it gives a listing of all of the input devices).
It will also give details about the joystick (named "Xbox Wireless Controller Consumer Control", shown in the image below).
Identifying the joystick devices
We also were able to test the controller's buttons and axis functionality with the following command:
sudo jstest /dev/input/js0
This command shows a screen with different numbers, which represent the movement of the axis and buttons of the controller. Pressing them shows how that movement is detected. One can move the joystick around to see the data change.
Testing the joystick functionality
Tomorrow, we plan to work with setting up the motors and testing them with the code.
We will use this guide to help us complete this step: https://gitlab.com/public-open-source/spotmicroai/basic-instructions/-/tree/master/4.%20Auto%20boot%2C%20configuration%20file%20and%20calibration
2-23-22:
Today, we worked on setting up our i2c addresses, which correspond to the various electronics on the robot.
We reference a file with Windows Command Prompt to do so:
ssh pi@192.168.1.XX
nano ~/spotmicroai.json
The default config file will be generated from this source: https://gitlab.com/custom_robots/spotmicroai/basic-runtime/-/blob/master/spotmicroai.default, which assumes we have 2 PCA9685 boards, 1 LCD 16x2 I2C screen and the GPIO 17 port mapped to the 0E port in the PCA9685 boards as explained in the Electronics repository at https://gitlab.com/custom_robots/spotmicroai/electronics
We used the command i2cdetect -y 1 to identify the i2c addresses.
It will give us information about the electronics connected to the Raspberry Pi.
Link to i2c addresses and devices: https://i2cdevices.org/addresses
In the next few days, we hope to continue working with our software and get everything set up properly.
2-24-22:
Today, we continued working on setting up our i2c addresses.
We were able to identify that the PCA boards were connected to the Raspberry Pi, as they showed up on the list of all i2c devices.
We will need to redo some of the wiring and change the GPIO port (17) to another port number.
We will also need to adjust the code based on our LCD screen, as the LCD screen in the original code uses I2C, while ours does not.
Hopefully, we will be able to complete the changes to the wiring and test the servos within the next few days.
LCD i2c Screen
2-24-22:
Today, we continued working on setting up our i2c addresses.
We have to edit one of the files on Gitlab, ~/spotmicroai.json
We will have to edit the code because some of our wiring and devices are different. We will also need to write in the i2c addresses and other settings.
We should be able to finish calibrating all the servos by next week. After that, we can move to setting up the manual control code.
Calibrating servos with Windows Command Prompt
This is how the robot should be set up for configuration (the robot shown is not ours, it is just an example):
2-25-22:
Today, we continued working on setting up our servos for testing.
We disconnected all 12 servos from the main robot and removed them. We plan to test the legs separately so that we make sure they work properly before reinstalling them onto the robot.
Over the next few days, I plan to work on setting up the Raspberry Pi, code, and servos in order to get everything working.
2-28-22:
Today, I brought home the robot to try and get it to work at my house with the WIFi.
I worked on setting up various files in order to run the Raspberry Pi.
I changed one file to enable it to work with my home WiFi network.
3-1-22:
Today, we continued working on trying to set up the software.
I used Windows Command Prompt to prepare the Raspberry Pi.
With my computer at home, I connected the Raspberry Pi to my WiFi and began uploading different files to run the software, although there are some steps left.
I enabled I2C and checked if all the devices were connected, just like I did previously (on 2/16/22). I was able to confirm that the 2 PCA boards were connected (in ports 0x40 and 0x70).
Tomorrow, I will go onto the next steps and do the Xbox One controller testing.
Running the Raspberry Pi with all the electronics connected
3-2-22:
Today, we continued working on trying to set up the software.
I tested the Xbox One controller, using the same process as the previous time (2/17/22-2/22/22).
I was able to successfully connect to and read the data from the Xbox One controller.
Testing the axis and buttons of the Xbox One Controller
3-3-22:
Today, we continued working on trying to set up the software.
I began both editing and uploading the .json file.
"JSON format is used for serializing and transmitting structured data over network connection. It is primarily used to transmit data between a server and web applications. Web services and APIs use JSON format to provide public data. It can be used with modern programming languages." (Source: https://www.tutorialspoint.com/json/json_quick_guide.htm)
I edited the .json file to work with our specific I2C addresses, which were different than the ones found online.
Essentially, this file ensures we send data to the correct I2C addresses, which is how the PCA boards are connected.
This weekend, I will work on setting up the servo calibration software.
3-6-22:
I began working on setting up the calibration tool. It is a python file that enables the setup for the robot's servos and legs.
To access the file, we have to run certain lines in the Command Prompt:
ssh pi@192.168.1.XX
cd ~/spotmicroai/calibration
./calibration.sh
ssh pi@192.168.1.XX Enables access to the Raspberry Pi.
cd ~/spotmicroai/calibration cd "is a command-line shell command used to change the current working directory in various operating systems." In this case, it goes through the "spotmicroai" folder, then through the "calibration" folder to locate a file.
./calibration.sh This runs the .sh file in the current directory (./ means "Current Directory" and calibration.sh is a shell script which can be executed in a terminal).
We initially had some issues with getting this command to work, but we fixed it by making some changes to both the file and to the folders in the sd card.
These results in Windows Command Prompt show how we initially had issues with accessing the calibration.sh file. We solved this issue by setting up the folders properly and then changing the commands in the .sh file from "venv/bin/python3" to "python" (see more details in the following pictures).
These results below shows how we were able to successfully run the calibration.sh file, although we encountered an error with the Python code it was referencing.
This image shows the calibration.sh file.
To run this file, we had to make several changes.
First, we moved it to the proper folders so that the "cd" command could locate it properly.
Next, I changed the highlighted line (line 6).
I changed "venv/bin/python3" to just "python"
This change was made because the venv command is to use a "virtual environment", which we are not doing for this project. The "python" command simply runs the .py file (the calibration.py file).
Unfortunately, while we can access the calibration.py file, I can not completely run it because we do not have the proper modules.
3-7-22:
I continued with working on the software.
As shown below, there was an Import Error with line 3 of the python code, which is to "import busio".
"The busio module contains classes to support a variety of serial protocols. When the microcontroller does not support the behavior in a hardware accelerated fashion it may internally use a bitbang routine." (Source: https://docs.circuitpython.org/en/latest/shared-bindings/busio/index.html)
We do not have the busio module installed, and I will need to figure out how to install it properly.
3-8-22:
I continued with working on the software.
I did some research online for how to get the busio module installed:
Installing CircuitPython Libraries on Raspberry Pi: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
I followed the steps from this guide to install Blinka.
"Blinka is a Python library that provides the CircuitPython hardware API compatibility layer for SBCs, like the Raspberry Pi, so that they can run CircuitPython programs using the standard Python interpreter."
"Blinka translates the CircuitPython hardware API to whatever libraries the Linux board provides. On the Raspberry Pi, for instance, the RPi.GPIO library is used for GPIO access, the spidev library is used for SPI, and ioctl messaging is used for I2C. This allows us to use the CircuitPython built-in libraries, e.g. board, microcontroller, digitalio, etc. so that our CircuitPython programs can be agnostic to the hardware they are running on and just work as expected."
"CircuitPython adds hardware support to the Python language along with a large selection of hardware libraries. With Blinka, we can take advantage of those fantastic libraries developed for CircuitPython and use them in our SBC based projects."
For the first step, I updated both the Raspberry Pi and Python.
Running the standard updates:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
and
sudo pip3 install --upgrade setuptools
After this, we ran a script to ensure that the Pi is correctly configured and to install Blinka. It requires just a few commands to run. Most of it is installing the dependencies.
cd ~
sudo pip3 install --upgrade adafruit-python-shell
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py
sudo python3 raspi-blinka.py
This is what the Command Prompt shows after running the script:
This screenshot shows how Blinka is installed and how different functions are enabled (I2C, SSH, etc.)
After Blinka is installed, we have to reboot the Raspberry Pi:
Once we reboot and reconnect to the Raspberry Pi, we then check if the I2C and SPI are enabled:
We run a command to check if the I2C and SPI are enabled::
ls /dev/i2c* /dev/spi*
And it returns the following response:
/dev/i2c-1 /dev/spidev0.0 /dev/spidev0.1
I then try to run the calibration.py file again:
As shown above, we were able to successfully install the busio module. Unfortunately, we are still missing other modules that are required to run the code.
In line 5, there is a ModuleNotFoundError (No module named "adafruit_pca9685').
I researched how to install this module online, and found some more resources.
3-9-22
I continued working on the software.
Essentially, I had to install 3rd-party and external modules from the internet to get the python code to run. These modules were not included in the SpotMicro guide, which is why I had to search the internet to find them.
I attempt to install some different programs ("adafruit_pca9685" and "build-essential python-dev" from GitHub):
I then try to run the calibration.py file again. Unfortunately, we are still having the same error on line 5 with "No module named 'adafruit_pca9685' "
3-10-22
I continued working on the software.
Since we were able to get further into the code, yet we still had errors with locating more modules, I continued trying to troubleshoot the issue.
I primarily downloaded more files from the internet to get the modules to work properly.
I installed additional files in order to access the module:
I then try to run the calibration.py file again. We were able to successfully fix the error on line 5 with "No module named 'adafruit_pca9685' "
Unfortunately, there is another error on line 6, as there is "No module named 'adafruit_motor' "
As a result of lacking the "adafruit_motor" module, I attempt to install "adafruit-circuitpython-pca9685"
The python file was successfully able to access the "adafruit_motor" module, yet we have another error on the next line: "No module named 'pick' ".
We were able to install and access the "pick" module, but we have another error on line 13: "No module named 'spotmicroai' ".
3-11-22
I continued working on the software.
I discovered that the "spotmicroai" module is a custom module created by the original spotmicro controller programmer, Fran Ferri. This is different that the other modules, which were more common in use for general programming and electronics, while this specific module is just for running the robot dog.
I discovered that the line of code was referencing another file in the Spotmicro directory on GitLab.
As shown below, it is locating and importing a Python class from spotmicroai/utilities/log.py, which is a separate Python file.
The log.py file is shown below. It establishes the "Logger" class, which is used by the calibration.py file, which we are using to test the servos.
In addition to the "log.py" file, the "calibration.py" file is also referencing another Python file, "config.py", which helps to set up the proper channels for the servos to run. The "config.py" file is shown below.
Next week, I plan to continue setting up these files to run the servos.
3-14-22
I continued working on the software.
Instead of referencing an external file, I just decided to copy and paste the other Python files into the main "calibration.py" file, which directly controls the servos. I also got rid of some of the lines of code which request certain modules. Hopefully, this will not cause issues in the future, but we may need to install the modules again if we run into problems.
The different files are shown below. Notice the differences in lines 13 and 14, as well as all the following lines.
Original "calibration.py" file:
Modified "calibration.py" file:
3-14-22
I continued working with the software.
To set up the servos and electronics with the code, I checked to see if the PCA boards were connected to the proper I2C addresses.
I also worked on physically plugging in each of the servo cables into the 2 separate PCA boards. I also ensured all the electronics were working properly.
After setting up the electronics, I was actually able to run the code and test the servos. The video below shows how I tested the foot of one leg.
Unfortunately, one of the PCA boards was not connecting properly, meaning we could not run the two legs connected to it (only the other two legs, which were connected to the other functioning PCA board).
This week, I hope to continue testing the legs and getting the controller set up to work, as we are currently using the computer to manually adjust each leg.
3-15-22
I continued working with the software and testing the servos in the robot's legs.
I was able to run the "calibration.py" file on Windows Command Prompt, and the following text appeared (see image below):
I am able to select which exact servo I wish to test. Information about which part the servo controls, the PCA number, channel number, and angle are shown in each line (Ex. rear_shoulder_left - PCA [1] CHANNEL [4] - ANGLE [90] )
Upon selecting the servo, I can write a number to adjust the angle of that specific servo. It also shows data, such as the PCA9685 address, frequency, and rest angle.
Unfortunately, we can only access one PCA board (which has the 0x40 I2C Address). I will need to figure out how to add the second PCA board.
Despite only one PCA board working, I was able to test the servos controlled by it. See the videos below for how I tested the servos.
This video shows the strength of the servo. The lower servo is able to lift and bend the entire leg off the ground.
This video shows how the code "locks" the servo into position to prevent the legs from collapsing under the weight of the robot. The top leg has no electricity running through the servo, enabling me to rotate it easily. The bottom leg is being ran by the electronics, and thus is "locked" into place and does not rotate, even if I apply a force or pressure to it. It can only be rotated when the Python code commands it to.
This video shows the range of motion of the servo. It can open and close up to 90 degrees, which gives it a large range of motion.
Unfortunately, the capacitor on the PCA board started smoking, which meant we could not use it. We discovered that the voltage regulator (the SBEC), which controls the voltage for the PCA boards, was set to 5.5 volts, not 5 volts. The maximum voltage the PCA boards can take is 5.5 volts, although it should be at 5 volts to safely run. We think this is what caused the capacitor to burn out.
Lastly, Ronit and I worked on setting up a router in our technology room at school. We got it running, but we haven't been able to connect it to our computer or Raspberry Pi yet.
3-16-22
I continued with working on the software and testing the servos.
We were not able to get the school's router to connect. For some reason, it can show up on my computer, but not connect to the Raspberry Pi.
As an alternative, Ronit set up a hotspot using the WiFi network SSID and password which was set up initially (from when I brought the robot home).
This actually worked, and both the computer and the Raspberry Pi were able to automatically connect.
We initially tried to find its IP address using different commands in Windows Command Prompt.
Eventually, using Ronit's phone, we were able to identify the IP addresses of the devices which were connected. This enabled us to immediately locate the Raspberry Pi's IP address, which was 192.168.43.76
We made sure the Raspberry Pi was connected by directly pinging it through Windows Command Prompt.
We then set up the SSH functionality:
Unfortunately, although the WiFi connected properly, we had some issues with the Raspberry Pi detecting the I2C devices (such as the PCA boards):
Since we were able to connect to the PCA board, I ran the Python file to test the servos:
I attempted to run a servo, yet the servo did not rotate at all.
Note: the "ValueError: invalid literal for int() with base 10" refers to the fact that we input "^[" into Windows Command Prompt to exit the testing code. This is how the code is meant to work, as it will only accept inputs 0-90 or pressing the "Enter" key. Inputting another command will exit the servo testing code, which is how it's meant to run. Essentially, that "error" is expected.
I attempted to run a different servo to see if the problem was specifically only with the servo we were testing. Unfortunately, this servo also did not run at all.
Testing the other PCA board also brought an error, just like the one I experienced at home. It seems like the other PCA board is not connecting properly.
Unfortunately, the Raspberry Pi also disconnected, so we had to end testing for today. Hopefully, tomorrow we can both get the other PCA board working and get the servos to run.
3-17-22
Today, I continued working on the software.
I started by connecting to the Raspberry Pi. Although it initially failed to connect, we got it to work with Ronit's hotspot, just like yesterday.
In addition, I tried to scan for I2C devices, but none showed up.
I reset the robot, and then detected the I2C devices again. Both 0x40 and 0x70 addresses showed up on Windows Command Prompt.
We did some research online and found that we can actually change the addresses of the PCA Boards using the solder pads on the PCB: Page 13 https://cdn-learn.adafruit.com/downloads/pdf/16-channel-pwm-servo-driver.pdf
Moreover, we know now that one PCA board actually has two I2C addresses, 0x40 and 0x70, so when we saw both values on the command prompt, we were actually only seeing one. This could also be why both PCA boards are not running -- they are overwriting each other.
Ronit soldered the A0 pads to change the I2C address of one of the PCA boards to 0x41. We will need to see if it is necessary to change the 0x70 as well.
As shown below, initially only one PCA board showed up (the 0x40 I2C address). Once we soldered and changed the I2C address of the second PCA board, we were able to successfully detect the other I2C address (0x41).
Tomorrow, we will get attach and secure the new PCA board to the robot.
This picture shows how we swapped out the burned-out PCA board with the new one.
3-18-22
We continued working on setting up the software.
As shown in the image, we soldered the PCA board to assign it a different I2C address.
We changed it from its default address (0x40) to the new address (0x41).
Ronit worked on setting up the new I2C LCD screen while I worked on trying to troubleshoot the issues with the servos.
Unfortunately, I was still unable to get the servos to run.
3-21-22
Over the weekend, I worked on setting up additional functionality with the software.
I tried to set up a file to automatically connect the Xbox Controller to the robot and start the control code ("enable SpotMicroAI to run on boot").
I was able to enable some of the functionality and connect it to the Raspberry Pi, but we are having some issues enabling "service spotmicroai"
I also researched online how to get the servo motor control to work, but I am still having issues with not being able to run them properly.
The image below shows how I attempted to enable SpotMicroAI to run on boot:
3-22-22
I continued working on the software.
I did more research with how to set up our libraries, packages, and modules with Python.
These functions enable our Raspberry Pi to access different files in order to have full functionality.
I tried resetting the robot, the GPIO cable, and the PCA boards in order to get the servos to work, yet they still don't rotate at all.
As well, I created a Brochure Slide for my Senior Technology class going over our robot.
3-23-22
Today, I made a lot of progress working with our code.
First, I set up the new I2C LCD screen with the robot, which Ronit initially wired up.
The images below show the new I2C LCD screen wired up to the robot:
I also was able to confirm that the I2C LCD screen could connect to the Raspberry Pi with an I2C address:
A new I2C address (0x27) showed up, which is the address of our new I2C LCD screen.
I attempted to test if the LCD screen could display different data, but I ran into some issues with missing modules.
I ended up having to install "smbus" from the internet, which enables some of the I2C functionality.
I was able to get the module errors resolved and I successfully tested the LCD screen.
The video below shows how we tested the I2C LCD screen:
I also attempted to test the motion of multiple servos to see if I could get them to run. Unfortunately, even though the Python code successfully ran, the servos did not move at all. This makes me believe that there is an issue with the electronics or hardware.
3-24-22
I continued working with the software.
I researched online for solutions for how to get the servos working.
I found some different resources for specifically using the Raspberry Pi Zero W, but I was still not able to troubleshoot our servos.
3-25-22
I continued working on setting up the software.
I did more research for solving our specific issue of the servos not working.
I found one video for specifically fixing servos when working with the SpotMicro robot: https://www.youtube.com/watch?v=sw2l5B13qXI
I found another video for testing the PCA board: https://www.youtube.com/watch?v=y8X9X10Tn1k
I checked different files and functionality in order to troubleshoot the issue:
I checked to see if the JSON file was set up properly.
I checked the PCA boards to see if they were connected properly.
I checked the servos to see if they were broken or not plugged in properly.
Most likely, I believe there is an issue with the calibration.py file, as I modified it and changed how the modules are set up.
Spring Break (3-26-22 to 4-3-22)
Over Spring Break (3-26-22 to 4-3-22), I did a variety of troubleshooting with the robot:
I checked the voltage of the PCA boards and confirmed that each board is receiving approximately 5 volts, which is the correct amount.
I also tested the python file. I tried running both the original file and the modified file. Both had no errors in the Windows Command Prompt, yet they still not were able to run the servos.
I also confirmed that the Raspberry Pi was successfully able to send data wirelessly by running the python file to test the LCD screen again, which worked successfully. THis seems to confirm that the issue is specific to the servos and/or PCA board functionality.
4-4-22
Today, I decided to try using our older, original, and partially burnt-out PCA9685 board to see if it could control the servos. Surprisingly, even though its capacitor burnt out the last time we ran it, we were able to run the servos off this PCA board using the Python code.
Because the original PCA board worked, and yet the two newer PCA boards did not work at all, it leads me to believe that the PCA boards themselves are the problem.
Even though the older PCA board had already burnt out, since we were able to run the servos using the same code and connection setup (we only swapped the PCA boards), this would make the most sense.
Essentially, we confirmed that the Python code, the connections, etc. all function with the original PCA board.
I decided to buy new PCA9685 boards from Adafruit, along with new capacitors. Once these arrive, we will need to solder the boards to set them up.
4-5-22
Today, I worked more on the software.
I did some more research into how the json file (which organizes the connections of the servos to the PCA boards and Raspberry Pi) should be set up.
I am using this file as our template (we will have different ports set up with our robot): https://gitlab.com/public-open-source/spotmicroai/basic-runtime/-/blob/master/spotmicroai.default
The example here uses I2C addresses 0x40 and 0x42 for the PCA9685 boards, which leads me to believe that the 0x70 address is for something different, and does not identify a different PCA board (like we originally thought).
I also did research into setting up the servos
I plan to follow this guide once we get the new PCA boards: https://gitlab.com/public-open-source/spotmicroai/electronics/-/tree/master/User%20Fran%20Ferri/Align%20your%20servos
Over the next few days, I plan to accomplish a few different objectives:
I want to get the new PCA9685 boards set up and installed properly.
I want to successfully test and align the servos.
I want to get the legs installed with the functioning servos and test their functionality.
4-6-22
Today, I worked on the electronics.
I tried to see if we could somehow get the original PCA9685 boards to work, but I'm not sure exactly what the issue is with them. They appear identical, including all the soldered components. Most likely, we will just have to use the new PCA9685 boards.
The different electronic components
Main chassis wiring
Robot top view
4-7-22
Today, I continued working with the electronics.
I compared the functioning PCA board and the non-functioning one, but I couldn't discern the difference.
We still haven't received the new PCA boards to replace the old ones, so I just researched the code more and how to set up the electronics.
4-8-22
Today, I continued working with the electronics.
We received the new PCA boards from Adafruit, so we worked on soldering them and getting them ready for the robot.
We also still haven't received the capacitors we ordered, so I might buy different ones online in order for them to arrive in time.
4-11-22
Over the weekend, I made a lot of progress with the robot, specifically with the code.
First, I bought new capacitors because the original purchase has not arrived and we do not want to wait on it.
I also used an oversized capacitor from school to see if we could get the old PCA board to work again.
With both the new capacitor and with the capacitor from school, I attempted to use them to replace the original capacitor on the old PCA board.
Unfortunately, even with the new capacitors, the old PCA boards do not function well.
Using Windows Command Prompt, I tested the I2C functionality and identified a 49 I2C address for the original PCA board.
I then put in the new PCA board and again tested the I2C functionality and identified a 40 I2C address for the new PCA board.
Because these PCA boards did not work at all, I decided to solder the new capacitors to the new, Adafruit PCA board, and it functioned properly.
This essentially confirms my theory that the original PCA boards were the issue. With the new PCA board, I was able to test different components of the robot.
We are using the green-colored capacitor, for its high voltage and micro farad ratings.
For the 2 Adafruit PCA boards, Ronit soldered the different pin components and one of the capacitors, while I soldered the other capacitor.
I also tested the LCD screen and its ability to display different text.
4-12-22
At school, I was able to do additional testing and setup.
Ronit was able to solder and prepare the second Adafruit PCA board and I assembled the robot for testing.
Unfortunately, while testing, one of the lower leg servos burned out. We believe the issue was due to the servo trying to turn, but being blocked by the 3D printed plastic, and eventually burning out due to this.
Electronics with only 1 PCA board
Assembling the new Adafruit PCA board into the robot.
4-13-22 to 4-17-22: At-Home Testing
Since we had several days off of school, I brought the robot home for additional work and testing.
First, I tested the functionality of the LCD screen with new Python code.
I was able to get the code to function, and the LCD screen displays the temperature of the Raspberry Pi and the connection status of both the Xbox One controller and 2 PCA9685 boards.
I also assembled the robot using new servos and tested them to ensure all 12 servos are working.
Lastly, I attempted to get the Xbox One controller working with the robot.
In order to replace the burnt-out servo motors, I purchased 4 replacement servos (which will replace the lower foot servos).
These servos also have a higher torque rating, meaning they can hold more force.
I was also able to successfully test them using the same voltage as the other servos, despite being slightly different.
These servos also have the benefit of being able to handle higher voltages, which reduces the risk of them burning out.
I began to see if I could run the robot using the Xbox One controller. I tried to run the Python program for the controller code.
On Windows Command Prompt, I ran into errors with starting the program.
I attempted to fix these problems by installing dos2unix, which enables the reading of certain Python files.
I was able to "run" the Python file, but I encountered various errors.
Because we cannot get the controller to work, we will have to troubleshoot the robot and the code. I plan to test different aspects of the robot:
I need to test the files/folders (and possibly replace files and folders with ones from GitLab)
I need to test and find the cause of the controller error, which may be one of the following:
The controller is connected via Bluetooth, but the code isn’t accessing it
Python code runs fine, yet there is a separate problem
We might be lacking modules or a proper connection
We need to find a way to verify the connection
I eventually was able to get the Spotmicroai service to automatically connect and run, but the controller still doesn't work.
4-18-22
Today, I continued working with the code.
I checked for the connected I2C devices, and the 2 PCA9685 boards (40 and 41) and the LCD screen (27) are still successfully connected.
I tried to test the Python code again, yet we still had errors.
In the next few days, I will continue trying to troubleshoot the code.
4-19-22
Today, I continued working with the code.
I did research on the original code we are using as a reference.
I looked into how the Python code accessed other files within the same folders. I will likely need to modify a variety of different files to get the code to work.
I ran motor testing code, which was partially successful, as I was able to run the different motors of the robot.
4-20-22
Today, I continued working with the code.
I completed testing to try and identify the problems with the code.
I also went to Ronit's house today after school to collaborate on the project. We were able to do some motor testing, and eventually, by modifying certain parts of the code, we were able to get the Xbox One Controller to function.
We discovered that the source of the issue was that the Xbox controller keys from our online source were based on an Xbox 360 controller instead of an Xbox One controller. We remapped the dictionary keys and the code ran properly. We also figured out the arrangement for the battery compartment to reduce torsion on the power wires.
Assembling the robot again to align the servos and leg parts:
We also adjusted the contrast of the LCD screen to better display the different data. Notice the temperature reader of the Raspberry Pi and the four checkmarks, which (starting from left-to-right), represent the controller being successfully connected, the Python code currently running properly, and the connectivity status of the 2 PCA9685 boards.
The partially-assembled, but functional, robot:
Testing controller functionality:
We also created a "to-do" list to complete in the next few days before the showcase:
We also discussed making a trifold for our project showcase, which happens in about a week.
4-21-22
I worked on a variety of different aspects of the robot today.
I tested the controller functionality again to ensure the servos were aligned so that the robot could twist, turn, and move.
I also hot-glued the different screws holding the circuit boards to the 3D printed chassis. This is to better secure the electronics.
In addition, I was able to plan out how we would store the battery during operation.
4-22-22
Today, Ronit and I primarily did more testing with the robot and its movement. We also brought it to school and presented it to Mr. Morales, who was able to see the complete project working successfully.
4-23-22
Today, I continued with testing the robot's functionality.
I also added a flashlight to the front of the robot for additional function.
This led to some issues with the balance of the robot, but I was able to solve those issues by adjusting the angle of the legs.
As well, even when the robot falls over, it can re-right itself and get aligned again.
4-24-22
Unfortunately, I ran into some issues while testing the robot. One of the middle leg sections snapped due to force from the lower foot's servo motor.
Luckily, I was able to replace the broken part and get the robot functioning again. I had to 3D print a new piece for the leg section.
We also tried to implement additional code functionality, with two main goals:
Implement "trotting" motion to replicate better and more accurate walking motion.
Implement "trigger" functionality on the Xbox One Controller to enable more side-to-side control.
We were eventually successful in getting the controller's "trigger" buttons to move the robot side-to-side, but we could not get the trotting motion to work.
4-25-22
Our first Senior Technology Showcase event is tomorrow evening (4-26-22) and the second Showcase event is all day on Wednesday (4-27-22).
Today, we created a trifold to show the different aspects of our project.
We also prepared our plan for showcase and did last-minute checks on the robot and its functionality.
I was able to get the code to successfully "run on boot", which simplifies our plans because we will not need to use a internet connection or the laptop to initialize the code and use the robot; we just need the Xbox One controller.
We presented our Robot Dog Senior Technology Project to a variety of parents, students, teachers, and engineers.
We actually had a leg part break during the first showcase, just like it did a few days ago. Luckily, I had thought this might happen so I had spare 3D printed parts ready to go. With a replacement part, I repaired the robot within an hour and got it back fully functioning.
I primarily controlled the robot while Ronit gave a general overview of the project. We both answered questions about the construction and coding of the robot dog.
I was surprised to see how many parents, students, and teachers were interested in the programming and code aspects. We had several people directly ask us about what coding languages we used, how we implemented motor movement, and how we paired the Xbox One controller with the robot, even though it was not an Xbox device.
Both Ronit and I were glad to showcase our project. We felt like it was a great result of the culmination of all our effort over the past year.
The following images show the robot dog at the showcase:
Testing the robot's functionality with a "Dance Dance Revolution Dance Pad", a technology project made by another group of seniors:
Testing the aerodynamics of the robot dog in a small-scale wind tunnel created as another technology project by a different group of seniors:
All in all, I am extremely glad to be able to have the opportunity to show off our work. We were able to show other people our project and demonstrate just how much effort we had put into it. I am incredibly thankful for the help of my partner, Ronit Nagarapu, and our technology teacher, Mr. Morales. I also want to acknowledge the Bartlett STEM Academy teachers and staff who helped organize this technology showcase and give us the necessary support throughout the process.
5-1-22
After completing our showcase, we have essentially finished our Senior Technology Project.
Since the school year is not over yet, Ronit and I may spend more time seeing what we can do to further improve the robot dog and make any additional changes.
Once again, I want to emphasize how grateful I am to be able to complete such a project. This project has been an incredible challenge for me and I have dealt with both success and failure, and I am extremely thankful to have such an opportunity.