Electromagnet drop mechanisme through mosFET and pixhawk

I am trying to charge an electromagnet with a mosFET where I use my battery to get 24V to the electromagnet through the mosFET. Now I need a signal to the mosFET from the pixhawk but I think this needs to be through the aux out. But I cannot set this up properly to work… any help?

A relay out will produce 3.3VDC.

Relay Output

1 Like