Low frequency class D for vibrating bed.

hello,
A friend of mine has bought a adjustable / vibrating bed for cheap as the controller is broken.

i have worked out how to control the adjustment actuators as they are just 30v+ for up and switch the polarity to go down, the limits etc are set on the actuators.

The bit I am having trouble with at the moment is the devices that cause the vibrations, I have measured a working one with a scope and it is fed 30v 91hz pwm, with the duty cycle changed between 20% to 60%. The vibration motors themselves are not the offset weight on a spinning motor type but are a coil, magnet and probably a spring( the rubber mount?) with a weight, and should be similar in theory to drive as a speaker.

I believe that I should be able to get a little trickier with these and instead of just pwm at 90hz I would like to be able to feed them between 50 - 200hz to get some interesting effects when varying the frequency, this also hopefully opens up the door to getting the low frequencies from the audio system and modulating the bed with them.

I am looking for a little guidance as to what arduino I should use.

I believe that i should be able to use an arduino as a class D (vary duty cycle)at around +1kHZ switching frequency without to much difficulty to drive a couple of mosfets in half bridge. the goal is to have some pre-programmed sequences for massage type scenario and then listen to an audio signal and take out everything above 200-300hz and feed the amp with whats left.

I have come across a few snippets of class D with an arduino however the only working one was
written in c not arduino.

has anyone seen anything out there along these lines??

I hope to keep this project updated here so if it is the future you should see a solution below :slight_smile:

TIA

however the only working one was written in c not arduino.

Arduino is C so that does not make sense.

Not sure just a half H-bridge will do, I would have thought you need a full bridge here. It might not be easy to change the frequency as there will be a strong mechanical resonant component to the setup.

Changing the PWM frequency is easy, what is more tricky is having a specific PWM frequency and having the full range of PWM duty cycles.