PCB design with esp32

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 » Tue Apr 10, 2018 6:08 am

rmetzner49 wrote: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.
Yes, it can, but this is a switching power supply, which is not the most recommended thing to supply power to a microcontroller, this is why an LDO is usually used to supply the voltage. Reason is mostly the stability and low ripple of an LDO.

This Recom module should be good, if you use a 5V output variant, then after the 5V, use an LDO to supply the ESP.
I'm not making this stuff up, it's a good practice, seen in many designs. Most of the Power Management IC-s (PMIC, or PMU) use this in mind, that they have 1-2 switching converters, and 1-2 LDO-s. Switchings are good for powering up generic stuff with high current consumption (like your solenoid coil), and an LDO provide stable output for your microcontrollers.

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);
}

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

Re: PCB design with esp32

Postby legera » Tue Apr 10, 2018 1:16 pm

Thanks very much to every one ! I will propose a new version of this to get it perfect. Thanks again !

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: PCB design with esp32

Postby loboris » Tue Apr 10, 2018 2:04 pm

Vader_Mester wrote:... Yes, it can, but this is a switching power supply, which is not the most recommended thing to supply power to a microcontroller
I've been using various switching regulators with various microcontrollers (also with ESP32) both for proffessional and hobby projects for years and had no problems.
If designed properly, with good PCB layout and if all power supply recommendations for the used microcontroller are carefully considered, they are as good as any linear regulator.

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

Re: PCB design with esp32

Postby legera » Tue Apr 10, 2018 3:58 pm

Hey ! Thanks all for your answers ! It helped me a lot.
Here is the pcb updated :
Schematic_Arrosage-automatique-esp32_Sheet-1_20180410175358.png
Schematic_Arrosage-automatique-esp32_Sheet-1_20180410175358.png (103.27 KiB) Viewed 12603 times
PCB_Arrosage-auto-new_20180410175441.png
PCB_Arrosage-auto-new_20180410175441.png (27.21 KiB) Viewed 12603 times
Let me know if you see something wrong, I'm still a newbie !

Thanks in advance.

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

Re: PCB design with esp32

Postby rmetzner49 » Tue Apr 10, 2018 5:18 pm

ESP_Sprite:

Well that was embarrassing. The first rule of Electrical Engineering says "Is there Power"? Once I reconnected the "bare" Wroom, and it behaved correctly, I decided to pull U13 even though it shouldn't have been active. No change.

Then, after looking carefully at my "dub" to the Reset Pin, I could see the VCC pad was cold soldered. After re-soldering, I'm now communicating with the device. It requires a bit of attention when soldering the module to the board. You have to stay on the pad long enough to see the solder actually wick up and coat the top of the module's pad.

Still have a ways to go before I have the FTDI reset business working, but at least I'm past the road block.

Thank you so very much.

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

Re: PCB design with esp32

Postby rmetzner49 » Tue Apr 10, 2018 5:27 pm

loboris:

I completely concur and reject the notion that switching regulators can't do the job. What I *have* done on occasion when worried about headroom and noise is to use a 9V regulator to the input of the Arduino and then use its on-board regulator to get down to 5V.

I also reject Vader's claim that a switching supply is the best thing to use for powering solenoids. If you think about that one carefully and ask yourself what happens when the "catch diode" feeds energy back into the supply, you ask which type of supply has the LARGER capacitor to grab that energy. Many switchers have only on the order of 22uF for the final filter.

The solenoid is a current operated device and doesn't care much about constant voltage, therefore the best supply to drive a solenoid with is an unregulated supply with a huge filter capacitor.

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

Re: PCB design with esp32

Postby rmetzner49 » Tue Apr 10, 2018 5:35 pm

Veder_Mester:

"Reason is mostly the stability and low ripple of an LDO." That just isn't so. It's done for simplicity in systems where you need both 5V and 3.3V. You don't have to dissipate a lot of power to get from 5V to 3.3V, but you DO have a problem trying to get from 12 or 15V down to 5V or 3.3V when significant currents are involved.

If I have a 12V supply and I'm trying to get down to 3.3V or lower and the 3.3V load is 500mA, P=I*E. You need to get rid of 8.7V @ 1/2 amp, which is pretty tough to get rid of 4.4 Watts! The same problem getting from 5V to 3.3V needs only 1.7V, which is less than a watt, but there are STILL limits on what you can do with that LDO you speak of.

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

Re: PCB design with esp32

Postby ESP_Sprite » Wed Apr 11, 2018 1:05 am

rmetzner49 wrote:loboris:If you think about that one carefully and ask yourself what happens when the "catch diode" feeds energy back into the supply, you ask which type of supply has the LARGER capacitor to grab that energy.
You mean the flyback diode that is usually mounted over the pins of a relay? These do not feed back the energy into the supply, when power to the coil is removed they essentially 'short' the pins of the coil so the built-up energy dissipates in the ohmic resistance of the coil windings. I have never seen a circuit design that feeds the power back into the power supply.

On the larger argument: I highly doubt if either kind of power supply is 'better' to work with coils. Coils are essentially just inductive current sinks, and given they're well-dimensioned, both linear as well as regulated PSUs should handle that just fine.

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 » Wed Apr 11, 2018 7:34 am

Do not put any traces under the antenna section of the WROOM (see Hardware design rules). It will negatively effect your antenna performance, regardless of which side of the PCB you put it.
General rule of thumb is to not put anything in the antenna area or near it, and you shall be good.
Also make sure, you don't put any ground plane under the antenna.
Take a look at the underside of your Devkit for example. It can be seen that the GND plane ends where the antenna area starts, with a lot of Vias on the board.

I don't think there is anything else wrong with the design.

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);
}

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

Re: PCB design with esp32

Postby rmetzner49 » Wed Apr 11, 2018 12:38 pm

ESP_Sprite:

And what happens when the current in the coil reverses and the fly-back effect exceeds supply voltage? Isn't that exactly how a Boost Converter operates?
Attachments
7uveJ.png
7uveJ.png (12.98 KiB) Viewed 12572 times

Who is online

Users browsing this forum: Google [Bot] and 81 guests