Go to file
Stefan Ostermann c432a5644b Less server calls, CSS 2023-11-26 21:48:34 +01:00
.vscode First experiments 2023-05-28 00:32:39 +02:00
images hardware ready 2023-07-23 22:19:08 +02:00
include missing files 2023-07-15 19:54:48 +02:00
lib audio lib 2023-08-28 23:15:01 +02:00
sounds improvements 2023-10-09 21:24:57 +02:00
src Less server calls, CSS 2023-11-26 21:48:34 +01:00
test First experiments 2023-05-28 00:32:39 +02:00
.gitignore ignore 2023-07-09 23:01:54 +02:00
.gitmodules audio lib 2023-08-28 23:15:01 +02:00
README.md voltage pin changed 2023-10-31 19:48:05 +01:00
platformio.ini audio lib 2023-08-28 23:15:01 +02:00

README.md

HannaBox

Microcontroller

D1 Mini ESP32 Due to mp3 playback it needs a multicore esp 32:

This library only works on multi-core ESP32 chips like the ESP32-S3. It does not work on the ESP32-S2 or the ESP32-C3 warning

Pins

Amplifier

26 -> DIN
27 -> BCLK
25 -> LRC
5V -> Vin
GND -> GND

SD Card

CS -> 22 (D1)
MOSI -> 23 (D7)
CLK -> 18 (D5)
MISO -> 19 (D6)

RFID Reader

SOA -> 32
SCK -> 18
MOSI -> 23
MISO -> 19
IRQ -> NC
GND -> GND
RST -> 33
3.3V -> 3.3V

RFID Chip Registers

Interrupt method was not working because it seems reading a card does not trigger one.

See https://arduino.stackexchange.com/a/76285 and https://github.com/miguelbalboa/rfid/blob/master/examples/MinimalInterrupt/MinimalInterrupt.ino

Buttons

Start / Stop -> 17 and GND
Wake up / Next -> 04 and GND
Previous -> 16 and GND

System sounds

Place these sounds in the folder system on the SD card:

  • sleep.mp3
  • start.mp3

sleep.mp3 will be played just before the timed shutdown, start.mp3 will be played if the box started and initialized successfully.

Battery Voltage

The battery voltage is measured by the ADC of pin 13. A voltage divider halves the voltage so that the pin can not be overloaded (max 3.3V). The voltage divider consists of two 100kOHM resistors, the voltage is measured between them. One side is connected to the battery and the other to ground. Pin 13s ADC (ADC2) can not be used while WIFI is on... damn.

TODOs

  • Card Reader with SPI. Configure hspi, second SPI channel? Or does SD Card + RFID run at the same channel?

Schematic without modules

Charging circuit

https://ww1.microchip.com/downloads/en/AppNotes/01149c.pdf MCP73837 ?

https://github.com/earlephilhower/ESP8266Audio

Running two SPI devices at once