I’m going to use a H Bridge box to run an actuator (the cover over the protective box for the speakers in my boat - it will be triggered when the amp is turned on). And theoretically this should work, only it doesn’t give me reverse, only on/off. Can somebody please help me with why it’s not there?
Thanks, @Karosm ! So you’re thinking about a template cover? I actually thought there were several ready made and fuctioning H-Bridge stuff for ESPHome, but I see it’s only lights and fans in the manual.
It all depends on your hardware, but you only mention “actuator”.
Different motor drivers can have different control logic, actuators normally have endstops etc.
Tell us what you have…
To be fair I did mention H-bridge as well, so you know I have one of those to do the physical power switching. The actuator has endstops, and it will be fully controlled by the ESP, no manual input at all. I built something from the template cover:
The switches on the ESP web server and in Hass won’t be used much, it’s basically going to be done the way that the headunit in the boat is turned on from Hass, and that will turn on both the amps and the active subs, and when the front amp (this is the front speaker box) is turned on, it sends an MQTT mesage to the broker, which then will trigger the opening with the actuator. And when it’s turned off, it will close the box.
The speakers themselves are Wharfedale Titan outdoors passive 8" monitors that can take 150 watts RMS and 600 watts peak, so they make some noise on my heavy metal (well, light metal, aluminium…) boat Mad Max, I bring my friends along for beer, fishing and music, which is the main reason for doing this. The speakers can take being exposed while in use, but since my boat is on the water all year round they would probably not survive more than a few years if they were exposed to the elements all the time. So the box will have rubber seals that the door presses against and be closed everywere else with Tec7 glue.
Yep, but there are many different logics. I asked because your code had pwm on dir pins. Many drivers expect continuous on dir pins and pwm on enable pin.
Honestly I had no idea what I did with that first code, LIke I normally do I searched the forum, found something I hoped could work and tested it, but it didn’t do the direction change. The second, totally different version is more in my wheelhouse (to keep it maritime), I am very used to working with switches and relays and stuff like that.