This commit is contained in:
2025-04-23 13:13:05 +02:00
parent 5333816f44
commit f5c2e0d7a6
3 changed files with 5 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -29,7 +29,10 @@ Starting the project we used last years prototype as our starting point.
(Our robot already strapped with an Ultrasonic and a Time of flight sensor) (Our robot already strapped with an Ultrasonic and a Time of flight sensor)
Dylan and I wanted to do the coding and electronics of the robot and Patrick and Irja took the designing and building part of the robot. Dylan and I wanted to do the coding and electronics of the robot and Patrick and Irja took the designing and building part of the robot.
We realized quickly that we only had 2 ports left over because all other where in use by the arduino motor drive hat. These 2 ports that where left over where the I2C port SDA and SCL. So I thought let's use ToF sensors since you can hook up multiple on I2C. After some digging in the datasheet I found out that wouldn't work because whenever you assign a I2C address to a VL53X1L it would forget it next power cycle. So I thought: what if I used a multiplexer connected to all the XSHUT pins of the ToF sensor to turn them on one by one and assign them each their own I2C address on startup. We realized quickly that we only had 2 ports left over because all other where in use by the arduino motor drive hat. These 2 ports that where left over where the I2C port SDA and SCL.
![alt text](image-14.jpg)
So I thought let's use ToF sensors since you can hook up multiple on I2C. After some digging in the datasheet I found out that wouldn't work because whenever you assign a I2C address to a VL53X1L it would forget it next power cycle. So I thought: what if I used a multiplexer connected to all the XSHUT pins of the ToF sensor to turn them on one by one and assign them each their own I2C address on startup.
![alt text](image-11.jpg) ![alt text](image-11.jpg)
Luckily we had the I2C multiplexer [PA9555](https://www.nxp.com/docs/en/data-sheet/PCA9555.pdf). So I used I2C for everything because I had limited pins. So I started designing a circuit. Luckily we had the I2C multiplexer [PA9555](https://www.nxp.com/docs/en/data-sheet/PCA9555.pdf). So I used I2C for everything because I had limited pins. So I started designing a circuit.
@@ -549,7 +552,7 @@ On the last day I tried to connect everything together. I first started out with
I double, triple checked every connection and grabbed new wires in case that was the issue. After a while a directly connected it to the mcu but that also didn't work and then I gave up. I double, triple checked every connection and grabbed new wires in case that was the issue. After a while a directly connected it to the mcu but that also didn't work and then I gave up.
![alt text](image-13.png) ![alt text](image-13.jpg)
After going to Henk and reading the datasheet he said I needed to use 5 volts instead of 3.3 volts After going to Henk and reading the datasheet he said I needed to use 5 volts instead of 3.3 volts
When I changed that connection it worked. When I changed that connection it worked.