My parents in law have a garage door opener of which the controller board has died, i'm pretty sure the main tranformator has bad windings since there is no voltage on the secundary winding.
Can't find a replacement since there are no markings on it.
I want to build my own controller using a arduino uno with 2 relays for the motor control.
there is a limit switch in the open and closed position
control is via a RF controlled relay and a normally open switch in the garage.
I simulated the would-be setup in tinkercad circuits, and made some code but it won't work properly.
what are now LEDS will be the coils of the relays to switch the mains to the motor.
Welcome to the Arduino forum and your project looks like a good fit for an Arduino. Thank you for including a schematic and properly formatted code listing.
However when you do not tell us what the the code does or doesn't do that does not match you expectation, no one can help.
Did you develop your code in phases and test each step as you went along?
I'm trying to replicate the current working principle of the opener.
When it is closed and you press the button (or remote) it should activate the opening relay and open the gate untill the end stop " opened" is activated, thereby releasing the opening relay.
Same way for closing.
Also, when the gate is moving (GateOpening or GateClosing is high( and the relay is active)), and you press the button, the moving should stop.
When the gate is neither in the fully opened or closed position, when the button is pressed it should always go to the open position.
when i simulate it with my current code, after 500ms the OpenRelay becomes active, anything else doesn't do anything.
For safety reasons You should reverse the logic of the end switches. An open circuit, high from pullup, means Stop and a closed circuit, low level, means Good To Go.
Yeah, in my native language it's transformator
Checked the fuse, it's good. got 230v on the input side of the transformer but nothing on the output side.
You do realize that replacement transformer is the quickest fix for the problem. It can be off the board and connected by wires if the input and output voltages and current capability are close to the original.
I do realize that, but i have no idea what the original transformer's specs are, since there are no labels or markings.
It's a Hormann B 55 DI ( german brand of gate/door openers)
The board being 30 years old isn't helping either, therefore i'm trying to update it with the more modular and modern approach of an arduino with a 2-relay board.
You don't need markings. You know the input AC voltage and you can assume the DC output to the electronics is most likely 5 volts. How many wires on the secondary of the transformer? The only unknown parameter is the current rating for the secondary winding.
This is the circuit I used for a curtain opener I built for my bedroom when I was 14. The motor was an old car windscreen wiper motor, the battery an old car battery kept charged with a float charger.
SW1 reverses the supply and acts as an open / close switch. SW2 and SW3 are the limit switches, note that they have diodes in series so each one only works for one polarity of the supply from SW1. The diodes and switches should be arranged so the door drives towards the switch with the conducting diode until it hits the switch and opens it. You could put 2 limit switches in series as a precaution against them failing short circuit. In the case of my curtain controller I think the limit switches were bent bits of Meccano for the the contacts. The motor must be DC and reversible, which implies either permanent magnets or using a rectifier to feed either the field coils or the armature.
A fuse near the battery would be a good idea....
If you are wondering about where the micro-contoller is in all this, they had not been invented in the early 1970s.
You will note that a general theme of replies here is that it will be more practical to repair the original machine than to replicate all its various functions.
That said, the fact that it actually has limit switches makes it really old and really crude - so pretty easy to re-engineer!
No current machine uses limit switches that have to be mechanically set; my most recent one actually starts up slowly, accelerates in order to be as prompt as possible, then slows down again as it approaches the end of its travel.
I always mention that the UNO is a bad choice for most projects, but if that is what you already have, then OK, run with it.
(The Nano is far more practical for complete designs.)
If you wish to add Bluetooth, then there are add-on modules available. If you want to use WiFi (control your garage door from overseas ) then you should be starting with an ESP instead - such as a WeMOS D1 Mini.
I can always switch to an esp based board in the future, i have ordered some but they take a while to arrive.
In the meantime i just want to get the gate back up and running.
Any advise on the programming mentioned in the OP?