Beiträge von Matthew Bennett

    Please refrain from giving this kind of advice. It’s dangerous!

    Nothing more to say - I’m out of this thread.

    Well sorry if it's wrong you've told me several conflicting things and I'm doing my best to parse out reality from fiction.

    Can you or anyone provide 1 single reason as to why the Shelly 1L Programming header cannot be used while connected to mains voltage? Which pin on the header is the dangerous one? DBG TX, TXD, RXD, RST, and GPIO0 are all connected directly to the ESP inside of it, correct? 3.3v is connected to the 3.3v output of the regulator that supplies voltage for the ESP. GND is connected to Sx, yes, but so is the GND on the ESP chip. Is any of this incorrect?

    If all of it is correct then it's just as safe for anything you plug in as it is for the ESP chip.

    Zitat

    No, Sir, this is not simple to implement!

    A cut of the wire trace and a jumper wire. It is literally that simple. Connect the jumper wire from the programming header GND pin to the GND of the 3.3v regulator and you are just as safe as the ESP chip.

    Of course this is predicated on you giving me accurate information in this thread so if there are inaccuracies in what you've previously told me by all means I beg for enlightenment, that's why I made the first post to begin with!

    No. Why should it be fried, if PIR electronics is isolated from mains network?

    Another good bye…

    Because it's not? I think we might be hitting a language barrier issue here.

    I thank you for your explanations here's what I've learned:

    In the Shelly 1, and most shelly devices, L is directly connected to GND on the GPIO/programming header. A statement I accept as accurate as it would explain why devices like in the Shelly 1 have big warning signs in the manual to not connect mains voltage while programming. In theory it should be a fairly simple mod to rectify this as previously mentioned in this thread. After all if the ESP8266 in the Shelly 1 can operate without being fried than a FTDI programmer could as well.

    The Shelly 1L (and a few others) can be flashed while connected to mains voltage (hence the lack of the warnings found in the Shelly 1 about not connecting to the programming header while connected to mains voltage). Though if you were doing this, I'd recommend not connecting the 3.3v as the slight potential differences can have bad effects. Likewise I can safely connect a sensor to this header as there is nothing on the header that carries line voltage. GND on the Shelly 1L is connected to Sx which is connected to the same ground that the ESP8266 safely uses. This is a non-isolated ground so hobbyists would be well advised to plan accordingly.

    The ESP8266 is directly linked with terminal L of Shelly (and directly with terminal Sx of Shelly 1L).

    If it was DIRECTLY linked to the L terminal of the shelly it would be immediately fried from the voltage. Now if you mean it's not isolated, yeah I get your point there, but it is sufficiently designed to not fry the ESP8266 when plugged in.

    Don’t get your point. Using a separate 3,3V DC source is as costly and elaborate as using a 12V DC source to supply the whole Shelly!?

    I'm saying use the 3.3v that's already coming from the 3.3v pin on the programming header. You don't need a separate 3.3v source, the esp8266 had a voltage regulator that outputs 3.3v already that 3.3v output is tied to the 3.3v pin on the programming header and to the esp8266 so just make use of that.

    Zitat

    And by the way: IMHO it is not possible to separate the GPIO header totally from the internal ground potential of Shelly. This would cost more than traces to cut.

    The ESP8266 is sufficiently grounded from the AC Line voltage to pass UL certification and to not randomly blow up when wired correctly. If the GPIO GND pin on the programming header was connected to the same ground rail as the ESP8266 then it would be plenty safe.

    Zitat

    Allterco (they design and produce the Shellies) is offering a solution to use the GPIO port: It’s called Shelly Add-On and implements a galvanic separation between GPIO data lines and the Shelly‘s power supply.

    Got a link for that?

    First off, thanks to 66er for moving this thread to a better location. I was uncertain if I was in the right spot or not when I created it.

    Adding an application to GPIO pins, needs the following precautions:

    This is my overall point: To prevent other users to get in danger.

    I think at the point someone would pop open a device and begin making modifications we can safely assume they understand they are well outside the intended use area and are aware they need to take proper precautions.

    Indeed that is my overall point as well. The programming header as it currently exists is fundamentally dangerous to the end user as the average hobbyist who picks up a shelly device would assume that GND is in fact GND and not AC line voltage. My comments about cutting the trace at the programming header and adding a jumper wire to a known ground source (such as the 3.3v regulator) is only my own musings for how to fix this oversight and have an actually GND source on the programming header.

    Unless you're telling me that ALL the GPIO on the programming header is connected to line voltage?

    Conversely, when using the Shelly 1L there is nothing inherently dangerous about using the programming header when connected to mains voltage from what I can see. 3.3v from the shelly goes to the PIR vcc, GND from the shelly goes to ground on the PIR, and GPIO-0 on the shelly goes to sense on the PIR. All is connected to low voltage and everything is safe.

    …and this would be absolutely dangerous! Flashing a Shelly is possibly without mains supply only! The ESP8266 must be supplied by the adapter and with 3,3V DC. There are some adapters delivering 5V, which will kill the ESP immediately.

    In what world would that be dangerous? I have a pin labeled ground that is in fact connected to 120V Line THAT'S what is dangerous! By cutting that trace at the pin header and adding a jumper to the actual DC ground it's much safer, not more dangerous.

    And yes obviously this programming header is connected directly to the ESP and not going through a regulator so attention has to be given to the power provided it. But I'm not talking about flashing the Shelly. I'm talking about using the 3.3v pin, GND pin (actually connected to ground), and GPIO-0 to be used with a sensor.

    Looking at the the electrical drawing in the post you linked it looks like Sx is a pseudo-ground for DC created by two mosfets? Well I'd prefer a transformer with an isolated ground on the DC side, but clearly when wired CORRECTLY it's safe enough to not blow up the ESP so I'm not certain what your overall point is?

    GPIO GND is internally linked with pin L (almost all Shelly actors). Exception: Shelly 1L - GPIO GND is linked with Sx. Another exceptions are Shelly RGBW2 and Shelly UNI due to low voltage supply…

    Hmmm... That's a little disappointing that so many of their line up is designed this way. I get that L is ground when in 12v mode on the shelly 1, but it feels like a significant and dangerous oversight to have created a setup where there average person would reasonably assume GND meant GND in any situation. Still that's good to know that the rest of it is low voltage, I could cut the trace leading to the GND pin on the programming header and add a jumper wire to an actual GND and have everything in a safe configuration.

    Conversely, the Shelly 1L is configured correctly from the get go and would be the better option. I can use SW1 and SW2 to control my light and ceiling fan and used 3.3v, GND, and GPIO-0 to read the status of my PIR. And use 1.27mm spaced header pins. The trade off here being that the shelly-1L can't handle as much current as the Shelly-1, but since it's just controlling a light switch and ceiling fan, it should be well within tolerances

    I recently purchased a shelly 1 to use with my garage door and was pleased that I could power it with 12v DC and use the switch terminal along with the 12v+ to read the state of a magnetic reed relay and see if my garage door was open or shut.

    I want to do something similar with a motion PIR sensor that runs on 3.3v, but I've been getting conflicting reports on what pins back there actually connect to. I would imagine that the 3.3v pin is only connected to the 3.3v rail that powers the ESP8266 and I would imagine that the GND likewise is connect to the same GND that the ESP8266 is connected to. I've seen some people claim that the GND is wired to the N or L terminal, but surely not, right? The ESP8266 needs a ground source and that couldn't be connected to L or N without frying it.

    My working assumption here is that GPIO-0 is the dangerous pin, but I have zero idea in reality. Can someone confirm exactly which GPIO pins connect directly to the ESP8266 and which ones connect up to O, I, SW, L, or N?