VanceVagell / kv4p-ht

Open source handheld ham radio project KV4P-HT
GNU General Public License v3.0
290 stars 24 forks source link

[PCB] Explore smaller ESP32 options #1

Open puterboy opened 1 month ago

puterboy commented 1 month ago
  1. For smaller size, you might want to consider the ESP32-Devkit module which has only 30 pins vs. 38 pins on the ESP32-WROOM. I thinks it's also a little cheaper. This should require only a trivial change to the PCB since presumably you are only using a small subset of the GPIOs anyway.

  2. Even better, how about designing a board that avoids the module and just uses the ESP32-S3 chip plus the CP2102 USB chip plus/minus a couple of other passive components to make an even smaller device. The assembly would be a little harder and you might not even save on cost, but you would have a more compact/integrated board.

  3. Finally, how about adding an option to the firmware to use wireless connectivity between the phone and the ESP32 using the ESP32 in AP-mode. Then you wouldn't need to use a USB connector and could place the PCB board anywhere. This could be especially useful if you want to use a larger fixed antenna.

VanceVagell commented 1 month ago

Thanks for the ideas, puterboy! I'd welcome any PCB design contributions, as I'm very new at that and it took a lot of experimentation and learning to reach the point the project is at.

That said, I did have several earlier prototypes, which used different ESP32 modules. The smallest was Adafruit QT Py ESP32-S2, which is really rather tiny. I did get it to work, but it wasn't up to par with what I wanted the project to do -- in particular it does not have a hardware UART and the software one failed unpredictably. Also, the audio was limited to 8kHz because the processor was just too slow, and single-core. I also built an earlier version around the DORHEA ESP32 D1 Mini NodeMCU, which is a bit more compact but it doesn't have pin headers for easy soldering so it's harder for people to work with.

In terms of #3, one major goal is to keep the kv4p HT battery-less, since a major benefit is just throwing it in a bag or glove compartment or whatever and knowing that as long as your phone is charged you can use it (don't have some other battery you need to keep topped-off). That's why I didn't go with something like a Bluetooth link to the phone (also, there are other radios that have this). But again, if you're interested in contributing a variant that has those features, I'd love to include it!

One thing related to #3 I do really want to offer, is to update the Android app to allow you to pair your phone to a laptop, and use the kv4p HT as a modem so you can do whatever arbitrary amateur radio data experiments you want, like SSTV etc. I actually think this would be fairly easy.

Thanks for the ideas!

puterboy commented 1 month ago

Here is an Amazon link to the 30 pin devkit ESP32 module https://www.amazon.com/AITRIP-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0CR5Y2JVD

It has the same power & functionality of the 38 pin model -- just smaller/fewer pin so it is missing a couple of the GPIOs which obviously are not needed in your project.

Adopting your project to the smaller board should be almost trivial.

Also, if you want to really cut the price suggest that people look on Aliexpress - you can get the ESP32 modules for about $3.50 . You can probably get all the parts for not much more than $10-$15 max. Shipping is free if you spend more than $10 in Choice Delivery items. Delivery times is under 2 weeks to the US.

wolrah commented 1 month ago

One thing related to #3 I do really want to offer, is to update the Android app to allow you to pair your phone to a laptop, and use the kv4p HT as a modem so you can do whatever arbitrary amateur radio data experiments you want, like SSTV etc. I actually think this would be fairly easy.

Would it perhaps be simpler to directly connect the unit to the laptop over USB? As I understand it the hardware is basically operating as a SDR, so maybe a SoapySDR driver could be implemented without any changed to the microcontroller side, or alternatively maybe a "sound card SDR" mode that has the microcontroller expose a USB Audio Class device and a serial port device for control.

esev commented 1 month ago

For #3, could the app be entirely web-based and hosted on the esp32? Then it wouldn't be tied to any one platform (Android).

thekalinga commented 4 weeks ago

I have no knowledge about micro controllers & radio perse, but if not tying software portion to any platform, kotlin-multiplatform (or) flutter are two options I am aware of.

VanceVagell commented 3 weeks ago

I'm updating this to focus on the smaller ESP32 recommendations. If you're interested in the other ideas, could you please file them as separate enhancement requests, one per idea? Thanks!

seanauff commented 3 weeks ago

Looking at the Espressif comparison table, the only ESP32 variant that meets the requirements of this project is the original ESP32, assuming the requirements are:

The ESP32-S3 has everything but the DAC, and is available in a small form factor from Wemos. Looks like there is a workaround for the lack of DAC, though it requires some more external components.

I agree it would be nice to have this in a smaller size but might not be worth it if the PCB design gets more complicated as a result.

puterboy commented 3 weeks ago

The module I mentioned above, the 30-pin ESP32-Devkit is identical to the model currently being used (same ESP chip) but 8 fewer pins so about 20% smaller. Should require only very trivial changes to the PCB design since only a few GPIO pins are used anyway.

seanauff commented 3 weeks ago

I just found 2 even smaller options, both with the Pico variant of the ESP32 chip. The differences look minor.

https://shop.pimoroni.com/products/tinypico-v2?variant=39285089534035

