Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCB suggestion #3

Open
Kalrkloss opened this issue Oct 28, 2024 · 6 comments
Open

PCB suggestion #3

Kalrkloss opened this issue Oct 28, 2024 · 6 comments

Comments

@Kalrkloss
Copy link

I'm moving this here, because it belongs to the hardware folder.
The discussion so far:

Me:
Or make our own.
Maybe we can start by collecting the requirements, like display type, size, controls, battery, included communication modules, expansion bus, etc.
BTW., the ESP32 is pretty flexible when it comes to IO functions, it can route pretty much every special function to every GPIO.

I'll start:

Compact housing resembling a somewhat bigger USB stick
Integrated (LIION) battery and charging chircuit
Display: (I would prefer a smaller, transflective LCD, because it's visible in full sunlight so options:)
a) Big touch TFT
b) small (non touch) TFT
c) small transflective (monochrome) LCD
Rotary encoder + maybe additional buttons
Expansion port with 3.3V, GND and as many GPIOs as possible, 2.54 or 1.27 pitch (2.54 is better for DIY, but'll get huge). Maybe compatible to Flipper Zero?
Micro SD card
Integrated communication:
    WiFi, Bluetooth (already in the ESP32)
    LoRa 433MHz and/or 868/915MHz
    CC1101 433MHz and/or 868/915MHz (LoRa modules can't do ASK)
    NFC 13,56 MHz + antenna
    rfID 125kHz + antenna
    Infrared receiver/transmitter. Transmitter should be high power for TV-B-Gone
    USB A host port
    I2S codec with microphone and loudspeaker

Extension modules (should have I2C EEPROM for automatic identification):

CAN bus (ESP32 already has one, so only transceiver needed)
wideband SDR transceiver
VHF/UHF transceiver Module (e.g. DRA818V)
USDR compatible HF transceiver
simple I/Q shortwave SDR receiver
SI4732 based all-band receiver
additional LoRa/CC1101 for multiband and relay
JTAG/SWD debugger

andreock:
This can be a really good idea to save space and to make board ready for usage without soldering anything. A board based on ESP32-S3 with:

2 USB
a ST7789 display(maybe 1.54")
CC1101/SX1276(not both)
SD card slot
PN532(or even something better)
RFID(maybe)
IR
Li-ion battery circuit
5 push button like flipper

Can be a good starting point. I don't have much time to work on it but if anyone can help me, the result will be very interesting.

Me:
Why two USB? The ESP32-S3 has a native USB, which, by default, acts as a composite device consisting of a CDC serial port and a JTAG interface, for programming and debugging the chip.

So, even if you dedicate the serial port to host communication, you always have the JTAG left for debugging and programming.
Sure, some commercial boards have additionally a USB-to-serial chip, connected to the ESP's hardware serial port, but this isn't necessary at all, unless you reprogram the native USB to something else and still want to have an additional USB serial port.

Me (new):
I'd like to add another ESP32 module (C5 maybe) to handle the 6GHz and IEEE 802.15.4 stuff.

@andreock
Copy link
Member

andreock commented Oct 28, 2024

I think the specs can be:

  • ESP32-S3
  • 1 USB
  • ST7789 display
  • CC1101
  • SD card
  • PN532
  • IR
  • Battery circuit
  • Navigation buttons

ESP32 C series, as far as I know doesn't support USB OTG.

I'm also going to buy this board that I think it's already perfect for our purposes: https://www.lilygo.cc/products/t-embed-cc1101
I'm pretty sure that our PCB can't be cheaper than this board.

@PandemiK911
Copy link

Perhaps could me merge with #2 ?
I started designing a SMD PCB.

What is done actually :

  • a 2-sides PCB same size as the actual one. Integrated ESP32-S3 module and power circuit with USB (DATA -> ESP32 D+/D-) + TP4057 + 3.3V buck regulator + on/off switch + battery connector (JST XH).
  • footprints to solder actual TH SX1276 PCB (2x08), JST XH header for buttons and ST7789 display (1x08)
  • IR 38 kHz receiver and sender

All components in BOM are available at LCSC so it won't be difficult to order them.

Right now, I haven't been able to find a TH microsd socket. I'll go for a SMD version but that implies to solder on both sides (harder with SMD stencils).
Still have to figure how I could integrate PN532 and CC1101 as they needs antennas and that's not easy to design properly.

I also haven't been able to find reference for a 240x240 1,54" SPI TFT display. If someone could point me to a page, I will try to integrate it of find a replacement part.
Waveshare does some nice e-ink displays like those :

About USB host : ESP32-S3, ESP32-C3 and ESP32-C6 seems to have USB OTG. Espressif's product range is pretty complex ;-)
So if we have enough GPIO, ESP32-C6-MINI-1 is a good candidate : Wifi6, BLE5.3, Thread/Zigbee, USB OTG ... This is my reference MCU for new designs.

My idea is really to start with something easy to build and debug errors with already known components. Most of the time, you can't expect design a PCB from scratch and having it perfect at the first attempt.

Some good ideas so far ! Does someone wants to work on any part of the PCB ? I'm using Kicad and schematics can be split in sheets that allows multiple contributors. I'll be more than happy to share the actual work (how ?).

@andreock
Copy link
Member

Yes it's a good idea to merge issues #2 #3 togheter. If you need footprint + reference, I can share the ones that I used for the PCB. Are you sure about ESP32-C6 supporting USB-OTG? https://esp32.com/viewtopic.php?t=32196 check also datasheet https://www.espressif.com/sites/default/files/documentation/esp32-c6_datasheet_en.pdf USB-OTG is not mentioned

@PandemiK911
Copy link

My bad, you're right : ESP32-C3/C6 doesn't have USB-OTG. I was confused by the availability of CDC-ACM that can only be used as a serial port :

USB Serial/JTAG Controller Console
The USB Serial/JTAG Controller is a fixed-function USB device that is implemented entirely in hardware, meaning that it cannot be reconfigured to perform any function other than a serial port and JTAG debugging functionality. This is in contrast to the USB OTG controllers in some ESP chips that can be configured to perform the function of multiple types of USB devices.

Do we need CapibaraZero to be able to emulate something else than serial port on USB (eg storage device class) ?

(don't forget I don't have an actual device in hands and have not been able to test functionalities).

@andreock
Copy link
Member

Storage MSC+HID will be available in the next release to make BadUSB compliant with Duckyscript 3.0, so the chip must support USB OTG to use BadUSB section.

@andreock
Copy link
Member

Hi, is there any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants