You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9.5 KiB
9.5 KiB
ESPuino-PCB based on Wemos' Lolin D32
Features
- Fits Wemos Lolin D32 (not Lolin32, Lolin D32 pro or Lolin 32 lite!)
- Outer diameter: 53 x 81mm
- JST-PH 2.0-connectors for buttons (2 pins), rotary encoder (5 pins), Neopixel (3 pins), RFID (6 pins) and reset (2 pins). Please note: all of them are NOT 2.54mm pitch but 2.0mm!)
- 2.54mm-connectors for MAX98357a and µSD-card-reader. In contrast to my pictures: better solder them directly onto the PCB without having a female-connector (as socket) in between. In turned out that especially plugging MAX98357a into a female connector can lead to connectivity-issues!
- Mosfet-circuit that switches off MAX98357a, Neopixel, headphone-pcb, RFID-reader and µSD-card-reader automatically when deepsleep is active
- All peripherals are solely driven at 3.3V, as 5V isn't available in battery-mode. Keep this especially in mind when choosing µSD-reader. If in doubts use one without voltage-regulator (link below).
- If headphone-pcb is used, MAX98357a is automatically muted when there's a headphone plugged in and vice versa.
- If
HEADPHONE_ADJUST_ENABLE
is set and a headphone is plugged in, an alternative maximum volume is activated. I added this feature because headphone-pcb makes use of an amp that (probably) "allows" children to damage ears. This maximum volume can be set and re-adjusted via webgui. - Reset-button
Prerequisites
- If no headphone-pcb is connected, make sure
HEADPHONE_ADJUST_ENABLE
is disabled. - Make sure to edit
settings.h
(HAL=3) andsettings-lolin_d32.h
according your needs. - Disable
SD_MMC_1BIT_MODE
andSINGLE_SPI_ENABLE
as these are not supported by this PCB. - Enable
RFID_READER_TYPE_MFRC522_SPI
as other RFID-reader-types are not supported by this PCB. - Enable
USEROTARY_ENABLE
. - Enable buttons for previous, next, pause/play.
PCB-Wiring (2 SPI-instances: RC522 + SD + 3 buttons + rotary encoder)
Uses two SPI-instances. The first one for the RFID-reader and the second for SD-card-reader. Please refer Schematics for reference.
ESP32 (GPIO) | Hardware | Pin | Comment |
---|---|---|---|
MFET 3.3V | SD-reader | 3.3V | |
GND | SD-reader | GND | |
15 | SD-reader | CS | |
13 | SD-reader | MOSI | |
16 | SD-reader | MISO | |
14 | SD-reader | SCK | |
MFET 3.3V | RFID-reader | 3.3V | |
GND | RFID-reader | GND | |
21 | RFID-reader | CS/SDA | |
23 | RFID-reader | MOSI | |
19 | RFID-reader | MISO | |
18 | RFID-reader | SCK | |
MFET 3.3V | MAX98357 | VIN | |
GND | MAX98357 | GND | |
25 | MAX98357 | DIN | |
27 | MAX98357 | BCLK | |
26 | MAX98357 | LRC | |
--- | MAX98357 | SD | Info: if pulled down to GND amp will turn off |
--- | MAX98357 | GAIN | Pullup with 100k to 3.3V to reduce gain |
34 | Rotary encoder | CLK | Change CLK with DT if you want to change the direction of RE |
33 | Rotary encoder | DT | Change CLK with DT if you want to change the direction of RE |
32 | Rotary encoder | BUTTON | |
3.3 V | Rotary encoder | + | |
GND | Rotary encoder | GND | |
4 | Button (next) | ||
GND | Button (next) | ||
2 | Button (previous) | ||
GND | Button (previous) | ||
5 | Button (pause/play) | ||
GND | Button (pause/play) | ||
MFET 3.3V | Neopixel | V | |
GND | Neopixel | G | |
12 | Neopixel | DI | |
17 | N-channel Mosfet | Gate | |
35 | Voltage-divider / BAT | ||
22 | Headphone jack | Optional: if pulled to ground, headphone-volume is set |
Things to mention
- Better don't solder Lolin D32 directly to the PCB. I recommend to make use of female connectors (as socket) instead (link below).
- When ordering a LiPo-battery, make sure to use one with deep discharge protection! This is really really really important!!!
- Doesn't support SD-MMC and RFID-reader PN5180
Hardware-setup
The heart of my project is an ESP32 on a Wemos Lolin D32 development-board. Make sure to install the drivers for the USB/Serial-chip (CP2102 e.g.).
- MAX98357A (like Adafruit's)
- µSD-card-reader 3.3V only
- RFID-reader
- RFID-tags
- Neopixel-ring
- Rotary Encoder
- Buttons
- Speaker
- µSD-card: doesn't have to be a super-fast one; uC is limiting the throughput. Tested 32GB without any problems.
- JSP PH-2.0-connectors
- Female connector
- (optional) IDC-connector female 6pin for headphone-pcb
- (optional) IDC-connector male 6pin for headphone-pcb
- LiPo-battery (2500 mAh) with connector JST PH 2.0mm
Parts
- 1x IRL3103 (N-channel MOSFET) (instead of IRF530NPbF as IRL3103 has lower Vgs)
- 1x NDP6020P (P-channel MOSFET)
- 1x 1k resistor
- 1x 10k resistor
- 2x 100k resistor
- 4x JST-PH2.0-connector (2 Pins)
- 1x JST-PH2.0-connector (3 Pins)
- 1x JST-PH2.0-connector (5 Pins)
- 1x JST-PH2.0-connector (6 Pins)
- Female connector as socket for Lolin32
- (optional for headphone-PCB) 1x IDC-connecor female (6pin)
- (optional for headphone-PCB) 1x IDC-connecor male (6pin)
Where to order?
- I ordered my PCBs at jlcpcb. You have to order at least 5 pcs, which is only at 2$ + shipping. It took two weeks to arrive. If you want to have a look at the PCBs first (without having KiCad installed), visit Gerberlook and upload
gerber.zip
from the Gerberfiles-folder.
Do I need to install KiCad?
Unless you don't want to change anything: no! All you need to provide are the gerberfiles (gerber.zip
) to your manufactur (e.g. jlcpcb). However, all Kicad-files used are provided as well.