Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
# Peanut
A modern, tiny, and hackable altimeter for hobby rocketry.
<p align="center">
<img style="align:center" width="70%" src="./docs/assets/fingers-for-scale.jpg" />
<br/>
Peanut Altimeter with my fingers for scale
</p>
<p align="center">
<img style="align:center" width="70%" src="./docs/assets/usb-for-scale.jpg" />
<br/>
Peanut Altimeter powered up and operational
</p>
<p align="center">
<img style="align:center" width="70%" src="./docs/assets/peanut_render.png" />
<br/>
Peanut Altimeter KiCAD render
</p>
**Features include:**
* Fits in a min-diameter 29mm rocket
* High accuracy barometric pressure sensor (up to ~9km)
* Dual deploy capable (two pyro channels, >1A each)
* Continuity LED indicators for each pyro channel
* Battery reverse polarity protection
* On-board 2MB storage (4MB, 2MB for program, 2MB for logs)
* Altitude measurements
* Flight events (ascent, apogee, landing, etc.)
* Deployment events
* Mach dip filtering (works on flights that break Mach)
* Buzzer arming indicator
* Bluetooth connection
* Deployment ground testing with flight simulations over BLE
* Wireless configuration
* Battery life monitoring
* Arming verification
* Continuity & other telemetry over BLE
* WiFi capable
**Tech specs:**
* ESP32C3 MCU (4MB flash, 40KB RAM)
* BMP581 barometer
* Configured with interrupt line for measurements
* I2C operated
* Piezo buzzer with GPIO control
* ACAG0201-2450-T 2.4GHz PCB antenna
[Take a look at Peanut's layout and electrical schematics here.][kicad-view]
Peanut is also the subject of one of my [2026 Apache Community over
Code conference presentations][coc-alt-pres]. I discuss the process of designing
an altimeter with NuttX in mind, as well as what considerations go into robust
firmware design.
**Thank you to [PCBWay][pcbway] for sponsoring the manufacture of this project's
PCBs!**
## Firmware
The firmware for this board is made using the [Apache NuttX RTOS][nuttx-site],
an open-source embedded RTOS with an incredible community and an excellent
feature set.
Firmware is spread across a few repositories. If you are compiling yourself,
you'll need:
- [The NuttX kernel source][nuttx]
- [The NuttX application library][nuttx-apps]
- [The Peanut board support package (BSP)][peanut-bsp]
- [My application-level altimeter software,
`rocket-altimeter`][rocket-altimeter]
Instructions for how to configure, compile and flash firmware can be found in
the [Peanut BSP][peanut-bsp] and [`rocket-altimeter`][rocket-altimeter]
repositories. Pre-built firmware binaries are made available with each release
under the [Peanut BSP][peanut-bsp] repository.
## Hackability
All hardware designs & firmware for Peanut are open-sourced and available under
permissive licensing.
The device itself is programmable over the USB-C interface using Espressif's
`esptool`, so users can tweak the firmware or write their own and easily
re-program the device. Want the buzzer to play custom audio? Want to change the
meaning of the "START" LED? Want to add more features to the Bluetooth
interface, or make the altimeter operate over WiFi instead? You can program
whatever you want into it!
## Physical Integration
If you'd like to fly Peanut, take a look at [the 3D models](./models) so you can
design your av-bay in CAD. This directory also contains the key dimensions of
Peanut for size and mounting holes.
**NOTE:** A user manual for Peanut is coming soon! For now, be aware that Peanut
is only rated for 4V2 LiPo/Li-ion batteries (3V7 nominal). You should only use
batteries _without overcurrent protection_ if you are flying Peanut for
deployment purposes. Otherwise, pyro channels may not be able to draw sufficient
current when fired.
## Make Your Own
If you want to make your own Peanut Altimeter, the component cost for the board
is roughly $35 CAD. You can get PCB blanks from a manufacturer of your choice
(i.e. PCBWay). You should only need to verify the trace widths of the
Bluetooth RF trace depending on the differences between your manufacturer's
PCB stackup and mine.
**NOTE:** This board was not designed with hand-soldering in mind (aside from
the backside). My manufacture process is to use solder paste, a stencil and a
hot plate to do the top-side components. There are 0402 components which are
manageable with steady hands and tweezers.
## On PCBWay
My experience using PCBWay could not have been easier. They provide a plugin for
KiCAD that directly exports your manufacturing files for order to their web
quote interface. I only hand to click the button and choose some parameters for
my board to get everything ordered.
My designs arrived on time, well package and the stencil was really high quality
with a large aluminum frame. I had no issues with the fine details (in copper
and on silkscreen) with such a small board, PCBWay nailed it.
[nuttx]: https://github.com/apache/nuttx
[nuttx-apps]: https://github.com/apache/nuttx-apps
[nuttx-site]: https://nuttx.apache.org/
[rocket-altimeter]: https://github.com/linguini1/rocket-altimeter
[peanut-bsp]: https://github.com/linguini1/peanut-bsp
[pcbway]: https://www.pcbway.com/
[kicad-view]: https://kicanvas.org/?github=https%3A%2F%2Fgithub.com%2Flinguini1%2Fpeanut%2Ftree%2Fmain%2Fpeanut
[coc-alt-pres]: https://web.cvent.com/event/ac71ce47-2b5f-424c-abfe-5b48255315fb/summary?session=b94e377f-e18d-4d64-92bf-246464bb62e4&shareLink=true
5acb8139eThis file is pinned to the selected release. Download the original to open it in your design tool.