-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now have a v2.5 in hand for references #44
Comments
Well that's a lot to take in. I imagine it will mostly help the folks struggling with 1.0+ door openers and a board they made themselves. Really then the question is what's the exact circuit tracing for RX and TX. Let me see if I can give you some questions of tests to run for validation. |
@rlowens this is super interesting. What do you think about the TX logic. Is that a 10k pulldown on the Drain of the TX MOSFET you think? |
@foreverimagining the best thing to do here is to determine the path between the Red wire pin and the D1 pin, and then the red wire pin and the D2 pin. Our current understanding of the logic is that the wiring goes: RX:
TX:
If you can measure those paths with a multimeter and confirm or correct this assessment it will help a lot. We're interested in whether there is a resistance measurement where we expect one (and what the value is, in ohms), and whether there is a resistance measuremenr where we don't expect one (and what the value is, in ohms). Where we say "GND", please use one of the "White Wire" terminals as your probe point. |
This comment was marked as outdated.
This comment was marked as outdated.
If your meter has continuity mode it will be much easier, see https://www.youtube.com/watch?v=5G622WDZaHg for a random video that explains how to use it For the RX side we were expecting G to go to the red wire. With the multimeter in continuity mode start touching different points on the board until it beeps, keep a note what component it is, measure its resistance and continue on the other end of that component until you reach the red wire. Similarly for the TX side try to trace what the circuit is between D1 and Gate of X0YL. What's the resistance between source and gate of X0YL? We expect 10kΩ. It might be worth measuring resistance between each pair of the SGD pins for both MOSFETs. |
Ok, I definitely made some rookie mistakes because some of them seemed to work at the lower setting and I didn't know what I was looking for. My multimeter does have a continuity mode. I think part of what tripped me up is that Red Ctrl does not go directly to Gate or Source, but instead shows continuity with multiple resistors. I had poked around a little because I wasn't getting much of anything. Having turned up my resistance setting, Red Ctrl reads 10kΩ at both Gate and Source, but following continuity, The resistance between Source and Gate of the X0YL mosfet is actually 11kΩ. The three resistors that are labeled OIC are 10kΩ, but the one labeled OIB is 1kΩ. I'll go through it a bit more and return with more values. |
This is very helpful! Thanks for all the measurements and the annotated pictures. So the schematics in the repo are missing 3 resistors:
I'll see if I can find an 1 kΩ resistor to try this out on a Sec+1 GDO. |
So it looks like we have:
As the circuit works without these, they are there for removal of floating voltage and to provide further guarantees that the ESP8266 GPIO drivers aren't damaged. In other words, "best practice". I'd need to ask one of my EE friends just how much they would be recommended, particularly the resistor between the red wire and the RX MOSFET gate. |
I added the missing resistors on my board but I can still not control my Sec+1 GDO. The only difference is I'm using two 2N7000. Controls do not work but neither does receiving the correct status. In the logs I see it enters emulation mode which polls GDO for current status. The reply is always that the door is open. The fact that I get some communication initiated by ratgdo suggests to me changing the TX MOSFET will likely not help. @foreverimagining I'm confused by your last measurement |
You're right. I measured again, so either I skipped a key when I typed it in or hit the wrong pads when I measured. I'll go back and fix the first comment so as not to confuse anyone who doesn't read the whole conversation. |
@foreverimagining looking at your pictures again I think you might have shorted red ctrl and blk obst, maybe by accident while you desoldered the connectors on that side? Can you check if there is continuity between them? There shouldn't be. All the components you took measurements from are on the side you connect the red/black/white wires. The circuit for the obstruction sensor should have two 10kΩ resistors. Pin D7 (ESP8266) to Wht GND should be 10kΩ and Pin D7 to Blk Obst should also be 10kΩ. |
Doesn't look like it. I didn't get a beep, and I tried all combinations. For confirmation, I did test red to red and black to black, which beeped as expected. I actually didn't think to follow the Blk Obst anywhere since the questions had been about Red Ctrl, the pins, and GND. I'll work on that for you now. |
Before I move on to following the continuity, Pin D7 to GND and Pin D7 to Blk Obst do both measure as 10kΩ. |
I've not fully checked, but here is my schematic with the updated from foreverimaging's measurements. I also have the dry contact and status components from the v2.0 board schematic included. I seem to have the same number and values of components as the v2.5 ratgdo has (15 total). (I'll check it over a little more later, but figured this might help to visualize what was being communicated. Do note I dont have any physical boards to measure.) EDIT: removed schematic with error. |
@thayerfox I think R3 should be connected to the left of R8. |
Yep, good catch. I'll fix that and repost tomorrow. |
Thanks. So the obstruction sensor is using 2 10kΩ resistors matching the schematics in this repo. They are on the opposite side which is strange but I guess that's where there was space. And the schematics in this repo are indeed missing the 3 resistors mentioned earlier which unfortunately didn't make a difference controlling a Sec+1 GDO. |
I think for us pioneers of building our own boards, you need to read the source code on how the ratgdo is trying to control Sec+ 1.0 systems. Really only then is it possible to perform a proper diagnosis and measurement. As an owner of a Sec+ 2.0 system there's little I can personally do to help diagnose. |
I've read the code and I've also figured out the very simple circuit of my wall panel that controls my GDO. They do completely different things so it seems my GDO isn't compatible. I've ordered a reed sensor and I'll use either a spare relay I have or the 2N7000 MOSFET to pull the red wire to the ground. |
Here's another information drop. I think I got everything on this side of the board (we'll act like D3 is on this side), but let me know if I missed anything. I decided to number identical components starting from the top of the picture for easier matching, which may be different from peoples' schematics. Resistance Measurements: Trigger Open to Cathode 2: 0.6Ω Trigger Close to Cathode 3: 0.6Ω Pin D0 to Mosfet 1 Gate: 10kΩ Pin D8 to Mosfet 2 Gate: 10kΩ |
Great timing, as I was just working on this today. |
@thayerfox do you have a PR or branch with the updated kicad schematics? Looking to update my board designs. I’ll test this new schematic with my Sec+ 1.0 Jackshaft once the ESPHome 1.0 support comes out. |
I do, but my board is a little too modified to be suitable for a PR. (I've added a 6-30V DC-DC to power off the 12V battery in my opener and optimized for JLCPCB.) https://github.com/thayerfox/rat-ratgdo/tree/full_featured_ratgdo2.5/kicad_files/D1%20Mini%20-%20ESP8266%20-%20Tubez (Don't laugh at the tubez part, its an inside joke from long ago at university about a vacuum tube caricature 😆) |
Ok, thanks @thayerfox! I can take a stab at creating a more simple version using your schematic. Thoughts on the accuracy of what we're seeing vs the schematics @Kaldek and @bjhiltbrand? Sounds like you verified this working @kaechele. Are you using the Sec+1.0 for your garage opener? |
My opener is a Security+ 2.0 model. |
@thayerfox, why am I here making all these janky board designs, when you are clearly much more gifted in the ways of KiCAD? ;) Mind if I use your KiCAD files to re-work all the board designs/add full-featured variants to this repo? Edit: Also, why did you choose a K7805 instead of a K7803? Seems like it would be better to step down to the native voltage of the ESP, especially if you were going to use a bare chip that doesn't have a 5v option. |
Sure, use what you want, modify to suit your needs/rename as needed. I will have more time early next week if you want some extra help as well. (I chose the handsolder pads for all the smaller smt and tweaked some of the tht pads for easier assembly as well.) As for the K7805, its what I had laying around and was in stock a jlcpcb. You could certainly use the 3v3 version and power the esp8266 direct, or via the 3v3 pin on the d1mini. I was planning to add the 500mA fuse in line with the protection diode as well. (You bypass the fuse on the d1 mini when powering through the breakout pins) |
If everyone is in agreement that @thayerfox's schematic looks good and everything makes sense, and unless anyone has any further tests for me to try, I'm thinking I'm going to solder connectors back on my board and try installing it tomorrow. It's been awfully quiet in the repository in the last few days, so I'm assuming things are going well, or people are just busy with the holiday. |
I don't even celebrate Thanksgiving since I'm over here in Australia. I'm just busy in general! |
No holiday in Canada either. I can just confirm that my installation is still working great. |
I always forget that Thanksgiving isn't particularly internationally pervasive since it's such a big get-together over here. Most holidays are rather optional until we start getting to this part of the year. I'd never remember when Black Friday is without it, though.
Happy to help. It was a good learning experience for me, too. |
Thanks for your help in taking those measurements. Solder your connectors back on and go enjoy your local control! |
I really don't understand the resistor network at the gate of Q1. For one, R6 adds a load (however light) to the wireline bus. (FYI, the wall panel gets its power from the data line.) Additionally, R7 slows down the speed of the mosfet saturation (due to gate capacitance), which admittedly could be purposeful. Moreover, there are times when the bus doesn't get pulled fully to ground per argilo/secplus#5. Wouldn't the resistor network aggravate the task of finding a suitable choice of a mosfet when a low state can be above ground? With a 45k pullup resistor at the input to the ESP module, that's only about 70 uA of drain current at saturation. It seems to me a voltage divider is needed (similar to the obstruction signal) or perhaps the schematic is wrong. If there is a voltage divider, the value ratio between the two resistors should 2.5, or thereabouts, depending upon the mosfet. The question remaining is what values to select. Too low and it's a load on the wireline bus, and too high it slows down the mosfet. |
You can't think of R6/R7 as a voltage divider. When the mosfet is at steady state, there's no current flowing through the gate. |
That's the point. It isn't a voltage divider, but maybe it should be. The concern is Q1 might not reach cutoff because, per the data sheet, the minimum threshold voltage for a 2N7002 is 1 volt at a drain current of 250 uA. At saturation, the voltage for sinking 70 uA can be below 1 volt, which is why I linked the capture of the data bus. Moreover, performance below 250 uA isn't even provided in the data sheets, just the max leakage at 0 Vgs (5 uA). Simply put, unless the bus reaches the cutoff range, you'll never pass data. Use a voltage divider and you can gain some operational margin. Other options include finding a mosfet having a higher minimum threshold (some have said >2V) or use some other way of interfacing with the data bus.
|
Here's a visualization of actual data. This plot of data should be familiar to you: Here's an excerpt of the data: Note the voltage of the last data point. It's 1.44 volts. Its above the minimum point of cutoff for 250 uA of current, let alone 70 uA, which needs to be some amount lower than 1 V (plus some operational margin). There's a good chance you won't pass the data. Also look at the sags in the level of the high value on the top plot. This is because each successive message is depleting charge from the supercapacitors in the wall panel. It's the reason you should try to minimize the parasitic load on the data bus. Once data activity stops, the voltage recovers. |
@Sudo-Rob can you clarify if what you're saying is that you don't believe the resistors should be in place between the control wire and the RX MOSFET? All I can say is that I sure don't have any resistors in use on the control wire side and my prototype board I built has been rock solid. I can also say this repo wasn't set up to clone Paul Wieland's work; it was set up to provide the necessary functionality for people who cannot or choose not to, buy his board. Ergo, I will defer to expertise rather than "what Paul did". If this means I need to update the schematics to remove components which are causing debate, I'll do that. |
I'm a little late to the party, but I'm going down a very different path. I am not saying to take out the resistors and make a direct connection. While that can work, I'm not sure it'll work for all systems out in the field. I would choose a voltage divider where 2 volts would be divided to produce about 0.75 volts. That would ensure Q1 achieves cutoff. Not knowing more about the design of the data bus prevents me from making a guess of the resistor values, but I could model the circuit to see what happens with rise and fall times. I could start with 82k and 47k. It still would represent a burden on the data line, but a much lower one as compared to 10k. FYI, I have built and tested a much different interface that largely avoids what I perceive as issues with Q1. I consider it still in beta. It is more complicated as it uses 11 resistors, a small integrated circuit, and a mosfet (for Tx data). That's just for the data and obstruction sensor. I am not trying to disparage a design that is working well for many people. It's difficult to argue with success. |
Can I ask if you folks (@Sudo-Rob and @thayerfox) are Digital Logic guys? The reason I ask is that in digital logic, you don't generally need to be fully high or fully low (although you should design circuits that do this consistently and any design which doesn't would be a very, very poor choice), and your signal high/low cutoff point is usually somewhere in the middle (e.g. ~2.5 volts for what we commonly refer to as TTL/5v logic). The point I'm making here is whether this is effort to fix a problem which doesn't exist. However, that is my assessment of my interpretation of what you have written, nothing more. |
Do we know for sure if the wall panel motion is being read directly by the ratgdo? Could the gdo be replying with an acknowledge that it got the motion detection message from the wall plate, and that's actually what the ratgdo is using? Ive not dug too deep into the ratgdo protocol decoding. I mean we know these devices are working... If that scope plot above is correct it's just a bit of a mystery for the wall panel signal. It's possible too that the scope plot had some other issue occuring too. |
The FDN86246 is a good find and it's not horribly expensive ($1.29 in unit quantity). |
Can confirm the schematic from @thayerfox worked for me for a liftmaster 8500 (which is one of the strange openers labeled as security + 2.0 and have a yellow learn button, but they use the older wireline protocol from the Security + 1.0 openers). It needs 2.5 software so I flashed the original MQTT 2.51 software. |
I'm almost certain I have the same model (8500), says Sec 2.0+ and has a yellow button and the sticker says it was made in 2016. In my case the original schematic, with the 2n7000 MOSFETs and only 3 10k resistors (pulldown on TX and voltage divider on the obstruction side), works perfectly for the past 2-3 weeks using ESPHome 2.5 code. It works consistently for all features including status for motion off the panel, obstruction sensors blocked, light on/off, remote lockout on/off, open/close/status of the door. |
Closing as this is more accurately going to lead to additional Pull Requests rather than being an Issue. |
@thayerfox Did you verify the orientation of the Dry contact diodes D1, D2, and D3? From the MQTT code seems like some of those pins are defined as inputs but all diodes in your schematic are pointing agains the ESP. |
It finally arrived!
Alright, this may be a bit of information overload, but I'd rather provide more than enough starting out and therefore, limit the need for further questions. I broke out my DSLR to get some decent macro photos of the various components, traces, and vias because it really is surprisingly small in person. I have compiled them with smaller references marking approximately where on the board front and back I think the pictures are in order to make review a little easier. I can provide more, if necessary; I just need to know what parts need focusing on.
Let me know if you want any testing done, and I am also tempted/willing to desolder the terminals to get a look at what's underneath them. I'll be doing some soldering, anyways, for this project. I figure I'll leave off installing it for at least a few more days, partially because I don't know if I'm even tall enough to plug the little bugger in.
The text was updated successfully, but these errors were encountered: