Good afternoon, I’m using a genuine UNO and I am trying to see if I can use it to drive a high speed solenoid. The solenoid requires a boost-peak-hold current driver and my plan was to see if an arduino can perform fast enough to control a FET to accomplish this.
I’m starting my testing using a current shunt fed to analog pin 2 to measure current to a dummy coil being controlled by a FET controlled by pin 13. A function generator gives a 500us pulse to digital pin 12.
To establish a proof of concept, I have the arduino waiting to see pin 12 go high and then it sets pin 13 high until it sees the shunt current signal on pin 2 exceeding 10 counts. It then turns 13 off till the signal drops below 10 counts, and it keeps choping like this to try and keep pin 2 at 10 counts.
The overall duration of the “peak” portion is 500us and based off my measurements of the 1.5ohm coil it will need to be able to get to a chop frequency of 60kHz or better. With the attached code I’m at a chop frequency of ~10kHz. I’ve tried using digitalfast which helps, but I still need to get almost 10x faster.
Is there anything I can do to achieve this in the code I’ve got (I’m a novice at arduino)?
If not, can someone recommend hardware under $1k that would do this?
sketch_cidi001.ino (1.05 KB)