Tasmota: Sonoff Basic new Layout

Created on 3 Dec 2018  Â·  69Comments  Â·  Source: arendst/Tasmota

Heya,

the Sonoff Basics got a new Board Layout.

GPIO14 is gone and now there is a GPIO2 (IO2 and its not a borehole!).


Flashing process is the same

Disconnect all power, hold down push button while powering up usb - keep button down for 2 seconds and then flash as per wki... no difference.

> Some picky devices want you to hold the button down during the entire process - not sure if you maybe have one of these.

In the Template GPIO2 is disabled, so dunno if u want to add a new Layout or allow GPIO2 for the Sonoff Basic.

Workaround: Use Generic Template and set GPIOs yourself.

Template:
https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/sonoff_template.h#L520

<a href="https://forum.creationx.de/forum/index.php?thread/1254">https://forum.creationx.de/forum/index.php?thread/1254</a>-sonoff-basic-neueste-version-gpio14/

<a href="https://forum.creationx.de/forum/index.php?thread/1254">https://forum.creationx.de/forum/index.php?thread/1254</a>-sonoff-basic-neueste-version-gpio14/

enhancement

All 69 comments

Hello @reloxx13
is it a real ITEAD Sonoff Basic? For me the typical ITEAD sticker on relais is missing.
Maybe just a (good?) clone...

At least it seems they are addressing the thermal issue since this board appears to have 9 via's from the bottom of the ESP8266 chip coming through to the bottom onto what seems to be a much larger ground plane than in the older versions.

@reloxx13 Is that a ESP8285 on there?

@andrethomas yep, you will find better pictures here: https://smarthome.schimmer-media.de/forum/index.php?thread/2370-neuer-sonoff-basic-oder-ganz-altes-modell/&postID=26177#post26177

@Jason2866 im pretty sure those are orginal itead's. there are also some other R2 versions with the esp8285. guess they are changing all their products to that chip. Sonoff Dual R2.

<a href="https://smarthome.schimmer-media.de/forum/index.php?thread/2370">https://smarthome.schimmer-media.de/forum/index.php?thread/2370</a>-neuer-sonoff-basic-oder-ganz-altes-modell/&postID=26177#post26177

Some more infos here (in german):
https://forum.creationx.de/forum/index.php?thread/1254-sonoff-basic-neueste-version-gpio14/

https://smarthome.schimmer-media.de/forum/index.php?thread/2370-neuer-sonoff-basic-oder-ganz-altes-modell/

@reloxx13 @Jason2866

This is good news - so in future we will not have thermal issues with the new sonoff basic's I think.

I think just adding GPIO2 to the Sonoff Basic template will not cause harm as GPIO2 is not used on the previous editions of the Sonoff Basic.

Or it will be easier for user to select different version and template will dictate where POWER is.

I think that would be better and less confusing for people to just add gpio2 to the sonoff basic template

Lets make a PR and that Theo decides ;)

Yeah, just adding GPIO2 is fine.

image

Just add gpio2 please ;-)

@reloxx13 your call ;)

Closing as the PR has been made. Thanks everyone for sharing theirs ideas.

We also need to add this information to the wiki. I will do that later. Thanks.

im too late :D

i wrote sth in the wiki for that, feel free to edit/move it, im not sure where to place it on the basic page.

https://github.com/arendst/Sonoff-Tasmota/wiki/Sonoff-Basic#new-board-layout

Version needs to be added if its released.

How do I update the template used on my Tasmota sonoff? I flashed with most recent firmware but I don’t have gpio2 listed in the configuration template

