Very Quick Question About Uno and ESP8266

So I finally got my ESP8266 modules (the 4x2 pin type, not complete Nodemcu type with more I/Os).

Been reading a bunch of stuff where the logic needs to be shifted from 5v down to 3.3v. Various voltage dividers, transistors, even ICs and bidrectional logic shifting breakout boards get involved.

But . . . . can't I just flip the little switch on my Uno between "5V" and "3V3" modes and forget all that shifty business?

The only little switch on my Uno is the reset switch :smiley:

Whoopsie, my bad.

My clone has more features I guess :slight_smile:

So, either someone has the same one can answer my Q or how can I confirm everything gets limited to 3V3? Would my multimeter measure accurately on the TX/RX?

I don't have that switch either :wink: , but if the result is that the HIGH levels of the Arduino's I/O are 3.3V instead of 5V, you should be good. (If it uses the small 3.3V regulator that is on the official Uno, however, you'll need a separate voltage regulator, since the ESP8266 draws over 100mA (170mA peak), and that's way more than the 50mA that the Uno's little regulator is capable of. Also, they tend to be quite unstable without decent bypass capacitors (I use 100µF and 100nF).

Edit: seems like you've got a decent regulator onboard, so not a problem there.
Just check the VCC pin of the ATmega with a multimeter, if it's 3.3V, you can be pretty confident that its I/O will also be at 3.3V, or upload a sketch with

pinMode(13,OUTPUT);
digitalWrite(13,1);

and measure its voltage.

it would make a lot of sense to do teh research and find out of that board is really a dual voltage board
and if the ouputs to to 3.3 volts.

I do believe that you have to change the clock to 8Mhz ? 3.3v is outside of the range for 16Mhz .

dave-in-nj:
I do believe that you have to change the clock to 8Mhz ? 3.3v is outside of the range for 16Mhz .

That's the theory, indeed. In practice, they can be slightly overclocked, and run just fine @16MHz/3.3V in most scenario's.

With the switch on 3V3, pins written HIGH do go ~3.3V, 5V still provides 5V. It's working as usual.

What about 3.3 being outside the range of 16MHz? Where is that limitation, the 328p? Doc for it says
– 0 - 4MHz @ 1.8 - 5.5V
– 0 - 10MHz @ 2.7 - 5.5V
– 0 - 20MHz @ 4.5 - 5.5V

Which works to ~3.8ish for 16MHz. But since 5V is still available onboard elsewhere, it's not an upfront regulation. The mcu is probably still getting the power it needs.

All (digital) electronics on the board can be the limitation. When you use a lower voltage, internally the rise and fall times might no longer meet the needs for 16MHz timings.

The relationship between Vcc and max frequency is linear. So at 3.3V the maximum is around 13MHz (based on figure 29-1 in the 328 datasheet). It works now on your board; next start heating up the micro (use a paint stripper) and see if it still works; the 328 is spec'ed from -40 Celsius to 105 Celsius.

Even if e.g. a Pro Mini can run at 5V or 3.3V, it cannot run on both voltages (Vcc) at the same time, or have digital pins configured arbitrarily for 5V or 3.3V.

When a sketch is compiled for Pro Mini 3.3V, the clock prescaler is configured to divide the 16MHz (crystal) frequency down to 8MHz. If you try to switch power at runtime to 5V, all timing goes astray, like millis() and the Serial baudrate.

Of course the clock and its prescaler can be configured for any frequency, but you’ll have to tell that to the compiler and then cross your fingers.