Skip to content

Commit

Permalink
Initial
Browse files Browse the repository at this point in the history
  • Loading branch information
justind000 committed Feb 16, 2024
0 parents commit 14dd3f2
Show file tree
Hide file tree
Showing 15 changed files with 1,912 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build
uses: docker://ghcr.io/atopile/atopile-kicad

- name: Upload Combined Artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: build
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# For PCBs designed using KiCad: https://www.kicad.org/
# Format documentation: https://kicad.org/help/file-formats/

# Temporary files
*.000
*.bak
*.bck
*.kicad_pcb-bak
*.kicad_sch-bak
*-backups
*.kicad_prl
*.sch-bak
*~
_autosave-*
*.tmp
*-save.pro
*-save.kicad_pcb
*.kicad_pcb.lck
fp-info-cache

# Netlist files (exported from Eeschema)
*.net

# Autorouter files (exported from Pcbnew)
*.dsn
*.ses

# Exported BOM files
*.xml
*.csv

build/
.DS_Store

# Virtual environment
.venv/
venv/

# .ato directory
.ato/

# IDEs
.vscode/
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Copyright Microfire LLC 2024.

This source describes Open Hardware and is licensed under the CERN-OHL-P
v2.

You may redistribute and modify this documentation and make products
using it under the terms of the CERN-OHL-P v2 (https:/cern.ch/cern-ohl).
This documentation is distributed WITHOUT ANY EXPRESS OR IMPLIED
WARRANTY, INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY
AND FITNESS FOR A PARTICULAR PURPOSE. Please see the CERN-OHL-P v2
for applicable conditions.
82 changes: 82 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# ESP32-C3-MINI-1U-N4

📒 [Datasheet](https://www.espressif.com/sites/default/files/documentation/esp32-c3-mini-1_datasheet_en.pdf)

This repository is an [atopile](https://atopile.io/) module for the ESP32-C3-MINI-1U-N4, a system-on-chip ESP32 WiFi/BLE chip.
- external antenna connector
- RISC­V single­core microprocessor
- 4 MB flash in chip package
- 15 GPIOs
- integrated USB controller

## 🏁 Get started
### Installation
From inside a project directory terminal: `ato install esp32c3`

### Code
```Go
import ESP32C3 from "esp32c3/esp32c3.ato"
import Power from "generics/interfaces.ato"
import UART from "generics/interfaces.ato"
import USB2 from "generics/interfaces.ato"

module Test:
esp = new ESP32C3
vdd3v3 = new Power
uart = new UART
usb = new USB2

esp.power ~ vdd3v3
esp.uart ~ uart
esp.usb ~ usb
```
*GPIO pins are available as IO0 - IO19*

## 🤔 Design Considerations
This is a minimal circuit:
- to use the USB lines to spec, you'll need to add your own resistors and capacitors per Figure 7, pg 25 of the datasheet
- there's no crystal in this design, it is required for light-sleep mode

## ⚡ Programming
The ESP32-C3 can have firmware uploaded with just a USB cable. No additional hardware is required, although this method *isn't the best approach a smooth development experience.*
### Connections
You'll need a USB breakout board or other means to access the cables and a 3.3 volt power source, not the 5 volt USB line. Tie all grounds together.

|ESP| | USB| |3V3
|-------:|:-:|:---:|:-:|:---|
| ESP.D+ 🟨|~| 🟨 USB.D+||
| ESP.D- 🟦|~| 🟦 USB.D-||
| *ESP.VCC* 🟥|~|~|~|🟥 *3V3.VCC*|
|**ESP.GND**|~|**USB.GND**|~|**3V3.GND**|

### Procedure
1. Reset the chip while holding IO9 LOW.
- a reset can be accomplished by a power-cycle, or bringing the EN pin LOW then HIGH
2. Upload the firmware
3. Return IO9 to its default HIGH state
4. Power-cycle the chip to run normally

### Arduino and PlatformIO
#### Arduino
- follow [Espressif's instructions](https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html) for adding ESP32 support.
- choose `ESP32C3 Dev Module` from the list
- use `USBSerial` instead of `Serial` if using the same USB cable as you did for firmware upload

#### PlatformIO
```ini
[env:esp32-c3-devkitm-1]
platform = espressif32
board = esp32-c3-devkitm-1
```
*use `USBSerial` instead of `Serial` if using the same USB cable as you did for firmware upload*

## 🙏 Contributing
This design is intended to be a community best-effort at a minimal circuit combining:
- datasheet reference design
- readily available components
- modular and reusable layout

You are greatly encouraged to contribute or discuss any improvements here so that everyone may benefit.

## License
[CERN-OHL-P v2](https:/cern.ch/cern-ohl)
6 changes: 6 additions & 0 deletions ato.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ato-version: ^0.2.0
builds:
default:
entry: esp32c3.ato:ESP32C3
dependencies:
- generics

Large diffs are not rendered by default.

Loading

0 comments on commit 14dd3f2

Please sign in to comment.