Use latest Tasmota version 6.3.0.15 (http://thehackbox.org/tasmota/)

(its not released now, its in the dev version, which ascillato linked)

@ascillato thanks

@reloxx13 I have the same board and was trying to flash Tasmota, but it fails to get detected by my computer. Were you able to successfully flash it? Are the flashing steps different for the new board?

@joydeepsaha05

Are the flashing steps different for the new board?

No, exactly the same.

@andrethomas Thanks for confirming. I was able to flash using a Raspberry Pi, must've been something wrong with my FTDI adapter.

THANKS for the work here!
Now I try to power up a SR505 PIR sensor on GPIO02/IO2.
Has anyone found a 5V pin to get the needed power on the new board?
Thanks for info!

The sonoff basic R2 does not have enough power to power another device. Sorry. The hardware was not designed for that.

The sonoff basic R2 does not have enough power to power another device. Sorry. The hardware was not designed for that.

Just a small update to that: I managed to solder a small cable to GPIO2/IO2, and ordered some HC-SR501 PIR Sensors. Bringing them to power with 3,3V works as charme. (like this: https://randomnerdtutorials.com/modifying-cheap-pir-motion-sensor-to-work-at-3-3v/)

Now we have the next room hassio enabeld :-)

@hudecitydave Sure, it may work (for an undeterminable time), but it is not recommended.

@hudecitydave Sure, it may work (for an undeterminable time), but it is not recommended.

You both are right. The device produces many false switch actions now. Not stable, not wife compatible.

But ... how to solve the "switch light on room movement" without an extra esp8266? Any hints for me?
Thanks, folks!

But ... how to solve the "switch light on room movement" without an extra esp8266? Any hints for me?

I think the obvious conclusion is an extra esp8266/wemos d1mini (or whatever you normally use for bare installations)

@hudecitydave I am using this AM312 PIR with Sonoff Basic (older model without GPIO2) for 5 months or so.
Setup Tasmota rule to control PIR as you and your wife needs and you’re golden.

Can be used the GPIO2 on the new board layout as a switch? I would like to use as GPIO14 on the old boards in order to attach an external switch like this video

@ivanmarban It should work the same as GPIO14 - I don't know why they changed the pin from GPIO14 to GPIO2 - perhaps it was easier to route on the new pc board design.

@ivanmarban @andrethomas Looking at tasmota documentation, it's not true that "it should work the same as GPIO14"
In https://github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs#restrictions, you can read "GPIO2 can’t be low at boot, so you can’t connect a switch to it".
If the documentation tells the truth, using GPIO2 as a switch could give some problems (if the device reboots for any reason and the switch is off the device will not boot normally).

@eric-void @andrethomas any workaround ?

Yes, there are restrictions with GPIO2.
So it is not recommended to use switches, just only momentary switches.
If you want tu use a other GPIO you have to solder direct on the ESP chip.

I worked around my problem now with: HS-501PIR Sensor -->WEMOS D1 Mini (Tasmota) --> 220Vto5V Mini Trafo (4cm/2cm/2cm) <--> MQTT --> Sonoff Basic New. I additionally had to pay about 10 Euros for this setup now, but it works save and reliable for me.

how do you flash the new model? I can not get it into FLASH MODE
when i try to fash with Arduino ide i get this error:
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

No difference to the old one.

Disconnect all power, hold down push button while powering up usb - keep button down for 2 seconds and then flash as per wki... no difference.

Some picky devices want you to hold the button down during the entire process - not sure if you maybe have one of these.

Any luck With connecting DHT22 to GPIO02 on these new boards?
Can’t get it to work, tasmota doesn’t see the sensor at all.

Yeah, tried to use DHT22 (on a board) with a new version of Sonoff Basic.
Shows null/null in web interface.
Ended up connecting the sensor to the old Sonoff Basic, and it works a treat.

Still want to have a solution for new boards as it's a bit odd and looks like a bug.

Mine is not even showing anything in the Web interface.
As if dht22 is not getting enough power.
I am supplying the 3.3v to it from the sonoff itself ( using vcc and ground
pins next to tx and rx)
On Mon, 7 Jan 2019 at 22:49, akasma74 notifications@github.com wrote:

Yeah, tried to use DHT22 (on a board) with a new version of Sonoff Basic.
Shows null/null in web interface.
Ended up connecting the sensor to the old Sonoff Basic, and it works a
treat.

Still want to have a solution for new boards as it's a bit odd and looks
like a bug.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/arendst/Sonoff-Tasmota/issues/4515#issuecomment-452110195,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ab0DHN9v_cKmI2ePPu8ZHJeCX-BFcDk1ks5vA88VgaJpZM4Y-D3h
.

No difference to the old one.

Disconnect all power, hold down push button while powering up usb - keep button down for 2 seconds and then flash as per wki... no difference.

Some picky devices want you to hold the button down during the entire process - not sure if you maybe have one of these.

i've tried, but not working

So no more switches with the new layout.
Can someone tell me which pin is gpio14 ?

image

Wow many thanks. I know what to do tomorrow. 😀

You're welcome - remember to use flux paste to avoid solder bridges between the pins and inspect your work with a magnifier after you have soldered, then tack the wire down with some hot glue a cm or so away from the chip so it does not come loose easily.

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

Any possibility to use RX or TX pins to connect DHT sensor?

Why not? connect it to RX Disable serial logging

hi i also have new versions and i tried to add ic2 on rx and tx and want to look at a value of a ads1115. I look at the sonoff_sensors optionslist at github that it should support it, but after flashing everything ok. I can toogle relais from homeserver, green light blinks slowly. I can test gpios on webinterface it says :{"GPIO1":"5 (I2C SCL)","GPIO2":"0 (None)","GPIO3":"6 (I2C SDA)","GPIO4":"0 (None)","GPIO14":"0 (None)"}
but it does not show any other signs of ads1115 when i connect the board ??. Should it show ? or what am i doing wrong.
i tried sonoff_bin 523k | 20190113 and sonoff_sensors 554k | 20190113 from the hackbox. also tried normal sonoff_bin from github.

I tried flashing the espeasy ESP_Easy_mega-20190109_normal_ESP8285_1024.bin.
It works with the same connection and board and i can see the values of the ads1115 analog inputs.
But i like the tasmota better. ?? pls info or help.
do you need any other info? ,pls bear with me i´m a newbee.

Hi forgot to write i tried 3,3v i tried 5,5v i tried adress 48, i tried adress 49 without luck. i also tried generic sonoff, but after configuring and at first boot it stopped.

It seems that a scan for i2c sensors take about 5 minutes first time after pwr up, after this everything ok.

Does gpio 3 (rx) have a buildin pullup resistor ?
I have a sonnof with long cables now on gpio 2 and since there is no pullup lots of ghost switching.

@cosmos1978 Yes

Apologies but I'm still very very new to all this...
I need to set up a Sonoff Basic with 2 external sensors (reed switches) to work independently from the relay. The cable from the sensors to the sonoff needs to be 10mtrs max.
I was thinking of using GPIO4 and GPIO14. Is this a good choice once the sensors are not momentary switches?
Would I need to attach any resistors to these to avoid what @cosmos1978 referred to as ghost switching?

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

I am new to all this, so I am trying to understand. You are soldering wires from GPIO3 (RX) and GND to a standard Wall Switch (not momentary/rocker). Then setting GPIO3 to (GPIO3 Serial In - Switch1 (09)) in Tasmota?

Is this correct? Does it work as it should?

Thanks!!

@ivanmarban @andrethomas Looking at tasmota documentation, it's not true that "it should work the same as GPIO14"
In https://github.com/arendst/Sonoff-Tasmota/wiki/Expanding-Sonoffs#restrictions, you can read "GPIO2 can’t be low at boot, so you can’t connect a switch to it".
If the documentation tells the truth, using GPIO2 as a switch could give some problems (if the device reboots for any reason and the switch is off the device will not boot normally).

I can confirm this. Just tried this morning. Connecting GPIO2 and Ground to a "standard" wall switch (not push button) first seems to work normally as it should. But if for some reason the device reboots and the switch is in the "low" position, it doesnt boot. You have to turn the device off, change the switch position, then turn it on again.

But as @ivanmarban said, i connected ground and GPIO3 (RX) and it seems to work correctly with the "standard" wall switch. No problemas at booting either.

Can someone confirm that using it like this (Ground and GPIO3/RX with a wall switch) has no problem at all?

Thanks for everybody in this thread. Really helped me understanding and setting up tasmota with this new board layout!!!! \o/

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

I am new to all this, so I am trying to understand. You are soldering wires from GPIO3 (RX) and GND to a standard Wall Switch (not momentary/rocker). Then setting GPIO3 to (GPIO3 Serial In - Switch1 (09)) in Tasmota?

Is this correct? Does it work as it should?

Thanks!!

Yes, my friend. That's perfect. I just did it this morning and works like a charm.
As I said in my reply just above this one: i just want someone to confirm that this setting has no other problems. But i can confirm that is working so far :)

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

