PCB design with esp32

legera
Posts: 3
Joined: Fri Apr 06, 2018 9:57 am

PCB design with esp32

Postby legera » Fri Apr 06, 2018 10:05 am

Hello everyone,

I'm new in electronic design and pcb design. So I'm currently designing a new pcb with esp32 for an automatic watering system.

Here is the schematic, can someone tell me if there is something wrong, specially with the voltage regulator. If you have some tips to improve this.

Thanks in advance.
Attachments
my_pcb.PNG
pcb watering system
my_pcb.PNG (63.48 KiB) Viewed 19132 times

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: PCB design with esp32

Postby ESP_Sprite » Sat Apr 07, 2018 3:09 am

In general, check the hardware design guidelines for what applies to your situation: https://www.espressif.com/sites/default ... nes_en.pdf . For instance, it suggests a slightly more complex reset circuit consisting of a RC-combination.

Specific to your case:
- I'd put the reset, GPIO0, TxD, RxD and Gnd on one connector. Makes it easier to automatically flash your board (resetting and putting it in boot mode using handshake pins on your USB-to-serial-converter), making development less painful.
- I'd run the 3.3V LDO from the 5V LDO. This way, the power dissipation resulting form the voltage drop between the 12V and 3.3V line is shared between the two LDOs.
- I assume the TRANSFO_12V block actually is a transformer plus bridge rectifier plus smoothing caps, or actually a switched mode power supply; in any case, something that spits out a reasonably smooth 12VDC and not AC? If not, you should add a bridge rectifier and some hefty electrolythics.
- In general, why not use a 5V PSU? I don't see the 12V being used for anything but the LDOs. For instance, the HLK-PM01 would work really well here (but there also are other integrated 5V switch converters that can work. Watch their output current, though, make sure it's >=500mA max)
- Your mosfet has an unneeded gate resistor (R4) in its signal path. I think you're confusing the topology for one you'd use with a BJT, for a mosfet this is unnecesary. Rather, connect an 10K between the gate and the ground to make sure the gate has a defined level even when the GPIO is tristated.

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: PCB design with esp32

Postby WiFive » Sat Apr 07, 2018 3:26 am

ESP_Sprite wrote: - In general, why not use a 5V PSU? I don't see the 12V being used for anything but the LDOs.
It's used for the solenoid valve, but the terminal block looks wired wrong.

User avatar
Vader_Mester
Posts: 300
Joined: Tue Dec 05, 2017 8:28 pm
Location: Hungary
Contact:

Re: PCB design with esp32

Postby Vader_Mester » Sat Apr 07, 2018 7:49 am

I would suggest the following:
Your solenoid will for sure burn down the LDO when engaged. Consider that when using Wifi, the ESP32 can momentarily have 400mA spikes, and the coil probably consumes some 5V power also, this would require you to have good heat dissipation for the 5V LDO, which is a pain in the ass, to design.

I have 2 suggestions:
Plan A)
Intead of the LDO, use a DC-DC buck converterlike this one.
This is actually adjustable. The underside of the PCB is flat, so you can just solder it onto your PCB as a module, and adjust the output as needed.
I have these modules, and use them. The size of this is smaller than the size of the WROVER module, so very tiny, but can output 2A-s easily.

So you would do this: 12VDC -> 5V Switching PSU ->3.3V LDO, use the 5V for the solenoid coil only, and for 3.3V LDO.
This way you will have a much better circuit, with big power headroom, and will allow the solenoid coil to firmly close and stay closed. (Imagine you pull the solenoid coil, it is a coil, so it will have a peak current when you pull it, which will settle down. This peak will surge the LDO, resulting in big heat, and a huge voltage drop, which will destabilize the 3.3V LDO, resulting in POR reset of your ESP.... non of the above is good. The 5V buck converter can easily supply all of the loads, without harming anything else.

Plan B)
As Sprite suggested, use a simple 5V power supply you can buy anywhere, but use a boost converter for the 12V. A boost converter is essentially a switching supply, converting a lower DC voltage (like 5V) to a higher DC voltage (like 12V). This will eliminate the need for a big transformer. The boost converter will only operate when the 12V output signal is needed (when the solenoid is on). This is the simplest and sexiest approach, which the least amount of parts, and this version is the cheapest, hence you don't need a big clumsy expensive transformer for the 12V.

Vader[BEN]

Code: Select all

task_t coffeeTask()
{
	while(atWork){
		if(!xStreamBufferIsEmpty(mug)){
			coffeeDrink(mug);
		} else {
			xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
			xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
		}
	}
	vTaskDelete(NULL);
}

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: PCB design with esp32

