Attempting to build a digital pressure control valve using an esp32 and a bmp2

I am attempting to build a digital pressure control valve using an ESP32 DEV KIT V1 and a bmp280. I am very new to arduino and coding in general so will likely need quite a bit of assistance. From what I understand it should be a pretty simple function, it needs to:

  1. Measure the temperature and pressure (inside the tyre)
  2. Wirelessly broadcast the temperature and pressure data and receive data (from outside the tyre)
  3. Calculate if the pressure is greater than the data given
  4. If the pressure is greater than the data, activate a small solenoid or actuator to release pressure from the valve (outside the tire)

From my basic understanding the measurements and the calculations will be simple to code but the wireless elements will be much more difficult.

So far I have checked that I have the latest download of arduino ide installed on my computer, installed both the adafruit BME 280 and the adafruit sensor libraries. I have connected the esp32 and bme using the schematics diagram below. I am currently trying to upload the “bme280 test” sketch to my board (which is connected to my computer by a micro usb to usb 2.0)

I still need to buy suitable hardware for releasing pressure from the tyre but thought I expect that this is a much later steak and can be considered later in the process.

The problem that I have at the moment is that com port 1 always times out and com port 3 always gives the error message “port busy” (image attached below)

Any help would be much appreciated.

The attached PNG is completely useless to solve the com problem you mention.


Maximum pressure for a BME280 is 1100 milliBar absolute, what is the pressure inside the tyre?

It is only a kart tyre so 1100 milliBar should be fine

'Should be'
Very interesting engineering term

How do you expect to connect your project to the tyre you will be monitoring?
How will you power it?

If it is going to be part of the wheel have you considered the extra mass needed to balance the rotating wheel?

There are units already available to do this job, designed for the sort of torture and rigors of motoring/racing.

Google TPMS.

If anybody likes a bit of informative sarcasm.

Tom... :slight_smile:

I have seen monitoring systems before but I was aiming to be able to not only monitor the pressure but alter it, so that the pressure stays the same as the tyre heats up.

I had not get looked into how I was going to power it but was aiming to put a battery on the inside of the tyre (along with the board and sensor) bit place it on the opposite side to help balance out the weight.

I think I have found the problem, I have unplugged any unnecessary usb’s from my computer and found the port and lead that allowed me to access COM 4 port. When I upload the scene to my esp32 the following message shows at the bottom of the screen:

Sketch uses 233525 bytes (17%) of program storage space. Maximum is 1310720 bytes.
Global variables use 16276 bytes (4%) of dynamic memory, leaving 311404 bytes for local variables. Maximum is 327680 bytes. v2.6
Serial port COM4
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: b4:e6:2d:fa:c0:71
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 840.2 kbit/s)...
Hash of data verified.
Compressed 15856 bytes to 10276...
Wrote 15856 bytes (10276 compressed) at 0x00001000 in 0.2 seconds (effective 637.4 kbit/s)...
Hash of data verified.
Compressed 233648 bytes to 122081...
Wrote 233648 bytes (122081 compressed) at 0x00010000 in 2.0 seconds (effective 922.1 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.1 seconds (effective 311.1 kbit/s)...
Hash of data verified.

Hard resetting via RTS pin...

I cannot see where anything has gone wrong but when I go to the serial monitor nothing is shown. Can anyone tell me what I am doing wrong please?