I am new to all this, so I am trying to understand. You are soldering wires from GPIO3 (RX) and GND to a standard Wall Switch (not momentary/rocker). Then setting GPIO3 to (GPIO3 Serial In - Switch1 (09)) in Tasmota?
Is this correct? Does it work as it should?
Thanks!!

Yes, my friend. That's perfect. I just did it this morning and works like a charm.
As I said in my reply just above this one: i just want someone to confirm that this setting has no other problems. But i can confirm that is working so far :)

Awesome! Do you have to install a pull up resistor, or does it work with a built in one?
P.S. I posted this same basic question as a new issue because this thread shows "closed". I wasn't sure if it would get viewed. I apologize!

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

I am new to all this, so I am trying to understand. You are soldering wires from GPIO3 (RX) and GND to a standard Wall Switch (not momentary/rocker). Then setting GPIO3 to (GPIO3 Serial In - Switch1 (09)) in Tasmota?
Is this correct? Does it work as it should?
Thanks!!

Yes, my friend. That's perfect. I just did it this morning and works like a charm.
As I said in my reply just above this one: i just want someone to confirm that this setting has no other problems. But i can confirm that is working so far :)

Awesome! Do you have to install a pull up resistor, or does it work with a built in one?
P.S. I posted this same basic question as a new issue because this thread shows "closed". I wasn't sure if it would get viewed. I apologize!

