Hi,
I’m getting a bit ahead of myself now as I’m still finishing up my current project (an alarm system/IO-card) based on the ESP32, but I want to get this going anyway.
Some of these questions may be better to ask in an electronics forum, but I’m going to ask anyway.
My next project will also be based on the ESP32, but contrary to the alarm system I do not intend to use a devboard (ESP32 Thing from Sparkfun). Instead, I want to use an ESP32-PICO-D4 directly soldered onto my PCB. This will save me some components and also make it possible to reduce the size of the PCB by a large amount. As I’m still learning hardware design, I have some questions that I need answered in order to make sure that I don’t paint myself into a corner.
- Antenna. I see two options here. Either an antenna as part of the PCB, or as an external one connected to the PCB via a wire. The PCB version has its anvantages since it can easily be included in the PCB layout. But from what I understand, the other version gives better performance and the PCB version also imposes som restrictions on the layou of the PCB. So, where can I find information about these two options, and are there more options? I’m assuming the ESP32 itself has some requirements regarding antenna design, where can I find those, and are there any guidelines I can follow?
- Power supply. The devise will be mounted on a wall and will be about the height of an 18650 battery, and access to mains is not really an option. As such I intend to use a 18650 as the power source, or possibly a LiPo cell. The device does not need to include a charger unit. As I also want to be able to connect it to an USB during development, I need to make sure that I design the device such that the USB power source and battery can be connected at the same time. Do any of you have some input on this?
- Sleepmode vs WiFi. The device will not do anything much of its time, but when it is activated by a user it would be preferable if it performs its job within 300ms, or less. If sleeping, would it be possible to connect to WiFi within 200ms if it waking up? Anyone with experience with this, please speak up.
- Acquiring the ESP32-PICO-D4. Are there any official European distributors that will sell to non-corporate buyers? I probably want to buy ~10 units.
Hardware device design questions
Re: Hardware device design questions
For Antenna, the tradeoffs are simple. If you are a beginner (or this is your first rev), I would HIGHLY recommend an external antenna. This will allow you to try different antennas out, and evaluate different scenarios. This will also make the layout easier; as all you must do is make all the RF paths 50 OHMs. If you don't have the money or space, go with the added risk of a PCB antenna. Make sure you add pi networks at the beginning and end of RF trace; you may need to rent a network analyzer to match your antenna properly. Here is a good guide on ESP8266 (similar applies to ESP32-PICO):
http://espressif.com/sites/default/file ... ide_en.pdf
Power supply:
You can use any number of PMIC that can charge your Li-ION cell via USB.
When USB is connected, its charging your battery, when USB is not connected, it would run from the cell. The USB can simultaneously be connected to a FTDI chip that talks UART.
I would just follow the Sparkfun schematic:
https://cdn.sparkfun.com/assets/learn_t ... ematic.pdf
Sleepmode and WiFi.
This is single biggest weakness of the ESP32 today. It takes about 250ms for the boot-loader to start. Associating with wifi can take another 200ms. Then grabbing an IP address from your router's DHCP might take anywhere from 300ms - 3000ms. If you need to transmit to an SSL server, then that’s another 1000ms for the TLS socket. After that extra delay is however much your web-server takes to respond an ACK.
Bottom line, the optimistic timing is 1000ms for a single wifi transmission.
Here is detailed timing analysis:
https://github.com/espressif/esp-idf/issues/799
http://espressif.com/sites/default/file ... ide_en.pdf
Power supply:
You can use any number of PMIC that can charge your Li-ION cell via USB.
When USB is connected, its charging your battery, when USB is not connected, it would run from the cell. The USB can simultaneously be connected to a FTDI chip that talks UART.
I would just follow the Sparkfun schematic:
https://cdn.sparkfun.com/assets/learn_t ... ematic.pdf
Sleepmode and WiFi.
This is single biggest weakness of the ESP32 today. It takes about 250ms for the boot-loader to start. Associating with wifi can take another 200ms. Then grabbing an IP address from your router's DHCP might take anywhere from 300ms - 3000ms. If you need to transmit to an SSL server, then that’s another 1000ms for the TLS socket. After that extra delay is however much your web-server takes to respond an ACK.
Bottom line, the optimistic timing is 1000ms for a single wifi transmission.
Here is detailed timing analysis:
https://github.com/espressif/esp-idf/issues/799
Re: Hardware device design questions
Uhm, most of what you wrote about the antenna just confused me, not your fault though .
Do you know of any good resources for a beginner in this particular field? I feel I need to read up.
The idea about using a charger is a good one, thanks.
Re. WiFi, I was afraid that would be too much to ask for. Setting a static IP would at least remove the DHCP part. I’ll have to experiment with power consumption in an always-on scenario, but even a high capacity battery won’t give many days worth of runtime and I’d like at least a month.
Do you know of any good resources for a beginner in this particular field? I feel I need to read up.
The idea about using a charger is a good one, thanks.
Re. WiFi, I was afraid that would be too much to ask for. Setting a static IP would at least remove the DHCP part. I’ll have to experiment with power consumption in an always-on scenario, but even a high capacity battery won’t give many days worth of runtime and I’d like at least a month.
Re: Hardware device design questions
Hi, you can check this one:
http://colinkarpfinger.com/blog/2010/th ... na-design/
http://colinkarpfinger.com/blog/2010/th ... na-design/
Who is online
Users browsing this forum: axellin, Baidu [Spider] and 118 guests