Browse Source

Uploaded Lolin32 rev2-PCB

master
Torsten Stauder 5 years ago
parent
commit
030cb572bf
  1. BIN
      PCBs/Wemos Lolin32/Gerber/gerber.zip
  2. BIN
      PCBs/Wemos Lolin32/KiCad/Kicad-files.zip
  3. 0
      PCBs/Wemos Lolin32/Pictures/Soldered with peripherals1_rev1.jpg
  4. 0
      PCBs/Wemos Lolin32/Pictures/Soldered with peripherals2_rev1.jpg
  5. 0
      PCBs/Wemos Lolin32/Pictures/Soldered1_rev1.jpg
  6. 0
      PCBs/Wemos Lolin32/Pictures/Soldered2_rev1.jpg
  7. BIN
      PCBs/Wemos Lolin32/Pictures/Tonuino V2-Schematics.pdf
  8. BIN
      PCBs/Wemos Lolin32/Pictures/Tonuino V2_down.jpg
  9. BIN
      PCBs/Wemos Lolin32/Pictures/Tonuino V2_up.jpg
  10. 15
      PCBs/Wemos Lolin32/README.md
  11. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/Gerber/gerber.zip
  12. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/KiCad/Kicad-files.zip
  13. 0
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/3d-Model downside.jpg
  14. 0
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/3d-Model upside.jpg
  15. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered with peripherals1.jpg
  16. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered with peripherals2.jpg
  17. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered1.jpg
  18. BIN
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered2.jpg
  19. 0
      PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Tonuino-Lolin32-Schematics.pdf
  20. 42
      src/settings.h

BIN
PCBs/Wemos Lolin32/Gerber/gerber.zip

BIN
PCBs/Wemos Lolin32/KiCad/Kicad-files.zip

0
PCBs/Wemos Lolin32/Pictures/Soldered with peripherals1.jpg → PCBs/Wemos Lolin32/Pictures/Soldered with peripherals1_rev1.jpg

Before

Width: 2048  |  Height: 1152  |  Size: 916 KiB

After

Width: 2048  |  Height: 1152  |  Size: 916 KiB

0
PCBs/Wemos Lolin32/Pictures/Soldered with peripherals2.jpg → PCBs/Wemos Lolin32/Pictures/Soldered with peripherals2_rev1.jpg

Before

Width: 2048  |  Height: 1152  |  Size: 824 KiB

After

Width: 2048  |  Height: 1152  |  Size: 824 KiB

0
PCBs/Wemos Lolin32/Pictures/Soldered1.jpg → PCBs/Wemos Lolin32/Pictures/Soldered1_rev1.jpg

Before

Width: 2048  |  Height: 1152  |  Size: 677 KiB

After

Width: 2048  |  Height: 1152  |  Size: 677 KiB

0
PCBs/Wemos Lolin32/Pictures/Soldered2.jpg → PCBs/Wemos Lolin32/Pictures/Soldered2_rev1.jpg

Before

Width: 2048  |  Height: 1152  |  Size: 789 KiB

After

Width: 2048  |  Height: 1152  |  Size: 789 KiB

BIN
PCBs/Wemos Lolin32/Pictures/Tonuino V2-Schematics.pdf

BIN
PCBs/Wemos Lolin32/Pictures/Tonuino V2_down.jpg

After

Width: 1438  |  Height: 799  |  Size: 52 KiB

BIN
PCBs/Wemos Lolin32/Pictures/Tonuino V2_up.jpg

After

Width: 1438  |  Height: 799  |  Size: 62 KiB

15
PCBs/Wemos Lolin32/README.md

