I am trying to create a system where there are 3 input buttons (PTM) and a dc motor output. The motor needs to be bidirectional.
The 3 buttons are: forwards, stop and backwards. once the forwards or backwards button is pressed, the motor keeps running until the stop button is pressed, or if the other button is pressed in which case the motor will turn in the opposite direction.
It would need to be a latched system (I don't need to hold down the button) and have some protection against unintended input (for example if I accidentally press 2 or all the buttons at the same time, it should ignore it).
I am trying to not use any microcontroller (Arduino) or software on this project. Ideally, something with logic gates, transistors and a motor driver chip (l293d) will be good.
Any suggestions on the circuit for this project or where I can start?

