Replies: 6 comments 1 reply
-
Sure, I can add a configurable pin . As to the mosfet , I considered those a while back as they are a perfect fit for this type of application. They would work even better on my vista20 circuit instead of using optocouplers. I tried to keep thing as simple for people with easy to source parts. Yes, I could change the code to combine the input/output onto one pin but since we're not output constricted here, I don't see the gain really. |
Beta Was this translation helpful? Give feedback.
-
Ok, i've added some initial code to first add programmable polarity by setting "invert_write: false/true" in the dsc_panel section of the yaml. Secondly, if the read pin is the same as the write pin, the code should work in bidirectional mode automatically without needing to set the inversion parameter. FYI, i have tested the invert function but not the bidirectional aspect. I havent built a test circuit yet for that. external_components:
|
Beta Was this translation helpful? Give feedback.
-
Awesome. Ya, I revise my statement! lol. Simpler circuit and less soldering is always a plus! Using the arduino 4 channel level shifter makes it a fairly easy build. I'll add a schematic of that option as well. |
Beta Was this translation helpful? Give feedback.
-
Cool. Neither of the pullups in the Arduino module are necessary for this design, so all I have is the BS170 FET with gate connected to 3.3V. Not sure it's worth pointing that out in your instructions, but just FYI. |
Beta Was this translation helpful? Give feedback.
-
You are correct as the dsc lines are already passively pulled up. Users can either use the arduino module (with built in pullups) or simply use 2 bs170/bs138's only. Note, I don't specifically set the pullups on the inputs of the esp pins so surprised it still works without external pullups as those pins should be floating in input mode. |
Beta Was this translation helpful? Give feedback.
-
I finally got around to building up this interface. I do like it much better. Works well and no pullup's needed on either end as you indicated. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Awesome project! In one afternoon, I was able to get my DSC alarm integrated into Home Assistant. I'm using N-FET type bidirectional level translators like this for clock and data, and these are non-inverting. I only had to change two digitalWrite lines in dscKeybusInterface.cpp to implement this, but it would be awesome if you could allow inversion by passing in a variable. Since these are bidirectional, you could also allow the same pin to be used for dscreadpin and dscwritepin, but that might be a little harder and I've already wired up separate ones for now.
I could make the changes and do a pull request, but I'm guessing you'd be happier with your own naming convention. :)
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions