{"action":"created","issue":{"url":"https://api.github.com/repos/orgua/OneWireHub/issues/58","repository_url":"https://api.github.com/repos/orgua/OneWireHub","labels_url":"https://api.github.com/repos/orgua/OneWireHub/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/orgua/OneWireHub/issues/58/comments","events_url":"https://api.github.com/repos/orgua/OneWireHub/issues/58/events","html_url":"https://github.com/orgua/OneWireHub/issues/58","id":325840654,"node_id":"MDU6SXNzdWUzMjU4NDA2NTQ=","number":58,"title":"Unpowered device breaks bus...","user":{"login":"codmpm","id":9745239,"node_id":"MDQ6VXNlcjk3NDUyMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/9745239?v=4","gravatar_id":"","url":"https://api.github.com/users/codmpm","html_url":"https://github.com/codmpm","followers_url":"https://api.github.com/users/codmpm/followers","following_url":"https://api.github.com/users/codmpm/following{/other_user}","gists_url":"https://api.github.com/users/codmpm/gists{/gist_id}","starred_url":"https://api.github.com/users/codmpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codmpm/subscriptions","organizations_url":"https://api.github.com/users/codmpm/orgs","repos_url":"https://api.github.com/users/codmpm/repos","events_url":"https://api.github.com/users/codmpm/events{/privacy}","received_events_url":"https://api.github.com/users/codmpm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-23T19:22:29Z","updated_at":"2018-06-29T09:13:33Z","closed_at":null,"author_association":"NONE","body":"First, thank you for this superb library 👍\r\n\r\nCurrently we are building a soil-moisture sensor which will be released as open-source. It emulates the DS2438 and reads the temperature from an attached (real) DS18B20 as well as \"borrowing\" the serial number from it to get a unique device id. We ware also using the DS2438's memory to store configuration data. Additionally we work on a configuration device based on an ESP8266 to configure the sensors with a smartphone over onewire.\r\n\r\n![1wire-sensor-node-prototype](https://user-images.githubusercontent.com/9745239/40445912-c7dc3434-5ecd-11e8-880e-720f6fd9e19c.jpg)\r\n\r\nWe are currently in the prototype phase and everything works out great. But, we are stuck with one problem:\r\n\r\nWhen we cut the 5V line of the sensor (slave) the bus breaks down, meaning we can't read data anymore. \r\nWe are testing with our ESP8266 implementation and an 3,3 to 5V [level shifter based on a BS170](https://wiki.fhem.de/wiki/1-Wire_Pegelwandler). The sensor (slave) uses pin A0 of the ATMega328p and is directly wired to the onewire bus.\r\n\r\nMy first thought was the internal resistence of the ATmega when it's unpowered (A0-GND), but this should be high enough to not interfere with the pull-up for the onewire line of the master (2k2@5V).\r\n\r\nDo you have any suggestion how to separate the onewire slave - meaning ATMega328p - when it's not powered? Did we miss something on the slave connecting to the bus?\r\n\r\nWould be great to have your input on this.\r\n\r\nCheers,\r\nPatrik\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/orgua/OneWireHub/issues/comments/401297710","html_url":"https://github.com/orgua/OneWireHub/issues/58#issuecomment-401297710","issue_url":"https://api.github.com/repos/orgua/OneWireHub/issues/58","id":401297710,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTI5NzcxMA==","user":{"login":"codmpm","id":9745239,"node_id":"MDQ6VXNlcjk3NDUyMzk=","avatar_url":"https://avatars1.githubusercontent.com/u/9745239?v=4","gravatar_id":"","url":"https://api.github.com/users/codmpm","html_url":"https://github.com/codmpm","followers_url":"https://api.github.com/users/codmpm/followers","following_url":"https://api.github.com/users/codmpm/following{/other_user}","gists_url":"https://api.github.com/users/codmpm/gists{/gist_id}","starred_url":"https://api.github.com/users/codmpm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codmpm/subscriptions","organizations_url":"https://api.github.com/users/codmpm/orgs","repos_url":"https://api.github.com/users/codmpm/repos","events_url":"https://api.github.com/users/codmpm/events{/privacy}","received_events_url":"https://api.github.com/users/codmpm/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T09:13:32Z","updated_at":"2018-06-29T09:13:32Z","author_association":"NONE","body":"Hey @pklarsjo,\r\n\r\nwe do not power the MCU over the 1-wire bus itself, there's always a dedicated 5V line for this. \r\nThe Problem seems, that the ATMega tries to power itself over the data line if either GND or VCC is missing.\r\n\r\nWe sepearate the MCU from the 1-wure bus by using a [MAX9940](https://datasheets.maximintegrated.com/en/ds/MAX9940.pdf) now. This will not bring down the bus if GND or VCC on the MCU are missing. We've found only some rare circumstances where it will happen now.\r\n\r\nNeverthelesse we think it's a good idea to seperate the bus from the MCU and protect the inputs with the 9940 and give it ome protection."}}
{"actor":{"display_login":"codmpm"}}