@ -1,25 +1,26 @@
# Tonuino-PCB based on Wemos' Lolin32 # Tonuino-PCB based on Wemos' Lolin32
## Introduction ## Introduction
After I've been asked many times to provide a PCB, I finally did so :-) It makes use of Wemos' Lolin32 which is the predecessor of Lolin D32. D32's advantage over Lolin32 is especially, that a voltage-divider for measuring battery's voltage is already integrated (fixed-wired to GPIO 35). However, as I wasn't aware of that when buying Lolin32 and because of now, that multiple Lolin32 are here on my desk, my reasonable intention was to use them. So things would have been a bit easier with D32 but in the end it works the same way with Lolin32.
After I've been asked many times to provide a PCB, I finally did so :-) It makes use of Wemos' Lolin32 which is the predecessor of Lolin D32. D32's advantage over Lolin32 is especially, that a voltage-divider for measuring battery's voltage is already integrated (fixed-wired to GPIO 35). However, as I wasn't aware of that when buying Lolin32 and because of now, that multiple Lolin32 are here on my desk, my reasonable intention was to use them. So things would have been a bit easier with D32 but in the end it works the same way with Lolin32. As per rev2 of the PCB, I added a 10 uF-capacitor to smoothen the battery-measurement. Ii's optional but be advised values measured are a bit more volatile without capacitor-stabilization.
## Features ## Features
* Fits Wemos Lolin32 (not Lolin D32, Lolin D32 pro or Lolin 32 lite!) * Fits Wemos Lolin32 (not Lolin D32, Lolin D32 pro or Lolin 32 lite!)
* Outer diameter: 56 x 93mm * Outer diameter: 56 x 93mm
* JST-PH 2.0-connectors for buttons, rotary encoder, Neopixel, RFID and battery (not 2.54mm pitch!)
* JST-PH 2.0-connectors for buttons, rotary encoder, Neopixel, RFID, reset and battery (not 2.54mm pitch!)
* 2.54mm-connectors for MAX98357a and uSD-card-reader * 2.54mm-connectors for MAX98357a and uSD-card-reader
* Mosfet-circuit that switches off MAX98357a, Neopixel, headphone-pcb and uSD-card-reader automatically when deepsleep is active * Mosfet-circuit that switches off MAX98357a, Neopixel, headphone-pcb and uSD-card-reader automatically when deepsleep is active
* All peripherals are solely driven at 3.3V! Keep this especially in mind when choosing uSD-reader. If in doubts use one without voltage-regulator (link below). * All peripherals are solely driven at 3.3V! Keep this especially in mind when choosing uSD-reader. If in doubts use one without voltage-regulator (link below).
* If [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) is used, MAX98357a is automatically muted when there's a headphone plugged in and vice versa. * If [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) is used, MAX98357a is automatically muted when there's a headphone plugged in and vice versa.
* If `HEADPHONE_ADJUST_ENABLE` is enabled and a headphone is plugged in, an alternative maximum volume is activated. I added this feature because [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) makes use of an amp that (probably) "allows" children to damage ears. This maximum volume can be set and re-adjusted via webgui. * If `HEADPHONE_ADJUST_ENABLE` is enabled and a headphone is plugged in, an alternative maximum volume is activated. I added this feature because [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) makes use of an amp that (probably) "allows" children to damage ears. This maximum volume can be set and re-adjusted via webgui.
* rev2: Reset-pinheader added. Can be used to connect e.g. a [micro switch](https://www.ebay.de/itm/10x-Mini-Taster-Drucktaster-klein-Mikroschalter-6x6x5mm-Arduino-Raspberry-Pi/333273061003) to it, so you can reset Tonuino even in battery-mode from the outside of the enclosure. Micro switch can be placed somewhat hidden at the enclosure.
## Prerequisites ## Prerequisites
* If no [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) is connected, make sure `HEADPHONE_ADJUST_ENABLE` is not active. * If no [headphone-pcb](https://github.com/biologist79/Tonuino-ESP32-I2S/tree/master/PCBs/Headphone%20with%20PCM5102a%20and%20TDA1308) is connected, make sure `HEADPHONE_ADJUST_ENABLE` is not active.
* I used 390/130 kOhms-resistors as voltage-divider. However, make sure to use a multimeter to determine their exact values in order to achieve a better battery-measurement. They can be configured in `settings.h` as `rdiv1` and `rdiv2`. Hint: for Lolin D32's battery-measurement 100k+100k were used. However, I decided to change the ratio from 50/50% to 25/75% to have a "better" signal. 100/100 might be work as well; didn't test it. * I used 390/130 kOhms-resistors as voltage-divider. However, make sure to use a multimeter to determine their exact values in order to achieve a better battery-measurement. They can be configured in `settings.h` as `rdiv1` and `rdiv2`. Hint: for Lolin D32's battery-measurement 100k+100k were used. However, I decided to change the ratio from 50/50% to 25/75% to have a "better" signal. 100/100 might be work as well; didn't test it.
## Things to mention ## Things to mention
* RFID: In order to avoid buying a 6pin-JST-PH-connector I used 2x3pin. This is because I already had ten of them (see link below). Accidently, on my PCB-layout, I switched the direction of one of these two connectors. However, it's just an visual issue.
* In contrast to Lolin D32, Lolin32 doesn't feature an integrated voltage-divider. That's why on the lower left there's a JST-PH2.0-connector to connect the LiPo-battery. Make sure to connect (+) to the left und GND to the right. From there you need to solder two short wires (5cm or so) onto the pcb with a JST-PH2.0-connector attached on the other side. This one needs to be plugged into Lolin32. Please note: Lolin's JST-PH2.0-connector needs (+) left side and GND right side. Don't be confused if black/red-colouring of the JST-wires used seems "weird" because is reversed (black => (+); red => GND).
* RFID: In order to avoid buying a 6pin-JST-PH-connector I used 2x3pin instead. This is because I already had ten of them (see link below).
* In contrast to Lolin D32, Lolin32 doesn't feature an integrated voltage-divider. That's why on the lower left there's a JST-PH2.0-connector to connect the LiPo-battery. Make sure to connect (+) to the left und GND to the right. From there you need to solder two short wires (5cm or so) onto the pcb with a JST-PH2.0-connector attached on the other side. This one needs to be plugged into Lolin32 (see pictures-folder). Please note: Lolin's JST-PH2.0-connector needs (+) left side and GND right side. Don't be confused if black/red-colouring of the JST-wires used seems "weird" because is reversed (black => (+); red => GND).
* Better don't solder Lolin32 directly to the PCB. I recommend to make use of female connectors instead (link below). * Better don't solder Lolin32 directly to the PCB. I recommend to make use of female connectors instead (link below).
* When ordering a LiPo-battery, make sure to use [one](https://www.eremit.de/p/eremit-3-7v-2500mah-lipo-104050-jst-ph-2-0mm) with deep discharge protection! This is really really really important!!! * When ordering a LiPo-battery, make sure to use [one](https://www.eremit.de/p/eremit-3-7v-2500mah-lipo-104050-jst-ph-2-0mm) with deep discharge protection! This is really really really important!!!
@ -38,6 +39,7 @@ The heart of my project is an ESP32 on a [Wemos Lolin32 development-board](https
* [Female connector](https://de.aliexpress.com/item/32724478308.html) * [Female connector](https://de.aliexpress.com/item/32724478308.html)
* [(optional) IDC-connector female 6pin for headphone-pcb](https://de.aliexpress.com/item/33029492417.html) * [(optional) IDC-connector female 6pin for headphone-pcb](https://de.aliexpress.com/item/33029492417.html)
* [(optional) IDC-connector male 6pin for headphone-pcb](https://de.aliexpress.com/item/1005001400147026.html) * [(optional) IDC-connector male 6pin for headphone-pcb](https://de.aliexpress.com/item/1005001400147026.html)
* [(optional) Mikro switch](https://www.ebay.de/itm/10x-Mini-Taster-Drucktaster-klein-Mikroschalter-6x6x5mm-Arduino-Raspberry-Pi/333273061003)
* [LiPo-battery (2500 mAh) with connector JST PH 2.0mm](https://www.eremit.de/p/eremit-3-7v-2500mah-lipo-104050-jst-ph-2-0mm) * [LiPo-battery (2500 mAh) with connector JST PH 2.0mm](https://www.eremit.de/p/eremit-3-7v-2500mah-lipo-104050-jst-ph-2-0mm)
## Parts ## Parts
@ -48,15 +50,16 @@ The heart of my project is an ESP32 on a [Wemos Lolin32 development-board](https
* 2x 100k resistor * 2x 100k resistor
* 1x 130k resistor (can be replaced by 100k) * 1x 130k resistor (can be replaced by 100k)
* 1x 390k resistor (can be replaced by 100k) * 1x 390k resistor (can be replaced by 100k)
* 4x JST-PH2.0-connector (2 Pins)
* 5x JST-PH2.0-connector (2 Pins)
* 3x JST-PH2.0-connector (3 Pins) * 3x JST-PH2.0-connector (3 Pins)
* 1x JST-PH2.0-connector (5 Pins) * 1x JST-PH2.0-connector (5 Pins)
* Female connector as socket for Lolin32, uSD-reader and MAX98357a * Female connector as socket for Lolin32, uSD-reader and MAX98357a
* (optional for headphone-PCB) 1x IDC-connecor female (6pin) * (optional for headphone-PCB) 1x IDC-connecor female (6pin)
* (optional for headphone-PCB) 1x IDC-connecor male (6pin) * (optional for headphone-PCB) 1x IDC-connecor male (6pin)
* rev2: (optional) 10 uF capacitor (used to smooth battery management)
## Where to order? ## Where to order?
I ordered my PCBs at [jlcpcb](https://jlcpcb.com/). 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](https://www.gerblook.org/) and upload `gerber.zip` from the Gerberfiles-folder. I ordered my PCBs at [jlcpcb](https://jlcpcb.com/). 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](https://www.gerblook.org/) and upload `gerber.zip` from the Gerberfiles-folder.
## Do I need to install KiCad? ## 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](https://jlcpcb.com/)). However, all Kicad-files used are provided as well.
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](https://jlcpcb.com/)). However, all Kicad-files used are provided as well.

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/Gerber/gerber.zip

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/KiCad/Kicad-files.zip

0
PCBs/Wemos Lolin32/Pictures/3d-Model downside.jpg → PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/3d-Model downside.jpg

Before

Width: 1438  |  Height: 799  |  Size: 53 KiB

After

Width: 1438  |  Height: 799  |  Size: 53 KiB

0
PCBs/Wemos Lolin32/Pictures/3d-Model upside.jpg → PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/3d-Model upside.jpg

Before

Width: 1438  |  Height: 799  |  Size: 65 KiB

After

Width: 1438  |  Height: 799  |  Size: 65 KiB

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered with peripherals1.jpg

After

Width: 2048  |  Height: 1152  |  Size: 916 KiB

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered with peripherals2.jpg

After

Width: 2048  |  Height: 1152  |  Size: 824 KiB

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered1.jpg

After

Width: 2048  |  Height: 1152  |  Size: 677 KiB

BIN
PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Soldered2.jpg

After

Width: 2048  |  Height: 1152  |  Size: 789 KiB

0
PCBs/Wemos Lolin32/Pictures/Tonuino-Lolin32-Schematics.pdf → PCBs/Wemos Lolin32/_Archiv/rev1/Pictures/Tonuino-Lolin32-Schematics.pdf

42
src/settings.h

@ -1,7 +1,7 @@
#include "Arduino.h" #include "Arduino.h"
//########################## MODULES ################################# //########################## MODULES #################################
#define MDNS_ENABLE // When enabled, you don't have to handle with Tonuino's IP-address. If hostname is set to "tonuino", you can reach it via tonuino.local
//#define MDNS_ENABLE // When enabled, you don't have to handle with Tonuino's IP-address. If hostname is set to "tonuino", you can reach it via tonuino.local
#define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd #define MQTT_ENABLE // Make sure to configure mqtt-server and (optionally) username+pwd
#define FTP_ENABLE // Enables FTP-server #define FTP_ENABLE // Enables FTP-server
#define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled #define NEOPIXEL_ENABLE // Don't forget configuration of NUM_LEDS if enabled
@ -130,26 +130,26 @@ float voltageIndicatorHigh = 4.2; // Upper range for Neopixel-
#ifdef MQTT_ENABLE #ifdef MQTT_ENABLE
uint16_t mqttRetryInterval = 15; // Try to reconnect to MQTT-server every (n) seconds if connection is broken uint16_t mqttRetryInterval = 15; // Try to reconnect to MQTT-server every (n) seconds if connection is broken
uint8_t mqttMaxRetriesPerInterval = 1; // Number of retries per time-interval (mqttRetryInterval). mqttRetryInterval 15 / mqttMaxRetriesPerInterval 1 => once every 15s uint8_t mqttMaxRetriesPerInterval = 1; // Number of retries per time-interval (mqttRetryInterval). mqttRetryInterval 15 / mqttMaxRetriesPerInterval 1 => once every 15s
#define DEVICE_HOSTNAME "ESP32-Tonuino" // Name that that is used for MQTT
static const char topicSleepCmnd[] PROGMEM = "Cmnd/Tonuino/Sleep";
static const char topicSleepState[] PROGMEM = "State/Tonuino/Sleep";
static const char topicTrackCmnd[] PROGMEM = "Cmnd/Tonuino/Track";
static const char topicTrackState[] PROGMEM = "State/Tonuino/Track";
static const char topicTrackControlCmnd[] PROGMEM = "Cmnd/Tonuino/TrackControl";
static const char topicLoudnessCmnd[] PROGMEM = "Cmnd/Tonuino/Loudness";
static const char topicLoudnessState[] PROGMEM = "State/Tonuino/Loudness";
static const char topicSleepTimerCmnd[] PROGMEM = "Cmnd/Tonuino/SleepTimer";
static const char topicSleepTimerState[] PROGMEM = "State/Tonuino/SleepTimer";
static const char topicState[] PROGMEM = "State/Tonuino/State";
static const char topicCurrentIPv4IP[] PROGMEM = "State/Tonuino/IPv4";
static const char topicLockControlsCmnd[] PROGMEM ="Cmnd/Tonuino/LockControls";
static const char topicLockControlsState[] PROGMEM ="State/Tonuino/LockControls";
static const char topicPlaymodeState[] PROGMEM = "State/Tonuino/Playmode";
static const char topicRepeatModeCmnd[] PROGMEM = "Cmnd/Tonuino/RepeatMode";
static const char topicRepeatModeState[] PROGMEM = "State/Tonuino/RepeatMode";
static const char topicLedBrightnessCmnd[] PROGMEM = "Cmnd/Tonuino/LedBrightness";
static const char topicLedBrightnessState[] PROGMEM = "State/Tonuino/LedBrightness";
#define DEVICE_HOSTNAME "ESP32-Tonuino-Leonie" // Name that that is used for MQTT
static const char topicSleepCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/Sleep";
static const char topicSleepState[] PROGMEM = "State/Tonuino-Leonie/Sleep";
static const char topicTrackCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/Track";
static const char topicTrackState[] PROGMEM = "State/Tonuino-Leonie/Track";
static const char topicTrackControlCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/TrackControl";
static const char topicLoudnessCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/Loudness";
static const char topicLoudnessState[] PROGMEM = "State/Tonuino-Leonie/Loudness";
static const char topicSleepTimerCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/SleepTimer";
static const char topicSleepTimerState[] PROGMEM = "State/Tonuino-Leonie/SleepTimer";
static const char topicState[] PROGMEM = "State/Tonuino-Leonie/State";
static const char topicCurrentIPv4IP[] PROGMEM = "State/Tonuino-Leonie/IPv4";
static const char topicLockControlsCmnd[] PROGMEM ="Cmnd/Tonuino-Leonie/LockControls";
static const char topicLockControlsState[] PROGMEM ="State/Tonuino-Leonie/LockControls";
static const char topicPlaymodeState[] PROGMEM = "State/Tonuino-Leonie/Playmode";
static const char topicRepeatModeCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/RepeatMode";
static const char topicRepeatModeState[] PROGMEM = "State/Tonuino-Leonie/RepeatMode";
static const char topicLedBrightnessCmnd[] PROGMEM = "Cmnd/Tonuino-Leonie/LedBrightness";
static const char topicLedBrightnessState[] PROGMEM = "State/Tonuino-Leonie/LedBrightness";
#ifdef MEASURE_BATTERY_VOLTAGE #ifdef MEASURE_BATTERY_VOLTAGE
static const char topicBatteryVoltage[] PROGMEM = "State/Tonuino/Voltage";
static const char topicBatteryVoltage[] PROGMEM = "State/Tonuino-Leonie/Voltage";
#endif #endif
#endif #endif
Loading…
Cancel
Save