No, I didn't install any pull up resistor. It hasn't exploded nor set my house on fire yet, so far so good :)

But a few posts above AndreThomas said it has a buildin pull resistor already.

@ivanmarban

@eric-void @andrethomas any workaround ?

I use GPIO3 (RX) and GND connected to a wall switch and it works great.
Moreover, it doesn't require additional soldering as i already solder it to flash.

Can I use this + use GPIO1/TX, 3.3, & GND for PIR sensor?

The sonoff basic R2 does not have enough power to power another device. Sorry. The hardware was not designed for that.

Just a small update to that: I managed to solder a small cable to GPIO2/IO2, and ordered some HC-SR501 PIR Sensors. Bringing them to power with 3,3V works as charme. (like this: https://randomnerdtutorials.com/modifying-cheap-pir-motion-sensor-to-work-at-3-3v/)

Now we have the next room hassio enabeld :-)

Installing PIR on GPIO2 isn't causing any problems like should be low on boot or something?
Someone suggested me to use GPIO1/TX for PIR, would that be ok/better/same as your GPIO2 connection?

@h4nc usually when devices are used for purposes other than the original intention bad things happen. The problem with posting it here is that it gives other people bad ideas so I'll be removing it shortly.

@andrethomas

Those were only theoretical questions.

I don‘t understand why you also deleted my picture of the mod.
It only showed how to mod it to get a „relay only“ sonoff basic and it could help others.

usually when devices are used for purposes other than the original intention bad things happen.

The whole tasmota project is about using devices for other purposes than original intended. Flashing those devices and putting sensors to it, is also not the original intention.
I think you will understand what I mean.

I’m curious as well. What was the issue with the mod? These devices seem to be modded in many different ways. Was this a more dangerous mod? Just curious. Not here to fight.

On the input side you still use AC 230V.

Thin wires close to AC input... then the user gets used to the relays only switching their DC load and forgets that there is high voltage AC on the input side and gets cremated... unless he is rubberman, of course.

I don't have a problem if someone wants to make a modification but posting information or answers to questions that could lead to the end of someone's life is irresponsible.

There are better ways to achieve what was explained in the modification, for example using a Sonoff SV or if you really want something that has isolated relays and is powered from AC then perhaps a Sonoff 4CH Pro would be safer.

Whichever way you look at it a user which does not already have the knowledge to do this modification without a "how to" should really not be doing it and it is for this reason that I removed it.

I don't want to fight either. If you know what you are doing this mod was/is not dangerous. However we are working on high voltage here, so sonoffs are kind of dangerous all the time (if you don't know waht you are doing).

As long as @andrethomas gives his ok for the picture to be uploaded again, I will not do it, as he is maindeveloper of this great project and I respect his decision.
But still I'd like to know whats wrong on my mod on his mind.

I tested my mod and it works fine. I use these kind of moded basics to trigger my garage doors.

I uses this mod on my old basic and wanted to show the community how you can mod the new layout.

he is maindeveloper of this great project

Yes, it is a great project but I cannot take credit for "main developer" as that would be @arendst :)

Whichever way you look at it a user which does not already have the knowledge to do this modification without a "how to" should really not be doing it and it is for this reason that I removed it.

I get that. Someone who knows whats going on, is able to do that without a how to.
For the record: Those thin wires I uses are isolated coper wires (so no short when they are pushed together).

Yes, it is a great project but I cannot take credit for "main developer" as that would be @arendst :)
True, I messed that up. Only saw "andre"and it look similar to arendst, sry ;)

There are better ways to achieve what was explained in the modification, for example using a Sonoff SV or if you really want something that has isolated relays and is powered from AC then perhaps a Sonoff 4CH Pro would be safer.

I don't think so, because for the SV you will need another power supply, so the whole thing gets bigger (and the basic already has the transformation).
And the 4CH is kond of an overkill if you only need one relay.
You could hower add a relay to a gpio-pin of the basic, but still this will get you setup bulky.

Whatever, lets keep those comments delteted and I will not upload that picture again, as I respect your worries about users. I also want to risk other peoples lives.

Always be sure that you know what you are doing, guys ;)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

renne picture renne  Â·  3Comments

TylerDurden23 picture TylerDurden23  Â·  3Comments

abzman picture abzman  Â·  3Comments

he-so picture he-so  Â·  3Comments

jensuffhaus picture jensuffhaus  Â·  3Comments