Notifications
Clear all

Hardware Problem - Powering Confusion

59 Posts
4 Users
10 Reactions
14.6 K Views
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2005
Topic starter  

Posted by: @davee

It is a fundamental part of electical circuits, but often gets ignored, as if everyone is born with the knowledge.

🤣 🤣 🤣 You mean... you were born with that... like Instinct?  And no, I'm not, but I'm taking notes!

Posted by: @davee

https://www.electronics-tutorials.ws/rc/rc_1.html

If anything is confusing, please ask. 

I didn't know the formal definition, but as a kid, I did have the electronic box kit where you'd make experiments.  I remember ones with that made timers, triggers, sirens, flashing light (without and digital electronics).  Can't say that I retained how to repeat them as an adult though.  🙄 

Posted by: @davee

Adding resistor feed or direct connections to the reset pin from the power input risks breaking the timing relationship provided by the internal resistor-capacitor, which is why I have my doubts about that external resistor, or worse a direct connection to the power line:

Maybe, I miss-spoke somewhere.  There is a wake-up pin PIO16.  That is the one that Swiss Guy hooked up to the reset pin WHEN using the sleep functionality.  He has the 1K resistor going from VCC to the enable pin.  Also called the CH_PD pin on some boards.  And it only smok'n Inq that has the VCC directly connected to EN from some other Internet reference.

Posted by: @davee

I can imagine fitting an extra capacitor

Swiss Guy ended up using a 1000 uF across the GND/VCC.  He tried several others and used an oscilloscope to show the high surge current the ESP required would exceed the voltage regulators ability to supply enough current causing reboots.  He showed at 1000 uF it finally was nearly flat at the 70 mA average current value.  In my simplistic understanding, I think of it as the 1000 uF charges up from the battery/voltage regulator and the capacitor supplies the ESP 300 mA spikes before the voltage regulator gets a chance to notice them. 

I'm just now looking at the second excerpt you did from Swiss-Guy... and now I see he did have RST going through the resistor to 3.3V.  Well, my drawing is what I actually have wired 

Here's what I have now...

image

...and I guess it is blind dumb luck that I didn't smoke another ESP.  I've got plenty to spare.  😜

Posted by: @davee

As for why these parts are not in the module.

...

I am sorry this is an abstract discussion, but I hope it is understandable without being too patronising or long-winded.

If you would like (or even tolerate? 🤨 🤨 ) me to explain further, please let me know.

