ronv thank you, your schematic generates almost perfect square wave outputs, and I think it is clever to switch off the mosfets throu the diode
by the way, would a 1n4148 make the job or should it be a schottky diode ?
It looks perfect, I'll try to find a place for the extra parts on the board or add it as a module and would report the test results. Thanks mate.
For those who can't check the schematic posted by ronv (or won't) here is almost the same:
@jjv Yes, an H-bridge driver IC or mosfet gate drivers would be the best solution, but I didn't find any on the local market and I can't order online, then I went for the comparator solution, and now I ended up with 2 useless circuit boards (well at least for more than a couple minuts) then I'm trying to find a fix for this.
MikeMl , Thank you.
alec_t , well, I think an open collector doesn't prevent a short between the zener and the comparator which would lead to an excess of the zener power rating and/or the mili amps of the comparator output. You correct me if I'm wrong.