https://www.adafruit.com/product/5395

The Adafruit looks by far the smallest. Either option (as well as the one identified by @puterboy) would only require a footprint change for the module on the PCB.

puterboy commented 3 weeks ago

Not sur how popular the Pico variant is. The 30-pin devkit one I mention is very common - arguably more common than the 38 pin one that the current model uses (based on Amazon and Aliexpress purchases)

Jonty commented 3 weeks ago

A quick note about Bluetooth: I don't think you need to worry about changing the hardware to support this, it's reasonable to say that the module must receive power from a USB battery bank or similar if not connected to a phone. This is purely a matter of implementing the ability to connect to the ESP32 serial interface over Bluetooth instead of USB.

Having worked with ESP32 Bluetooth serial before this should be relatively straightforward, my only concern might be if it can support a baud rate high enough for your needs!

Given you lack a screen to display a pin, I'd suggest that the way to implement this would be to automatically go into bluetooth pairing mode if there is no USB data connection and use a default pin, then turn that off once a connection has been established.

DrFrankReade commented 3 weeks ago

I'll add that soldering castellated vias is a very easy thing to do with even basic soldering equipment, and you can also include thru-holes for people who want to do headers. Castellated vias allows a really shallow build and a flat back to the PCB. Nothing but your SMA sticking out the back, and even that's up for debate. As to which ESP is better, I can't say. I just love me some castellated vias. I have no attachment to the board below. image image

SmittyHalibut commented 1 week ago

In #63 I intend to do away with the dev boards entirely and put an ESP32 directly on the main board.

m1geo commented 1 week ago

Finding it hard to get 38 pin ESP32 WROOM boards that fit the PCB. I've brought several including those linked on the project page, but, the ESP32 board is too narrow! 😕

I'd suggest just adding the parts to the main PCB as then whoever makes the PCB with the LPF can just make the entire thing.

SmittyHalibut commented 1 week ago

NOTE: Must be ESP32, NOT ESP32-[extension]

I started working on an ESP32-S3 on-board direct replacement for these dev modules and @VanceVagell correctly pointed out that it doesn't have an on-board DAC. It appears that only the original ESP32 does.

Yes, adding an off-ship I2S CODEC is an option, but @VanceVagell has requested we not do that now. That's something we can work on at a later date/revision. For now, I'm going to stick to ESP32 (no extension) modules.

SmittyHalibut commented 1 week ago

https://products.espressif.com/#/product-selector?names=&filter={%22Wi-Fi%22:[%222.4%20GHz%20802.11%20b/g/n%22,%222.4%20GHz%20802.11%20ax%22],%22Bluetooth%22:[%22BR/EDR%20+%20Bluetooth%20LE%20v4.2%22,%22Bluetooth%20LE%20v5.0%22,%22Bluetooth%20LE%20v5.0%20(v5.3%20certified)%22],%22Products%22:[%22Module%22],%22Status%22:[%22Mass%20Production%22],%22Core%22:[%22Dual%20Core%22],%22Antenna%22:[%22PCB%22,%22Solder%20pad%20for%20external%20monopole%20antenna%22]}

Looks like we have 17 options, and really only:

All previous development has been done with ESP32-WROOM, so I'll go with that. I'll make sure not to use the PSRAM pins so any memory option remains available, and swappable/upgradable in the future.

Proceeding with https://jlcpcb.com/partdetail/EspressifSystems-ESP32_WROOM_32EN4/C701341

SmittyHalibut commented 1 week ago

Finding it hard to get 38 pin ESP32 WROOM boards that fit the PCB. I've brought several including those linked on the project page, but, the ESP32 board is too narrow! 😕

I'd suggest just adding the parts to the main PCB as then whoever makes the PCB with the LPF can just make the entire thing.

See #63 This is done for v2.0 that I'm working on now.

I'm pretty sure the footprint for that board was ... off...

Magnum164 commented 1 week ago

So question. Can the board be split into 2 parts?

The main board simply having a connector for pin outs to a daughter pcb holding the ESP32?

My eps32 is shy width wise for the 1.7b. I plan to simply run wires from the pcb to a separate device board holding the esp32.

Yea, different case but it is still just a open source project.

On Tue, Nov 5, 2024, 1:10 AM Mark Smith @.***> wrote:

Finding it hard to get 38 pin ESP32 WROOM boards that fit the PCB. I've brought several including those linked on the project page, but, the ESP32 board is too narrow! 😕

I'd suggest just adding the parts to the main PCB as then whoever makes the PCB with the LPF can just make the entire thing.

See #63 https://github.com/VanceVagell/kv4p-ht/issues/63 This is done for v2.0 that I'm working on now.

I'm pretty sure the footprint for that board was ... off...

— Reply to this email directly, view it on GitHub https://github.com/VanceVagell/kv4p-ht/issues/1#issuecomment-2456398889, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV7SRGTBURWQZFUJDXFCJ3Z7BONHAVCNFSM6AAAAABPOQJDPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJWGM4TQOBYHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SmittyHalibut commented 3 days ago

It can? But that's kinda what the ESP dev boards already do. Adding yet another layer of abstraction seems overkill.