Skip to content
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

New Sync mode special for motors #1062

Open
mrestivill opened this issue Jul 19, 2018 · 4 comments
Open

New Sync mode special for motors #1062

mrestivill opened this issue Jul 19, 2018 · 4 comments
Labels
enhancement New feature or request relay
Milestone

Comments

@mrestivill
Copy link

Hi,
I'm using a 4ch board with espurna firmware, activating cover motors. The configuration I use:

1- motor A up
2- motor A down
3- motor B up
4- motor B down

At hardware level is configured to be only one motor up or down ( by default up will be used if both 1 and 2 relays are active (11) ). So on relay1=1 and relay2=1 will cause motor A up.

I checked the code as I wanted to add a new sync method "Zero or One switches active on Pair relays" that allows only one on every 2 relays on but is not as clear/clean as the current options.

The problem is that If I use Zero or One switches active I can't open both motors up at the same time.
I've also tried group sync but I couldn't find a good way to do it.

I also have another board with a single motor (relay1 and relay2) and a light on the relay3 and the relay4. So this new functionality won't apply on this other case, but that can be addressed on another issue.

I've also though to use a mask or something on each relay to specify the group.

@AlbertWeterings
Copy link
Contributor

Hi glarfs,

Maybe something to consider, I use one relay to set the motor direction 'nc' (off) is up the second relay is starting the motor. This way it is physical not possible to have UP and DOWN activated at the same time. I also found the self-induction of the motor can cause a reasonable spark inside a normal relay so I replaced the relay that activate the motor with a solid state version. The direction relay is a normal one as it will never switch when the motor is running it is not stressed.

@hyteoo
Copy link
Contributor

hyteoo commented Jul 20, 2018

@glarfs from an electrical engineering standpoint, I would recommend you use a H-bridge controller which would have several benefits over relays, like:

  • quiet
  • control speed with PWM
  • integrated protection against ShortCircuit, Overload, etc
  • cheaper
  • practically no way of accidentally driving a motor up&down at the same time

I could give an example that would fit your dual motor setup: http://www.ti.com/product/DRV8848
Of course everything depends on the motor power so if you could give us more details, that would be great ;)

@xoseperez
Copy link
Owner

I think hardware-based control is a must when using motors, but you said you already have that covered.
From the software point of view, I like the relay groups idea. By default, all relays will belong to the same group and it will be the current behavior, but you could specify groups of 2 (or 2, 4) relays together. Then the sync options will apply per-group.

@xoseperez xoseperez added enhancement New feature or request relay labels Jul 26, 2018
@biot
Copy link
Contributor

biot commented Oct 8, 2018

Just adding my vote to this. I have roller shutters I need to control with a Sonoff Dual R2, in a similar configuration: each relay is connected to a direction of the motor, and the Sonoff set to "Zero or one switches active" mode. However I want to use a single button to control the whole thing, where the button would just toggle the shutters opening or closing. Relay groups is the only thing missing for me here.

Ideally there would also be a feature where pressing the button while either relay is closed, would open it -- stopping a running motor. Next press would then close the other relay in the group. In other words, exactly like a single-button garage door opener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request relay
Projects
None yet
Development

No branches or pull requests

6 participants