#define ontime 5
#define SSR 9
#define PROX 2
int PROXSTATUS;
void setup() {
// put your setup code here, to run once:
pinMode(PROX, INPUT);
pinMode(SSR, OUTPUT);
}
void loop() {
PROXSTATUS = digitalRead(PROX);
if(PROXSTATUS == 1){
digitalWrite(SSR, HIGH);
delay(ontime);
digitalWrite(SSR, LOW);
}
else{
digitalWrite(SSR, LOW);
}
}I need maximum force in the downward part of the stroke and only enough force in the upwards stroke to return it back to the original position.
The key here is that the spring is a double edged sword. The stronger the spring, the faster it will return. But it will also be harder (and thus require a longer ondelay) for the solenoid to reach the bottom of the stroke.
Well, if I were at school it would be easy to use a good bench top supply and just set it to a higher voltage. Where I am working on the project I only have a supply that can give 5v, 24 (more like 27), and 48v. I wish I had posted the link to the solenoid datasheet in the first post. I will have to find it when I am in the lab tomorrow. The solenoid is rated at 28v for a 10% duty cycle.
There is a large diode across the solenoid that I am assuming is there to prevent any voltage going back to the supply when the solenoid is powered off but moving back to the starting position.
I have another identical solenoid just in case I cause some irreversible damage to the first one. Ideally I don't and then I could build two of these projects. With such a low on time, do you think it is safe to go up to 48v? When I was testing today, I saw a peak of about 300mA at 27ish volts. I know this is could be hard to answer without the datasheet. The solenoid will only be on for a few milliseconds at a time. This project also won't have it running all the time. Adding a cooling fan is also an option.
With the parts for the mechanical assembly, anywhere from about 0.3" to 0.5" stroke would be ideal. The amount of force is hard to measure, but I would guess that it would be roughly equivalent to a light to medium tap with a small hammer. The solenoid is definitely powerful enough from my testing. The only remaining factor is increasing the speed if possible.
The low on time is for 2 assumptions, 1 your keeping it on for seconds - minutes (enough to heat up) and 2, your not using a current foldback driver,
The foldback driver is what i use when driving fast stepper motors, It turns on a leg at some stupid voltage (e.g. 70V for a 12V stepper) then once the inductance saturates, the current limit for that leg holds it at a much lower voltage, this leaves the stepper cool, while having full torque when moved,
The same can be set up with your device, pick a high voltage, and have some fast current limit that will fold back the supply when it saturates, this way you can use a longer On time, and get it moving much faster
I think you will be much happier with the crank and piston approach if the only requirements are as you state. 200 strokes is 12,000 rpm, very doable. In fact you can probably get to 300 without much trouble. The reason this will work is that you only have to supply power to cover friction. The system stores the energy for the return stroke in the angular momentum.
Balance will be important (think the counterweights in internal combustion engines).
The disadvantage of this approach is that you can't change stroke rate as quickly as you could with the solenoid system, but you haven't stated that rapid changes are necessary.
The low on time is for 2 assumptions, 1 your keeping it on for seconds - minutes (enough to heat up) and 2, your not using a current foldback driver,
The foldback driver is what i use when driving fast stepper motors, It turns on a leg at some stupid voltage (e.g. 70V for a 12V stepper) then once the inductance saturates, the current limit for that leg holds it at a much lower voltage, this leaves the stepper cool, while having full torque when moved,
The same can be set up with your device, pick a high voltage, and have some fast current limit that will fold back the supply when it saturates, this way you can use a longer On time, and get it moving much faster
I will have to look into foldback drivers.
The on time should ideally be as low as possible. This is simply a delay between turning the solenoid on (to go down) and turning it off (so the spring brings it back up). I can get the on delay to be pretty low, especially with weak springs. But then the time it takes the spring to return the solenoid. Looking at the attached picture that I threw together in paint, 1 represents the on time. This is the duration of time that the solenoid is on (including moving down and holding in the down position). Realistically, this value is larger than the value in the code and is not a perfect square wave. 2 represents the time it takes the spring to return the solenoid to the up position. 3 is the entire stroke from top to bottom and back to the top.
Actually, I have achieved around 120 strokes per second now by using a stronger spring. However, it doesn't have the power to make the full stroke length. Ive got my friend thinking about a mechanical mechanism using a motor, but will continue to pursue this method.
A weak spring and a small reverse polarity blip might just do the trick. Now the key is how to implement that reversing easily. Right now it is connected to the negative side and I am switching the positive on and off through the SSR.
As you have 2 coils, is it not possible to make a push-pull setup? Then you can avoid the spring return altogether? It is a bit like making the "motor" of a loudspeaker, these can easily get up to 200Hz, and also have an Xmax of 0.35" or more...
Formula one engines were having trouble above 12,000 RPM with metal valve springs and went to pneumatic springs to get up to 18,000 RPM. (see http://scarbsf1.com/valves.html (http://scarbsf1.com/valves.html) ). All sorts of things happen to metal springs at high speeds because they start to work as transmission lines, ie. the applied force has to propagate thru the spring and so it doesn't compress evenly. Plus it also has various resonances due to its distributed mass.