Calculate the altitude for a rocket

The ESP8266 processor is a 32-bit RISC microprocessor core based on the Tensilica Xtensa Diamond Standard 106Micro running at 80 MHz.

As processors go, the ESP line outperforms the Arduino AVR processors.

The ESP-01 does not provide a connection to the analog port, but the slightly larger Wemos D1 Mini does.

I have built a water bottle rocket controller with a PIC. I put an EEprom on it, and just used some simple logic to stop it from overwriting. If it was in flight (as in after the accelerometer was triggered) , it checked to see if the value was greater than the last value and the value was greater than say 100ft or so. If that was true, it wrote the value to EEprom. That way you don't have to worry about overwriting.

1 Like

We talk about this thing ? -> https://images-na.ssl-images-amazon.com/images/I/712MQXA8VIL._SL1500_.jpg

Thank you but I'm just trying to build an altimeter to know the maximum height reached by the rocket (to be able to improve it afterwards), the triggering of the parachute is done by another system (tilt module)

if(currentaltitude > highestaltitude) {
   highestaltitude = currentaltitude;
}

What about this?

@micahfriesen I don't understand what would you say ?

That is the code for calculating your highest altitude, assuming that you know what altitude you are at from your barometer.


Well, that is a NodeMCU.

As SteveMann points out this - using the ESP8266 - is a substantially more powerful processor than the Arduino AVR processors and has much more EEPROM or "Flash". While the NodeMCU you illustrate is rather bulky, the WeMOS D1 Mini is pretty compact and the ESP-01 very small as it does not have the USB port.

No, but why is that in any way relevant to the original discussion here? :woozy_face:

1 Like

No. But any time I suggest that simple tasks on an Arduino Uno can be done on the ESP01, someone will invariably point out the lack of an analog port on the ESP01.

OK. :grin:

Hello everyone !
I have inquired a little and I am thinking of going on the BMP280 (or BMP388, I have not yet finished my research) and on the ESP8266 that you indicated to me because it was smaller than the arduino Nano.
I have no knowledge with the ESP8266, the original code intended for the arduino would work on the ESP8266 without any modifications?
I just have to change the card and the wiring according to the pins? Also I don't understand, ESP is faster so it will record more data (isn't the sensor limiting it?), right?

Here is the code and diagram I found on internet:

CODE_ARDUINO_POUR_ENREGISTRER_LES_DONN_ES_BMP280_DANS_UN_FICHIE.ino (5,5 Ko)

Please ?
@dave-in-nj @Paul_B @SteveMann the ESP8266 was your idea ? The ESP32 can work too ?
Thanks :grin:

Yes.
The ESP8266 is slightly smaller.
Has only 1 analog pin.

The ESP32 is its big brother

Thanks for the answer !
It's a problem ? I need this port: "SCL, SDA, MISO, SCK, SS, MOSI" (schematic number 1) / "SCL, SDA, MISO, CS, SCK" (schematic number 2).
I don't found this port on the ESP8266: "SCK" and "SS".
I don't found this port on the ESP32: "CS"

Some pins are hardware and are labeled.

Some pins are software so are not listed.

The ESP8266 cs is software so you can use an available pin

And for "SCK" and "SS" pins on the ESP8266 ?
So for the software originally planned for the arduino Nano, you have to change lines of codes to put it on an ESP8266 or an ESP32? And since these cards have a faster speed than the arduino, will they take less time to put data on the sd card?

Change pin numbers. Yes.
8266 typically uses D0 instead of 1.
Need to check the exact module for the pin.

From what I understood, for the SD card you should not assign the pins, it is a library that takes care of everything. Here is the code, I may be wrong but I do not see pin allocation for the SD card:
CODE_ARDUINO_POUR_ENREGISTRER_LES_DONN_ES_BMP280_DANS_UN_FICHIE.ino (5,5 Ko)

Google esp8266 sd card
The first few results have pinouts.

You can do the same esp32 sd card

1 Like

Hi,

CS == Chip Select is not a designated output, you can assign any digital output to be CS.
It is used to tell an IC that the controler is connected to, to open its data input port to be ready for data.

Tom... :smiley: :+1: :coffee: :australia:

1 Like

By the way, if you want to work out how well your rocket will fly, use a simulator such as Open Rocket: https://openrocket.info/. I have used it for everything from backyard size rockets to Mach 2 monsters and I have found the real-world data to be very close to the simulations. Like any model, give it good data and you'll get good results.