Kaldek / rat-ratgdo

Open source schematics for ratgdo PCB
MIT License
302 stars 46 forks source link

Alternate design approach to the interface (schematic) #56

Closed Sudo-Rob closed 7 months ago

Sudo-Rob commented 7 months ago

Here is an approach based upon the use of analog comparators. The design places switching thresholds midway between the expected excursions of the two inputs. The burden on the data bus is approximately 26 µA at 12 V.

For questions and comments, I suggest creating a new issue.

Alternate_interface_design
Kaldek commented 7 months ago

This is tough to write, and I don't know if I can write it in any way which isn't hurtful.

I can't merge this. It's just too far off the path of what this repo is about, which is taking the existing code and basics of the original ratgdo circuitry and making it possible for someone to build their own. I assume the design proposed here would work, but I don't know it would work, and this repo should not host anything which might require a code change.

My recommendation is that if you do feel strongly that this is a better design, I recommend taking it to Paul Wieland's repo and discussing it with him there so that his commercially sold PCB becomes more robust.

Once again Rob, I am sorry that I can't merge this request and I don't mean to be disrespectful to your skills.

TheCranston commented 7 months ago

@Kaldek For what it's worth, I've got this circuit deployed and it works perfectly. No changes to the code at all. I've got the stock mqtt-ratgdo firmware loaded from Paul. Given it's minimal loading on the shared serial bus and thermal tolerances (over the seasons it gets pretty cold and hot in the typical garage) to me it's a robust drop-in design. I'd consider it a community enhancement to the project. just my 0.02.

Sudo-Rob commented 7 months ago

I understand your position, but it does work. I've built two and both worked at first application of power. You've published the photo of the first one, and I've specifically called it an "alternative." I know it's not for everyone, but having someone design a circuit board might make it more attractive. The parts minus the board would be less than $5.

Just so you know, I've looked at the ratgdo files and know how the interfaces are presently configured. The design is a functional equivalent which has been improved. I've done a reasonable amount of simulation along with an extreme value analysis. I know it has more operational margin that what folks are presently using, which includes analysis of performance over a broad temperature range. Each comparator uses hysteresis for additional noise immunity. Moreover, I know its load is 1/30th the amount as compared to the existing design.

At any rate, I was hoping it would at least see the light of day so it would stimulate discussion. Ultimately, the decision is yours. I will, however, close with these words:

"I can also say this repo wasn't set up to clone Paul Wieland's work..."

Respectfully.

R

foreverimagining commented 7 months ago

My opinion on this is that if it works and it doesn't require any changes to code, that it should at least be mentioned in this repository; even perhaps if it did require changes to the code as long as they are explained in detail for ease-of-use.

Ultimately, this repository is focused on giving people an alternative means of attaining the hardware for the Ratgdo in an open-source manner to be used with the open-source software if they cannot or do not want to wait for an original (of some sort since you never know what you're going to get when you place a backorder). It also makes available the opportunity for people to customize the hardware for their particular use case.

Personally, I'm dropping the dry contact side of the board because I don't need it for my yellow-learn-button-GDOs and replacing it with more passthrough terminals to make installation easier for my particular wiring as well as breaking out a couple of the GPIOs and 5V to try adding on an ultrasonic sensor for car presence detection. If the hardware for Ratgdo had been open-source in the first place, there could have already been improvements and specialized designs that opened up the capabilities long before now.

If you need an example of an open-source hardware repository that focuses on the main design but recognizes and encourages forks for different use cases, check out b-parasite. I would just rather that there be a list somewhere to collect all of the workable variations together for easier viewing so that people don't have to hunt through issues and forks.

Kaldek commented 7 months ago

Alright @Sudo-Rob , it seems you have a few supporters.

If you add a decent markdown file explaining the differences between the basic design and your different approach, I'll merge it.

Sudo-Rob commented 7 months ago

Here is some introductory text. At the outset of the project, I had only seen one schematic that I took as a notional example of what needed to be accommodated. I have avoided doing direct comparisons because there could be design considerations I'm not aware of. I respectfully request that the design stand on its own.

This design is offered as an alternative to others being used. To the best of my knowledge, it is a drop-in functional replacement. It's based on the use of analog comparators to establish thresholds for the conversion of garage-door-opener logic levels being presented to the ESP module of choice. As of this writing, two prototypes have been built and are working with ratgdo firmware. Specifications are included in the chart below.

Here's a link explaining what an analog comparator does. The ratgo interface is a natural fit for the device.

https://en.wikipedia.org/wiki/Comparator

Here's a picture of the prototype configuration stacked with a module:

Shield_on_ESP

Here's an updated schematic. I apologize for this, but I found a transcription error for R2 when reviewing material for this response. Sincere apologies.

Alternate_interface_design

Here's the meat of my response in table form. It characterizes the interface of the GDO, the requirements for the ESP module interface, and detailed specifications of the interface as implemented.

Design_implementation
Sudo-Rob commented 7 months ago

I've encountered unexpected behavior with a different wall panel. I'd like to rescind this PR until I understand the behavior and, if necessary, make appropriate changes. I'll resubmit the PR when I'm more comfortable with the design.

JonLech commented 7 months ago

@Sudo-Rob Keep us posted. I started learning PCB layout this weekend so I could try printing your design to test with my LiftMaster. I will pause for now while you investigate.

pcb

Sudo-Rob commented 5 months ago

A revised version of this retracted PR has been posted here:

https://github.com/Kaldek/rat-ratgdo/pull/75

Sudo-Rob commented 5 months ago

@JonLech:

FYI: PR https://github.com/Kaldek/rat-ratgdo/pull/75 has been merged.

Apologies to distribution for the post.