Don't use GPIO 9 or 10

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Don't use GPIO 9 or 10

#31 Post by Shardan » 18 Nov 2017, 16:15

hm... just checked, the schemtic is still there. Maybe try <shift> + <F5> to refresh page or clear browser cache?

Anyways - the schematic was made for a ESP-01,. not for a nodeMCU.
The nodeMCU's and the WeMos D1 have their own circuits inside so additional resistors might not work as expected.

GPIO2 and GPIO15 are used at boot time to select the memory where the firmware resides.
This makes it possible to boot from a SD-card for example - atm not supported with ESPEasy.
GPIO0 pulled to low at boot time selects the boot loader to start with.
For ESPEasy at boot time these pins must be set to:

GPIO0 -> 10KOhm - Vcc (high) (low for starting the boot loader)
GPIO2 -> 10KOhm - Vcc (Memory select)
GPIO15 -_> 10KOhm --> Gnd (Memory select)

If i may ask: Why using a nodeMCU at all? It just takes up power for things like UART-USB converter you need only once
and it makes the whole thing bigger then required.
Another question: Why using these GPIO's at all? IF you use a nodeMCU or an ESP-12 type, there are more GPIO's availlable.

Can you give me a schematic so i can see what you're doing?

Regards
Shardan

PS: I'fe published some tested examples in my user wiki, all schematics and PCB's included.
https://www.letscontrolit.com/wiki/inde ... er:Shardan
Regards
Shardan

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Don't use GPIO 9 or 10

#32 Post by TD-er » 18 Nov 2017, 17:51

The design of the board is here: https://github.com/TD-er/NodeMCU_PCB (see rev 2 directory, rev3 is not usable)
About the "why" using a NodeMCU.
Well, I wanted to have some simple test-board for testing sensors which fit inside the cheapest available plastic case with air vents and something you can power using a standard USB-charger.

I made some pads available for SPI, since there are lots of interesting parts for SPI (already ordered an e-ink screen to play with), but I guess I can use these also for the touch sensors. (ideal to use in plastic cases, since you do not have to drill holes)
Probably a bad idea then to use GPIO-15 :)

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Don't use GPIO 9 or 10

#33 Post by Shardan » 18 Nov 2017, 20:21

Depends. If the touch switch gives a reliable "low" at startup you can use it even with GPIO15. Give it a try, in worst case it boots into flash mode.
If you can give me a schematic i'll give it a try with a pcb cad.

Regards
Shardan
Regards
Shardan

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Don't use GPIO 9 or 10

#34 Post by TD-er » 18 Nov 2017, 22:15

The Fritzing file is also included in the link I gave, however, I used Fritzing only to generate the PCB.

It generates a schematic rev 2 rev 3, but it isn't nice.
I was planning to use these capacitive touch switches. They are bases on the TTP223 and you can select toggle/switch mode and invert by shorting A or B:
Trigger setting mode: (1- > Short ; 0- > No Short)
AB=00:No-lock High TTL level ouput;
AB=01:Self-lock High TTL level ouput;
AB=10:No-lock Low TTL level ouput;
AB=11:Self-lock Low TTL level ouput;
I will test first on a breadboard if it will work.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Don't use GPIO 9 or 10

#35 Post by Shardan » 19 Nov 2017, 01:24

Hm.....
I'd suggest some changes if i understand the schematics right :)

- Two SSD1306 Displays - as far as i know it does not work as the display plugins for LCD and OLED can't handle two displays even with different addresses.
I don't think there's a fix for that, it will need a massive rework of the plugin. But i might be wrong about the fix - try it with two displays before you cut a case :)

- If you need additional GPIO's:
GPIO16 can be used for some purposes. Don't use for counters for example, it won't work. For output, driving a led or relay it works.
GPIO1 (Tx) and GPIO3 (Rx) can be used if you switch off the serial port in the Tools --> Advanced settings.
Be aware that on booting there will be some signals on Tx anyways, a relay or a led might "flicker".
If you deactivate the serial transmission in the advanced settings the GPIO1/GPIO3 can be configured for the CO2-Sensor, i've checked that.
Please test on a breadboard before soldering if that works as expected or if the sensor gets "irritated" by the startup data sent from the ESP.

- You may use GPIO10 (SD3) too. Do NOT use GPIO9, it might crash the ESP.

- Afaik the SPI port of the ESP is on CLK (SDCLK) - SD0 (MISO) - CMD (CS) - SD1 (MOSI). You've used the standard GPIO's for it. Is that correct?
ATM the SPI is not supported for displays and such by ESPEasy as far as i know.

As long as keeping the Flash button pressed all the time for flashing is the only problem i'd say it's tolerable.

In general:
Left pinheader is SPI and 3x I2C. Really SPI, not just some GPIO's broken out?
Right pinheader is 3x I2C and Serial, both headers with power supply.
Is that correct?

Do you plan to plug Displays and touch sensor directly to the PCB or do you plan to use wires?

Can you tell me the exact sizes of the PCB?

Regards
Shardan
Regards
Shardan

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Don't use GPIO 9 or 10

#36 Post by TD-er » 19 Nov 2017, 10:23

Shardan wrote: 19 Nov 2017, 01:24 Hm.....
I'd suggest some changes if i understand the schematics right :)

- Two SSD1306 Displays - as far as i know it does not work as the display plugins for LCD and OLED can't handle two displays even with different addresses.
I don't think there's a fix for that, it will need a massive rework of the plugin. But i might be wrong about the fix - try it with two displays before you cut a case :)
The idea was to have some "universal" experimental print. There was room for it and I figured the display would be about as high as the NodeMCU itself, so there might be some usecase possible where it would make sense to have a display on the same size as the NodeMCU. It was not my intention to have several displays installed at the same time.
On the other hand, limitations in libraries are there to be solved ;)
Shardan wrote: 19 Nov 2017, 01:24 - If you need additional GPIO's:
GPIO16 can be used for some purposes. Don't use for counters for example, it won't work. For output, driving a led or relay it works.
GPIO1 (Tx) and GPIO3 (Rx) can be used if you switch off the serial port in the Tools --> Advanced settings.
Be aware that on booting there will be some signals on Tx anyways, a relay or a led might "flicker".
If you deactivate the serial transmission in the advanced settings the GPIO1/GPIO3 can be configured for the CO2-Sensor, i've checked that.
Please test on a breadboard before soldering if that works as expected or if the sensor gets "irritated" by the startup data sent from the ESP.

- You may use GPIO10 (SD3) too. Do NOT use GPIO9, it might crash the ESP.
That is great information, which I think should be somewhere on the wiki.
Especially the GPIO16 -I can confirm- has little to none description on the wiki. I now understand what is so special about it (no interrupt) and its default use is to perform a reset from deep sleep.
The GPIO10 may be used to perform QIO mode on the flash, so there may be boards which do not have this pin available without soldering, right?
Shardan wrote: 19 Nov 2017, 01:24 - Afaik the SPI port of the ESP is on CLK (SDCLK) - SD0 (MISO) - CMD (CS) - SD1 (MOSI). You've used the standard GPIO's for it. Is that correct?
ATM the SPI is not supported for displays and such by ESPEasy as far as i know.
Those are the pins suggested in the ESPeasy web interface (Hardware => SPI interface.
Currently I do not have SPI devices, other than the e-ink display. So perhaps I can re-use pins on the SPI part to have a touch sensor.
Shardan wrote: 19 Nov 2017, 01:24 As long as keeping the Flash button pressed all the time for flashing is the only problem i'd say it's tolerable.

In general:
Left pinheader is SPI and 3x I2C. Really SPI, not just some GPIO's broken out?
Right pinheader is 3x I2C and Serial, both headers with power supply.
Is that correct?
As seen from the top (the nodeMCU is between the PCB and the bottom of the case)
Please see the images of the PCB here: https://github.com/TD-er/NodeMCU_PCB

The idea is to have about every possible combination of I2C pins on the left and right. Then about any possible I2C sensor board available will fit somewhere.
Also the space for the CO2 sensor is fit for either the MH-Z19 and the Senseair S8 (dimensions and signal compatible, not software compatible)
Shardan wrote: 19 Nov 2017, 01:24 Do you plan to plug Displays and touch sensor directly to the PCB or do you plan to use wires?
The display and the touch sensor will be mounted on a pinheader (which has to soldered first, before the rest).
By using the pinheader, the combined height of the stack will fit exactly inside the case. So the display will be pressed slightly against the top.
Shardan wrote: 19 Nov 2017, 01:24 Can you tell me the exact sizes of the PCB?

Regards
Shardan
I will redo the measuring of the holes again, since the current PCB can only be mounted on 2 holes.
When using 4 screws, the bottom plate of the case will bend a little. So perhaps I was off by a few 10th of a mm. (and use slightly bigger holes)

The board is 50x70 mm.
My caliper suggests 41.6 mm and 61.7 mm between hole diameters.
The hole diameter for the screws must be about 2.5 mm diameter.
Edit: I made some drawing of the bottom plate holes relative to the PCB: https://github.com/TD-er/NodeMCU_PCB/bl ... 0holes.svg

For the new version of this board, I was planning to add some capacitors. Currently when the CO2 sensor is performing a measurement, the Ikea USB power supply makes some high frequency noise. So perhaps adding some capacitors at the 5V line will help to make it more silent and also be more forgiving when using USB cables which are not that good.
With the current PCB version, the NodeMCU was positioned a bit too far inside the case, so I had to use micro USB cables with 8 mm depth on the micro-USB side. That's not standard and probably leaves less room to shop for 'quality' USB cables.
In the Fritzing file of rev2 the NodeMCU was already positioned more to the edge, but I did not take new screenshots of that.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Don't use GPIO 9 or 10

#37 Post by Shardan » 19 Nov 2017, 14:01

TD-er wrote: 19 Nov 2017, 10:23
[...]
On the other hand, limitations in libraries are there to be solved ;)
There was a thread about this problem: http://www.letscontrolit.com/forum/view ... hilit=oled
Seems up to now it came to nothing.
That is great information, which I think should be somewhere on the wiki.
Especially the GPIO16 -I can confirm- has little to none description on the wiki. I now understand what is so special about it (no interrupt) and its default use is to perform a reset from deep sleep.
The GPIO10 may be used to perform QIO mode on the flash, so there may be boards which do not have this pin available without soldering, right?
On some boards it is broken out, on others i have (Wemos D1 Mini for example) it is not, right.
But if you want to integrate more parts on a 50x70 PCB you will have to get used to soldering SMD parts anyways.
Don't worry, it needs no witchcraft.
Those are the pins suggested in the ESPeasy web interface (Hardware => SPI interface.
Currently I do not have SPI devices, other than the e-ink display. So perhaps I can re-use pins on the SPI part to have a touch sensor.
Ah i see - just didn't notice up to now, I never used SPI with ESPEasy up to now.
As seen from the top (the nodeMCU is between the PCB and the bottom of the case)
Please see the images of the PCB here: https://github.com/TD-er/NodeMCU_PCB

The idea is to have about every possible combination of I2C pins on the left and right. Then about any possible I2C sensor board available will fit somewhere.
Also the space for the CO2 sensor is fit for either the MH-Z19 and the Senseair S8 (dimensions and signal compatible, not software compatible)
I see. It might definitely be better to put an ESP-12E/F directly on the board together with a voltage regulator for running on 5V.
I'm using a LF-33CDT for this, it has proved running well.
The display and the touch sensor will be mounted on a pinheader (which has to soldered first, before the rest).
By using the pinheader, the combined height of the stack will fit exactly inside the case. So the display will be pressed slightly against the top.
I see. It would be helpfull if you could provide a Screenshot of the PCB where i can see:
- Pinout: Which pin is which signal on the board
- Positioning: Where are the display/sensor on the board?
A raw marking will do (Print out, sketch parts/pins with a pen, scan in).
I will redo the measuring of the holes again, since the current PCB can only be mounted on 2 holes.
When using 4 screws, the bottom plate of the case will bend a little. So perhaps I was off by a few 10th of a mm. (and use slightly bigger holes)
The board is 50x70 mm.
My caliper suggests 41.6 mm and 61.7 mm between hole diameters.
The hole diameter for the screws must be about 2.5 mm diameter.
Edit: I made some drawing of the bottom plate holes relative to the PCB: https://github.com/TD-r/NodeMCU_PCB/blo ... 0holes.svg
For the new version of this board, I was planning to add some capacitors. Currently when the CO2 sensor is performing a measurement, the Ikea USB power supply makes some high frequency noise. So perhaps adding some capacitors at the 5V line will help to make it more silent and also be more forgiving when using USB cables which are not that good.
With the current PCB version, the NodeMCU was positioned a bit too far inside the case, so I had to use micro USB cables with 8 mm depth on the micro-USB side. That's not standard and probably leaves less room to shop for 'quality' USB cables.
In the Fritzing file of rev2 the NodeMCU was already positioned more to the edge, but I did not take new screenshots of that.
The noise from the power supply is a so called "Coil Beeping". The converter inside the power supply uses a high frequency and if a coil is poorly embedded or coated it tends to resonate. I don't think capacitors will stop that. Anyways some more capacitors is always a good idea. There is a reason why a simple sonoff basic switch is full of capacitors....

Anyways. If you can provide the info mentioned above I'll try to make a PCB layout for a ESP-12 on board with that. But definitely i need a raw sketch where parts reside. Honestly it takes very much time to find out by an undocumented PCB drawing.

Just these days i've tested a new pooling service for PCB production - the PCB quality is unbelieveable. Gold coverer pads (ENIG), contacted vias, silk on both sides, solder resist - it's all included.
Not the cheapest PCB maker, but best price for industrial quality PCB's. For 3 pieces (lowest allowed quantity) you'll pay below 30 € incl. shipping.
That says: Below 30€ for all together!
.
TestPCB_900px.jpg
TestPCB_900px.jpg (541.5 KiB) Viewed 58128 times
.
The layout is made with KiCAD, a free schematics and PCB CAD. The manufacturer can use the files from KiCAD directly, no Gerber export or SVG files necessary.

Regards
Shardan

PS: Even a level shifter for 5V I2C could be integrated with the board.
Regards
Shardan

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Don't use GPIO 9 or 10

#38 Post by TD-er » 19 Nov 2017, 22:34

Shardan wrote: 19 Nov 2017, 14:01 [...]
But if you want to integrate more parts on a 50x70 PCB you will have to get used to soldering SMD parts anyways.
Don't worry, it needs no witchcraft.
For another project, which is going to be based on the ESP8266 and has to be low power and portable, there certainly will be some need for SMD stuff and a separate power supply.
Shardan wrote: 19 Nov 2017, 14:01 I see. It would be helpfull if you could provide a Screenshot of the PCB where i can see:
- Pinout: Which pin is which signal on the board
- Positioning: Where are the display/sensor on the board?
A raw marking will do (Print out, sketch parts/pins with a pen, scan in).
I can do even better than a raw marking.
There is a "ZofzPCB" project file.
If you're running Windows, you can download the free viewer on https://www.zofzpcb.com
This viewer allows to view traces (and distances etc.) by simply hovering over a trace or hole and press "N" for net view or "H" for hole inspection and distance measuring.
You can also peel off layers.
Here are the static screenshots: https://github.com/TD-er/NodeMCU_PCB/tr ... creenshots

And here the photo of an assembled rev2 board: https://raw.githubusercontent.com/TD-er ... d_rev2.jpg
Shardan wrote: 19 Nov 2017, 14:01 The noise from the power supply is a so called "Coil Beeping". The converter inside the power supply uses a high frequency and if a coil is poorly embedded or coated it tends to resonate. I don't think capacitors will stop that. Anyways some more capacitors is always a good idea. There is a reason why a simple sonoff basic switch is full of capacitors....
I'll just have a try at it. Using another USB charger is always an option. However, I was hoping the Ikea adapter would be up for it.
Shardan wrote: 19 Nov 2017, 14:01 Anyways. If you can provide the info mentioned above I'll try to make a PCB layout for a ESP-12 on board with that. But definitely i need a raw sketch where parts reside. Honestly it takes very much time to find out by an undocumented PCB drawing.
The pinout used is quite easy:
D1 (GPIO5) SCL
D2 (GPIO4) SDA
D3 (GPIO0) TX
D4 (GPIO2) RX
D5 (GPIO14) HSCLK
D6 (GPIO12) HMISO
D7 (GPIO13) HMOSI
D8 (GPIO15) HCS

And for rev. 3, I now have added some soldering pads which allow to choose which of the pins D5..D8 is used for the touch sensor.

Only thing is, I do not (yet) have the single ESP12F boards. I'll try to order a bunch.
At least they are closer to the PCB, so there may even be more room above the PCB left inside the enclosure. (they fit well between PCB and bottom plate)
But I think they will be all-in-all more expensive because you need extra components like for (USB) power connectors, regulators and perhaps some more components.
Shardan wrote: 19 Nov 2017, 14:01 Just these days i've tested a new pooling service for PCB production - the PCB quality is unbelieveable. Gold coverer pads (ENIG), contacted vias, silk on both sides, solder resist - it's all included.
Not the cheapest PCB maker, but best price for industrial quality PCB's. For 3 pieces (lowest allowed quantity) you'll pay below 30 € incl. shipping.
That says: Below 30€ for all together!
.
TestPCB_900px.jpg
.
The layout is made with KiCAD, a free schematics and PCB CAD. The manufacturer can use the files from KiCAD directly, no Gerber export or SVG files necessary.

Regards
Shardan

PS: Even a level shifter for 5V I2C could be integrated with the board.
30 euro for 3 boards is way more expensive compared to what I paid at [urlhttps://www.itead.cc/open-pcb.html]itead.cc[/url] (15$ for 12 boards + 5 euro shipping) and what Seeedstudio is charging (4,99 $ for 10 boards, excl shipping)
I did not order yet at Seeedstudio.
The project I'm planning will eventually have a few dozen CO2 sensors and thus prices are becoming an issue.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Don't use GPIO 9 or 10

#39 Post by Shardan » 22 Nov 2017, 14:21

Can't do much with that.
I could make some layouting - definitely i won't install lots of programs and invest most time to decode.

The price of PCB's... comparing apples with oranges does not help.
I've just caluclated the shown PCB's at seedstudio - with th same parameters, says ENIG-surface, both-sided silks, electric check...
SeedStudio is around double the price i paid.
Regards
Shardan

Post Reply

Who is online

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