Nope... you got it perfect again (as far as I'm concerned).  I can definitely rationalize these points.  In fact, the third one is a definite!  I know the ESP-01 was designed initially to use the AT Modem command set for use in products to add WiFi ability.  So of course the ESP factory had to actually program it.  It was only the hacker community that realized that HEY... instead of ONLY using it as a WiFi interface attached via serial, AT command set... Geeze... It's a very significant 32-bit computer with orders of magnitude more memory.  Let's put a boot loader on it and punt our 8-bit Arduinos altogether.  These days I think of that boot loader as being hardware and it's just there for me to load my sketch onto it.  That was a senior moment. 😊 

VBR,

Inq



   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

Hi Ron @zander,

  I have  only been looking at ESP8266-12F, (and probably -12E variant, but not checked), commonly seen  with ESP8266MOD on the metal can.

Your printed text starts with ESP-01 ... this is a different module and requires a whole new investigation to answer the same questions. Sorry, but having just spent the best part of a day on the ESP8266, I am not keen to spend another day, at this point in time on the ESP-01. It may follow the same patterns, but it might not.

In addition, remember the microcontroller is only one of the components under the metal lid. I don't understand the relationship of companies like Ai-Thinker, who is one of many names associated with the metal canned modules, and Espressif who make the micocontroller itself, but the opportunities for variants, just in terms of resistors and capacitors under the metal hat seem almost limitless.

--------

For the 8266 I discussed, I think in general, adding an external resistor for the reset pin might be a mistake, because the circuit diagram says there is already a resistor and capacitor in the module, as I have discussed previously, but verifying all possibilities is impossible.

---------------------------

Re: Note that the RESET switch is across the resistor.

That is not what your diagram shows:

image

 The switch pulls down to ground when closed.

---------------------

If the ESP-01 package is the effectively same as the ESP8266, then the advice of pulling the chip power down pin high with a resistor, is understandable once the chip is booted, but a simple resistor to VCC ignores the power up timing relationship during the boot up period. Whilst I accept, it is not uncommon for chips to tolerate transitory timing rules being broken, so it may well work, but ignoring the manufacturer's design rules increases the risk of failure to boot, and in some cases damage to the chip.

I hope that clarifies some points. If anyone seriously needs to use the ESP-01, then I recommend they hunt down all the data sheets, schematics and so on, and perform diligent analysis from scratch. Using information from the web by third parties is like spinning a roulette wheel. Some will be lucky, others not. Many of those proferring advice are clearly not that familiar with the products, which is not surprising given the complexities of both the technology and the marketplace.

Best wishes, Dave



   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

Hi Ron @zander,

  I have  only been looking at ESP8266-12F, (and probably -12E variant, but not checked), commonly seen  with ESP8266MOD on the metal can.

Your printed text starts with ESP-01 ... this is a different module and requires a whole new investigation to answer the same questions. Sorry, but having just spent the best part of a day on the ESP8266, I am not keen to spend another day, at this point in time on the ESP-01. It may follow the same patterns, but it might not.

In addition, remember the microcontroller is only one of the components under the metal lid. I don't understand the relationship of companies like Ai-Thinker, who is one of many names associated with the metal canned modules, and Espressif who make the micocontroller itself, but the opportunities for variants, just in terms of resistors and capacitors under the metal hat seem almost limitless.

--------

For the 8266 I discussed, I think in general, adding an external resistor for the reset pin might be a mistake, because the circuit diagram says there is already a resistor and capacitor in the module, as I have discussed previously, but verifying all possibilities is impossible.

---------------------------

Re: Note that the RESET switch is across the resistor.

That is not what your diagram shows:

image

 The switch pulls down to ground when closed.

---------------------

If the ESP-01 package is the effectively same as the ESP8266, then the advice of pulling the chip power down pin high with a resistor, is understandable once the chip is booted, but a simple resistor to VCC ignores the power up timing relationship during the boot up period. Whilst I accept, it is not uncommon for chips to tolerate transitory timing rules being broken, so it may well work, but ignoring the manufacturer's design rules increases the risk of failure to boot, and in some cases damage to the chip.

I hope that clarifies some points. If anyone seriously needs to use the ESP-01, then I recommend they hunt down all the data sheets, schematics and so on, and perform diligent analysis from scratch. Using information from the web by third parties is like spinning a roulette wheel. Some will be lucky, others not. Many of those proferring advice are clearly not that familiar with the products, which is not surprising given the complexities of both the technology and the marketplace.

Best wishes, Dave



   
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2005
Topic starter  

Posted by: @davee

So in summary, it is a largely a case of Read ALL the Pages of ALL the Fxxxxxxxxx Manuals. If it says you can or must leave the pin floating for your particular case, then hopefully it will be fine.

... or use Inq Theory... Ask @davee, check Internet and as a last resort smoke'm, try something different, smoke'm again.  🤣 Buy in bulk and save money.  

Reading those things might as well be hieroglyphics (to me).  I still struggle with the concepts around a Mosfet.  At one time I wanted to drive a big-honk'n motor with my 3.3V logic ESP8266 through a Mosfet.  My last trial and smoke'n error the ESP8266 at full pin-on (PWM was taken out for the test) ... the motor was only running about 80% the speed relative to being directly connect to the battery.  The Mosfet did a RUD.  (Rapid Unplanned Disassembly, Elon Musk)



   
DaveE reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@davee Couple of things. I thought what I called an ESP01 is an ESP8266-01 or similar. As far as the reset across the resistor, yes I goofed and am making an eye appointment soonest when I can find my glasses and phone 😀 

After reading your discussion re floating, then the assumption I made when I read that the RST pin resets the board when pulled low made me think and others that it should be pulled high otherwise. Now that we know floating is ok, that resistor can be dropped. Similarly with the CH_PD (formerly known as EN) pin, floating or high is the 'enabled' state while pulled low causes the module to Power Down. (not documented in 8266 but it is in esp32) it does work, I have tested it on a NODEMCU 8266.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Inq
 Inq
(@inq)
Rocket Scientist or Space Cadet
Joined: 4 years ago
Posts: 2005
Topic starter  

Posted by: @zander

@davee I LOVE IT. So a digital device has an ever so analogue answer of maybe yes, maybe no. FANTASTIC!

I think the number of x's in Fxxxxxxxxx was not indicative of a longer word.  (... and yes, I know you know.  I am being ironical) 🤣 

 



   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@davee Apparently Amazon is also confused re ESP-01 and ESP8266. https://amz.run/7IfR

So is an ESP-01 an ESP8266 or not? I bet Dennis (@inq) knows.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@inq https://forum.dronebotworkshop.com/postid/43751/

WHAT???


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

H Ron @zander

Re:

So a digital device has an ever so analogue answer of maybe yes, maybe no. FANTASTIC!

However if I catch your meaning, 'best practice' is in those cases where they say floating, it is better to use the appropriate pull up/down.

Sorry, but no.

In some cases a pin may be left floating, because it is not an active input, so its state does not change an ouput.

But for other cases, when it is a input, but perhaps its input is usually a static value, then it may have a relatively weak internal pull up or down, which can overruled by an external connection. This connection might be something like a jumper, which when in position pulls the pin to ground, assuming the internal circuit is a weak pull up. The jumper would be put as close as possible to the pin, to minimise the chance of picking up a stray voltage. Alternately a more remote cicuit might strongly drive it both low and high as required, ignoring the prescence of a weak pull up or down.

If it says it can be left floating, then it is usually with certain circumstances, etc. If all of the rules are intellligently applied, it should be fine, but if they are stretched or ignored, anything may result.

Best wishes, Dave 



   
Ron reacted
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

Hi Ron @zander,

  According to

https://components101.com/sites/default/files/component_datasheet/ESP8266%20Datasheet.pdf

the ESP-01 is an 'open' PCB containing an ESP8266 with only 8 pins.

I have tried to state that I was looking at the ESP8266-12F (& probably-12E), which is a 'sealed' module, with the familiar rectangular metal hat and 22 connection 'pins'.

Are they the same? ... clearly no.

Do they both contain the same microcontroller ... probably yes ... I haven't checked the small print to see if that too has variants.

However, much of the confusion arises from the circuitry surrounding the ESP8266 microcontroller. 

So whilst they will have much in common, it does not mean that they will behave the same.

Best wishes, Dave

 



   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

Hi @inq

I think the number of x's in Fxxxxxxxxx was not indicative of a longer word.  (... and yes, I know you know.  I am being ironical) 🤣 

I was allowing the reader flexibility to choose their own interpretation, whilst keeping it 'family friendly' ... fabulous, fantastic,.... 

You might have your own suggestions ... 🤔 

Best wishes, Dave



   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@davee Maybe that is all true for you, but it says 8266, has links to the 8266 wiki etc etc. That's good enough for me.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@davee Well for at least one or two of the pins in question and backed up by experimental results some leave them floating, others apply a pull up or down. I choose to believe the published results thank you.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 5 years ago
Posts: 2049
 

Hi Ron @zander,

  Re Now that we know floating is ok, that resistor can be dropped. 

 Kind of true, but Be careful:

The reset pin on the outside of the ESP8266-12F, according to the data sheet, has an actual resistor and capacitor hidden under the metal hat, the resistor to hold it high when powered, and the capacitor prevents it going high too quickly, whilst the power is still stabilising, when the power is first switched on.

These two components are hidden under the metal lid, but are not part of the ESP8266 microprocessor, itself also hidden under the lid.

These two components mean that in most cases, it is not necessary to have an external pull up resistor, and furthermore, adding an external pull up may introduce problems.

---------------

But this pin is not an example of a pin that maybe left 'floating' at the microcontroller level. Hence, any other unit or module with an ES8266 microntroller at its heart may need different treatment of its reset pin.

And the reset switch connecting to ground should work fine, but fro reliable operation, only with short wire connections.

In short, this only applies to the ESP8266-12F (& probably ESP8266-12E).

All the rest, including the ESP-01, are back to the RTFMs for the specific board or module.

Best wishes, Dave



   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 6 years ago
Posts: 8047
 

@davee Perhaps you missed an earlier post, but modules ending in S have a built in resistor, those not ending in S do not. It is still wise however to use a VOM to verify in case some CH mfg has cut a corner.


First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Page 3 / 4