R/C-Plane altitude recorder

22,928

Circuit Image

This circuit is designed to record the altitude of a remote-controlled (R/C) plane. The recorded data is stored on an SD card. It utilizes an ATmega8 microcontroller and a SCP1000 chip to measure temperature and, more importantly, atmospheric pressure. Users who choose to build and operate this circuit do so at their own risk, as it is a hobby project and no liability is taken for any damage or harm that may occur. The circuit can be powered by a battery or the R/C receiver (5V). An LM317 voltage regulator is used to step down the voltage to 3.3V, which is the operating voltage for SD cards and sufficient for the ATmega8. The SCP1000-D01 from VTI measures atmospheric pressure and has an SPI interface. This single chip is available only in a surface-mount device (SMD) version, which is not suitable for manual handling. However, it can be purchased pre-mounted on a PCB carrier. The SD card shares the SPI bus with the SCP1000, with pull-up resistors on the bus lines. Additionally, there are two status LEDs and a button to start and stop data recording. Initially, a stripboard was considered for construction, but due to the numerous connections, a PCB was deemed necessary. This PCB was designed using KiCad and subsequently ordered from a manufacturer. Because the SCP1000 in PCB form is relatively expensive, it is not soldered to the PCB but instead connected via two rows of multipoint connectors. The main tasks of the microcontroller's software include requesting and receiving temperature and pressure data from the SCP1000 and storing this data on the SD card. A file system was not implemented in this project. After initializing the sensor and SD card, the microcontroller searches for a specific byte marker on the card and writes the recorded data as raw bytes starting from that position. Upon stopping the recording, the marker is written in the first position of the next available block. During initialization, only the second status LED (red) lights up, flashing if an error occurs. Upon successful completion of initialization, LED 2 turns off and LED 1 (green) lights up. The user can start data recording by pressing the button. During recording, LED 2 flashes while LED 1 remains lit. Pressing the button again stops the recording. If an error occurs, both LEDs flash. Before using the SD card, it is important to ensure it is completely empty and freshly formatted in FAT16. A single text file containing the marker and trailing spaces is created to fill all available memory on the card. This ensures that recorded data is stored in the file, even though the microcontroller does not utilize the FAT system. Each dataset contains atmospheric pressure and temperature separated by commas, with datasets separated by newline characters. The recorded data can be directly copied from the file into a spreadsheet, allowing for altitude calculations using the barometric formula. Near ground level, atmospheric pressure decreases by approximately 1 hPa for every 8 meters of altitude.

The circuit design incorporates several key components and considerations for optimal performance. The ATmega8 microcontroller serves as the central processing unit, managing data acquisition from the SCP1000 and interfacing with the SD card for data storage. The SCP1000 sensor, which is crucial for measuring atmospheric pressure, operates through SPI communication, allowing for efficient data transfer. The LM317 voltage regulator ensures that the circuit operates within the required voltage range, safeguarding the components from potential damage due to overvoltage.

The integration of pull-up resistors on the SPI bus lines is essential for maintaining signal integrity and ensuring reliable communication between the microcontroller, SCP1000, and SD card. The use of status LEDs provides visual feedback to the user, indicating the operational status of the circuit and any potential errors that may arise during operation.

The decision to employ a PCB instead of a stripboard reflects a commitment to compactness and reliability, particularly given the constraints of fitting the circuit into an R/C glider. The modular design, allowing for the SCP1000 to be connected via multipoint connectors, facilitates easy replacement and maintenance of the sensor without the need for soldering.

Overall, this R/C plane altitude recording circuit exemplifies a practical application of microcontroller technology and sensor integration, providing hobbyists with a valuable tool for enhancing their flying experience through altitude data collection. The approach taken in the design and implementation of this circuit demonstrates a clear understanding of both hardware and software requirements necessary for successful operation in a remote-controlled environment.This is a circuit to record the altitude of a R/C-plane. The data is saved on a SD-Card. It uses an ATmega8 microcontroller and a SCP1000 chip to measure temperature and (more important) atmospheric pressure. If you decide to build and use this circuit, you do so at your own risk. This is just a hobby project, so I don`t take liability for any dam age or harm it might cause. The circuit is powered by battery or the R/C receiver (5V). The LM317 regulates the voltage to 3. 3V, which is the operational voltage of SD-Cards and just high enough for the ATmega8. The atmospheric pressure is measured by the SCP1000-D01 from VTI, which has an SPI interface. The single chip is available only in a SMD version, which cannot be handled manually. Luckily, it can also be bought premounted on a PCB carrier. The SD-Card shares the SPI bus with the SCP1000. The bus lines are held up by pull-up resistors. In addition to the ICs there are two status LEDs and a button to start and stop the recording of data. At first I wanted to build the circuit on a stripboard, but because of the many connecting lines the board would have been far too large to fit into my R/C-glider.

So a PCB was necessary, which I desinged with KiCad and then ordered from a manufacturer. Because the SCP1000 in the PCB version is quite expensive, it is not soldered to the PCB, but plugged in two rows of multipoint connectors. The the main tasks of the microcontroller software is to request and receive the temperature and pressure data from the SCP1000 and store the data on the SD-Card.

I was a little lazy here and did not implement a file system. After the initialization of the sensor and the SD-Card, the microcontroller searches for a certain byte-mark on the card. It writes recorded data in raw bytes onto the card beginning from the marked position. When recording stops it writes the mark in the first position of the next free block. During initialization only status LED 2 (red) lights up and starts flashing if an error occurs. When initialization is completed successfully, LED 2 goes out and LED 1 (green) turns on. The user can then start recording by pushing the single button. During recording LED 2 flashes while LED 1 is on. When the button is pressed again, recording stops. If an error occurs both LEDs start flashing. Before using the SD-Card, I made sure it is completely empty and freshly formatted in FAT16. After that I created a single text file containing the mark and trailing spaces, which fill all the availably memory on the card.

This way the recorded data is stored in the file, even though the microcontroller doesn`t know a thing about FAT. In every dataset atmospheric pressure and temperature are stored separated by commas. The datasets are separated by the newline character. The recorded data can be copied directly from the file into a spreadsheet. After that the altitude can be calculated with the barometric formula. Near ground level the atmospheric pressure decreases roughly 1 hPa every 8 meters. 🔗 External reference