r/arduino • u/Wiggles69 • 4d ago
Automatic windows
Ive always wanted automatic power windows in my MX5 (Miata). There was a japanese market option for auto down on drivers side only, but the vast majority were plain old buttons, and because the favtory switches carry the full current for the window motor, they need the contacts cleaned semi regularly.
So with 4 changeover relays, a couple of current sensors and a nano mega328 based board, i now have auto up/down on both sides. It all bolts in to the factory position and there are no permanent changes made to the car.
This is my 2nd finished project, and it would not have been possible without online pcb tools and cheap pcb mabufacturing!





9
u/Wiggles69 4d ago
A not very good video of them working
https://imgur.com/a/V53rrEA
Is there a way to film a window going up and down and make it interesting? 😄
6
u/Aedifix 4d ago
Woah, cool! I’ve never used a current sensor before, how does this work? Do the sensors go inline with the motor relay and sense a decrease in current when the windows reach the limit?
4
u/CoffeeSalt2036 4d ago
Nice install. How are the current sensors handling end-of-travel - stall spike detection, or a timeout as fallback? Wet door harnesses love to nuisance-trip current sensing.
3
u/Sleurhutje 4d ago
Looks good, nice design. But aren't you shifting the problem with the burning contacts from the switches to the relays? For a next project have a look at so called H-bridges to control motors. Then you have a solid state controller without physical contacts.
2
u/stlgen 3d ago
Nice build. One thing to watch with the stall detection is the inrush current when the motor starts, it spikes way higher than normal running current and can trip the threshold. I ignore the readings for the first 200 ms or so after start. Having a max run time as a backup cutoff is also a good idea in case a sensor ever reads wrong.
11
u/DiggoryDug 4d ago
Nice work. Looks great. Thanks for sharing.
3
u/rlaptop7 geiger counter 4d ago
Wow! That's amazing work. Really clean install with the project box.
This is super cool. Such an amazingly good addition to a cool car.
1
u/DavidFromArduino Arduino Staff 13h ago
excellent! could you also program it to wind both windows down an inch or two while you put the top up? 💙