Postby WiFive » Sat Apr 07, 2018 8:32 am


rmetzner49
Posts: 27
Joined: Mon Mar 27, 2017 1:09 am

Re: PCB design with esp32

Postby rmetzner49 » Sun Apr 08, 2018 3:04 pm

I'm also in the process of developing a Custom Controller around the ESP32-WROOM module and I'm having some unique anomalies. I own 3-4 ESP32-DEV Boards and those work just fine, the "EN" pin is at 3.3V like it should be.

What I am experiencing across three different ESP32-WROOM Modules, I don't see the "EN" pin or "CHIP_PU" pin being pulled up even though I have the recommended 10K-.1uF connected as recommended. I don't think just connecting it to 3V3 is the right answer, but the 10K pullup doesn't do squat. The pin stays at about 600mv.

The small black module is the 3.3V supply, a RECOM 7-28V in, 3.3V@1A out converter. The entire unit runs on three Li-Po cells making 12V.

I have NOTHING connected to the Strapping Pins. Strangely enough, I was only ONCE able to have the device active in "Echo Mode" when connecting the CP2102 UART device by Adafruit.

I feel like the power-on sequencing isn't being correctly executed for whatever reason. Any suggestions?

Rob Metzner
Attachments
WP_20180408_10_56_34_Pro.jpg
WP_20180408_10_56_34_Pro.jpg (414.65 KiB) Viewed 19040 times

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: PCB design with esp32

Postby ESP_Sprite » Mon Apr 09, 2018 3:07 am

That doesn't make sense; the EN input does not have physical output logic in the ESP32. The 600mV is kind-of suspect, however, as it's exactly one diode drop. Does your ESP32 actually get power supply voltage? Asking because the only way this can happen I can imagine is if the Vcc is somehow tied to ground; then the internal protection will possibly pull the reset pin down.

rmetzner49
Posts: 27
Joined: Mon Mar 27, 2017 1:09 am

Re: PCB design with esp32

Postby rmetzner49 » Mon Apr 09, 2018 1:35 pm

That's kind of an obvious screw-up, but I don't think that's the case. I've attached the artwork for you. Keep in mind the reason I "dubbed" the RESET line is because of the absence of the FTDI-231 which is not yet populated. In an attempt to communicate with the module, I've wired around the FTDI-231 and I'm feeding it with Adafruit's USB to Serial Cable. https://www.adafruit.com/product/954.
Measuring at the TX and RX pins, when I have the cable connected, I get 2.28V on both pins. Disconnected, I get 0.2V.

I've also taken a RAW Wroom Module, just attached 3V3 and GND to it with 26AWG wires and the same thing happens.

I've bought all these from US sellers on Ebay, is it possible there's a bad batch of modules floating around?

P.S. the layout is done with PCB123 so unless I've incorrectly created the WROOM part, the pin reversal should't be happening. I've attached both the layout and part of the schematic for you. I can also send you the ONE Wroom I had connected with just wires. I've since also purchased a breakout board that I would plop that down on. If you email me an address of where to ship the ONE unit, I'll be happy to. rmetzner49@gmail.com. I very much appreciate a second set of eyes on this thing, since it has me baffled. All of the circuit has been tested via breadboard but using a DEV board instead of the raw module.
Attachments
Schematic.pdf
(305.56 KiB) Downloaded 715 times
EPUMP_WROOM_MAX35101_REV_0.pdf
(54.41 KiB) Downloaded 619 times

rmetzner49
Posts: 27
Joined: Mon Mar 27, 2017 1:09 am

Re: PCB design with esp32

Postby rmetzner49 » Mon Apr 09, 2018 1:47 pm

To Vader_Mester:

These RECOM modules https://www.digikey.com/product-detail/ ... ND/2652147 are a great way to step down from 12V to 3.3V. With the 7-42V input range, you could use one of these with a 12V "Wall Wart" for Solenoid Power.

That should be more than enough headroom even if the solenoid takes the 12V down a ways. I've used these in many Car Projects with Arduino small (0.6" to 1.2") boards.

ESP_Sprite
Posts: 9051
Joined: Thu Nov 26, 2015 4:08 am

Re: PCB design with esp32

Postby ESP_Sprite » Tue Apr 10, 2018 3:49 am

Schematic and layout looks good to me. I see you have actually populated U13; does something happen when you pull that off? That's the only other thing connected to the reset line, hence me asking.

You also say you wired up a Wroom32 manually; does it also have the specific thing of reset staying at 0.6V? Casn you show how you wired it up?

Who is online

Users browsing this forum: No registered users and 220 guests