2 relays and a power windows switch.
pin switch is a stop switch.
one on negative..... one on positive
one as "tray opened" shutoff
one as "tray closed" shutoff.
basically the same as power windows "auto up" just caveman style.
when the tray is all the way (open or closed) it will hit the switch.
one cuts the posotive to kill the circuit and stop the tray motor
one cuts the negative to kill the circuit and stop the tray motor
power windows switch to 2 relays...1 for in .....1 for out
relay is the switch in the polarity....just swap the wires on one.
if you want full auto get 2 timers between the switch and the relay.
some timers will replace the relay too