My guess is yes but it is impossible to say with certainty without a schematic.
If you want to share with us what you want to do I am sure someone can come up with a circuit that will work. It is not so complicated it couldn't be built on a vector board if your handy.
Maybe we can back it out from the picture.
So let me explain the project.. No it is not for a class I'm taking, more it is derived form a question my son asked me and then he asked if we could build it.. Ooo A challenge!!
What we have is a old electric compressor pump housing with a simple piston a piston rod and flywheel. We removed the burnt electric motor.
My son asked if there was a way to make the assembly move (not function as a compressor) just move.. I looked it over and suggested maybe we could do something with the repulsive force of some N42 magnets. We fastened one magnet to the top of the piston and held a second magnet so that the like poles of the magnets were facing each other. Yes we were able to make it move, almost through a complete cycle! But the magnets repel all the time which means on the up stroke of the piston the repulsive force slows the momentum and stalls it out.
The only way to go is by using something that can be switched on and off like an electromagnet. Then it would need to be timed to do that at a specific point in the motion of the piston. Unlike a ICE which fires just prior to TDC ours would be fired just after TDC where gravity would help push it through a cycle.. Then we would fire up an electromagnet set to repel the magnet fixed to the top of the piston..
I am loving the challenges we are dealing with and seeing my son work through the issues like figuring out what size magnets we can use and all the “if we did this, then we have to worry about that” type of things.. Besides, it seems like a good father and son learning and bonding experience.
My choice of using 12 volts comes from the fact I have a 120 VAC to 12 VDC converter, which means we can toy around with it all we want and don't have to worry about recharging batteries or fumbling with a bunch of little batteries.
There is my project in a nut shell. Hope I didn't put you to sleep.