added images and a lot of docs

This commit is contained in:
2025-03-25 17:13:54 +01:00
parent 228a887ad5
commit 4ff4f26cec
22 changed files with 42 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -5,25 +5,55 @@ We first tested with the oscilloscopes and a potentiometer. We connected the pot
The more we pushed the potentiometer the higher the voltage became. So the voltage drop was decreasing and that was visible on the oscilloscope. The more we pushed the potentiometer the higher the voltage became. So the voltage drop was decreasing and that was visible on the oscilloscope.
![alt text](image-5.png) ![alt text](image-5.jpg)
![alt text](image-6.png) ![alt text](image-6.jpg)
Later on Henk connected a ds18b20 to a signal analyzer and tried reading the protocol. Later on Henk connected a ds18b20 to a signal analyzer and tried reading the protocol.
## Potentiometer/Joysticks ## Potentiometer/Joysticks
For this week I want to get proper readings from my joysticks. I got them from aliexpress and couldn't find any datasheets on them. So I gotta test them out myself. With 3.3 volts I got good measurements when sliding the joystick to the lest and bad measurements when going to the right. When fully to the right it was hanging around 2400 and sometimes jittering to 2700. With a controller for a drone I don't want any jittering so I need to figure out how to make them completely stable. On my first board I had a lot of errors. When I was soldering the multiplexer the first time I accidentally rotated it 180 degrees. So I asked Henk for help de-soldering it. For this week I want to get proper readings from my joysticks. I got them from aliexpress and couldn't find any datasheets on them. So I gotta test them out myself. With 3.3 volts I got good measurements when sliding the joystick to the lest and bad measurements when going to the right. When fully to the right it was hanging around 2400 and sometimes jittering to 2700. With a controller for a drone I don't want any jittering so I need to figure out how to make them completely stable. On my first board I had a lot of errors. When I was soldering the multiplexer the first time I accidentally rotated it 180 degrees. So I asked Henk for help de-soldering it.
![alt text](IMG_9293.JPEG) ![alt text](IMG_9293.jpg)
![alt text](IMG_9319.JPEG) ![alt text](IMG_9319.jpg)
This was my setup of my first board. The multiplexer worked straight away luckily but getting good readings from the joystick was a a lot harder than I thought. Because I couldn't get to 0 and was getting jitters. This was my setup of my first board. The multiplexer worked straight away luckily but getting good readings from the joystick was a a lot harder than I thought. Because I couldn't get to 0 and was getting jitters.
With my second board I implemented a 5v voltage regulator. But after testing it my mcu kept reporting 0 to 3 millivolts on the pin. Which was odd. When I placed my multimeter between the input pin and the ground it reported 2.5 volts. With my second board I implemented a 5v voltage regulator. But after testing it my mcu kept reporting 0 to 3 millivolts on the pin. Which was odd. When I placed my multimeter between the input pin and the ground it reported 2.5 volts.
![alt text](image-8.png) ![alt text](image-8.jpg)
![alt text](image-9.png) ![alt text](image-9.jpg)
When fully to the right it won't drop to 0 but when to the left it goes to 4095 on the edge so I thought it maybe was that it needed 5v instead of 3.3v. When fully to the right it won't drop to 0 but when to the left it goes to 4095 on the edge so I thought it maybe was that it needed 5v instead of 3.3v.
So now I wanna test on a arduino to see if it works right on 5 volts. If it does I need to figure something out to either get 5v on the esp of another way of communicating between another mcu and esp. I can't use the VIN of the esp because I want to use batteries. When using batteries there isn't going to be 5v supplied on the VIN. Or maybe I should use a power bank. Then I do have 5v out. So now I wanna test on a arduino to see if it works right on 5 volts. If it does I need to figure something out to either get 5v on the esp of another way of communicating between another mcu and esp. I can't use the VIN of the esp because I want to use batteries. When using batteries there isn't going to be 5v supplied on the VIN. Or maybe I should use a power bank. Then I do have 5v out.
https://randomnerdtutorials.com/how-to-level-shift-5v-to-3-3v/
![alt text](image-10.jpg)
![alt text](image-11.jpg)
Using 5v with the arduino I get a lot more stable values. So now I need to try 5v with the esp and attempt to read it. If that works I am going to use the VIN for 5v supply.
When testing with the esp and bridging the wires I realised something. Maybe the multiplexer also needs 5v to forward anything below 5 volts. So I milled a new board with 5v supply to the multiplexer. With this design.
![alt text](image-12.jpg)
![alt text](image-13.jpg)
After debugging for a while Henk asked me what was wrong and then it all clicked. I went to re read the documentation on how voltage dividers worked [from this website](https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-resistor-circuits/a/ee-voltage-divider) and I then it all clicked. I first needed the lower Ohm to the input pin and then before the ground a higher resistor. So like this
![alt text](image-14.jpg)
Instead of this.
![alt text](image-15.jpg)
This is still a bit complicated because I am using 2 resistors at the ground because I needed 20K Ohm but we only had 10K Ohm so I set 2 10K Ohm in series to create 20K Ohm.
During debugging I first removed the multiplexer and created a bypass to attempt to isolate the problem.
![alt text](IMG_9350.jpg)
Then I still struggled the entire day debugging and then I gave up and went home. In the morning Henk used the rubber ducky method and I found the problem and fixed it like this.
![alt text](IMG_9355.jpg)
It looks super messy but what I have done is. I broke one trace and created the same configuration as in the correct schematic.
Now that this works I can work on the final design of the board and send it to a board house.
## Voltage divider
This week I learned how voltage dividers worked and I also struggled a lot with them. A voltage divider is better for splitting voltage instead of creating a voltage drop using a single resistor. Because you don't have to know how much current is flowing. Instead you can divide the voltage between 2 lanes.
https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-resistor-circuits/a/ee-voltage-divider

View File

@@ -12,3 +12,8 @@
platform = espressif32 platform = espressif32
board = lolin_c3_mini board = lolin_c3_mini
framework = arduino framework = arduino
[env:Xiao_c3]
board = seeed_xiao_esp32c3
framework = arduino
platform = espressif32