555 circuit to open/close car door window

burrism

Oct 15, 2024
14
Joined
Oct 15, 2024
Messages
14
Thanks for all the insight and input but the conversations are getting over my mechanical engineering knowledge and comfort level. Sadly, I am trying to understand everything but am getting overwhelmed so I need to take a step back for a while.

Thanks for all the assistance and support.
 

burrism

Oct 15, 2024
14
Joined
Oct 15, 2024
Messages
14
Good afternoon fellas. I found a solution to the edge detecting to switch between the up and down modes to be MUCH easier with a PIC and was able to do everything with an Adafruit Trinket MO. MUCH cheaper and easier to prototype that building a 555 circuit.
 

davenn

Moderator
Sep 5, 2009
14,474
Joined
Sep 5, 2009
Messages
14,474
Good afternoon fellas. I found a solution to the edge detecting to switch between the up and down modes to be MUCH easier with a PIC and was able to do everything with an Adafruit Trinket MO. MUCH cheaper and easier to prototype that building a 555 circuit.

care to share what you found, maybe it will help someone else :)
 

burrism

Oct 15, 2024
14
Joined
Oct 15, 2024
Messages
14
care to share what you found, maybe it will help someone else :)
Sure!

So here is the code:

Code:
input.buttonD0.onEvent(ButtonEvent.Down, function () {
    if (!(GoingUp)) {
        GoingDown = true
        pins.D1.digitalWrite(true)
        pause(2000)
        pins.D1.digitalWrite(false)
        GoingDown = false
    }
})
input.buttonD0.onEvent(ButtonEvent.Up, function () {
    if (!(GoingDown)) {
        GoingUp = true
        pins.D2.digitalWrite(true)
        pause(1000)
        pins.D2.digitalWrite(false)
        GoingUp = false
    }
})
let GoingDown = false
let GoingUp = false
GoingUp = false
GoingDown = false
forever(function () {
  
})
[mod edit: code in codebox for better readability]

I used an Adafruit Trinket MO with 2x 12-3.3v buck converters, one to power the Trinket and the other to use as the door switch cycle (edge) detector. The two outputs go to two optocouplers with relays to act as a switch for the up and down. The circuit is merely a timer to control the up and down independently, no additional sensors are being used at this time. as I refine it, I might add sensors.
 
Last edited by a moderator:
Top