Author Topic: Fast linear cycles  (Read 4062 times)

0 Members and 1 Guest are viewing this topic.

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Fast linear cycles
« on: May 23, 2018, 07:53:50 pm »
Hi everyone,

I am working on a project where I need something to move back and forth very rapidly. Lets call each movement a stroke.Think about how a sewing machine needle moves up and down really fast. A stroke is defined by the time that it starts moving to the time that it returns to the original position (essentially the period of a square wave). The faster the better. Ideal is 200 strokes per second, but if I could get above 100 I would be happy. Currently I can get to about 55. Length of movement is currently 0.35 inches with this solenoid. That could be changed to longer or slightly shorter if needed.

Currently I am using an arduino as the controller and a solid state relay to trigger the solenoid. I also have a proximity sensor rated at a much higher frequency than this. The SSR and prox. are nowhere near bottle necking. I have a spring to return the solenoid to the top of the stroke. I can change everything about the spring (rate, length, diameter). I can also adjust where the prox. is and where it is triggered by the flange of the solenoid.

PWM with the arduino didnt work at all since the only thing you can adjust is duty cycle.

The code that seems to work the best is below. The ontime is used to allow the solenoid to reach the bottom of the stroke. This is adjustable and, depending on the mechanical setup, can be completely eliminated. Between 4 and 5ms seems to be the sweet spot right now. I don't necessarily need the proximity sensor, but it was a convenient way to trigger the solenoid to cycle again without messing with the off time delay.

Code: [Select]
#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'm thinking I might need to switch to some sort of mechanical system that changes the output of a motor to linear motion to get the speed I am looking for. Similar to a crank and piston in an engine.
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2550
  • Country: us
Re: Fast linear cycles
« Reply #1 on: May 23, 2018, 08:21:32 pm »
I have not done much Arduino programming.  But, I understand that the DigitalRead and DigitalWrite commands are very slow.  Try using the port commands instead.  See  https://www.arduino.cc/en/Reference/PortManipulation

If you are using other bits on those ports, you may need to double buffer the port bits keeping track of current values in a software buffer.
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14206
  • Country: de
Re: Fast linear cycles
« Reply #2 on: May 23, 2018, 08:41:54 pm »
Arduino commands may be slow (e.g. a few µs maybe)  but compared to the mechanical system this is still fast (more like 10 ms).

The problem is getting the mechanical system right. A fast linear movement is usually not very attractive, as is includes quite some accelerations and forces that change direction so that any free movement will cause trouble.  If possible one could use a resonant system so that only very little energy is needed and most of the acceleration would be from some "spring"- however it depends on the application.
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #3 on: May 23, 2018, 08:50:43 pm »
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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Fast linear cycles
« Reply #4 on: May 23, 2018, 09:07:55 pm »
Then you need to increase the voltage across the solenoid, limiting its on time to a similar amount of power as the first,

Solenoids appear to a circuit as an inductor, to make the magnetic fields build or collapse in a solenoid faster will take more voltage. you however will want to limit the on time so that you do not burn it out after a stroke.
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Fast linear cycles
« Reply #5 on: May 24, 2018, 12:51:04 am »
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.

What us the force that you need? Enough to move a car, a house, a flea? This is a physics problem, have you defined the distance that it needs to move?
PEACE===>T
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #6 on: May 24, 2018, 01:02:57 am »
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.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Fast linear cycles
« Reply #7 on: May 24, 2018, 02:12:08 am »
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
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Fast linear cycles
« Reply #8 on: May 24, 2018, 02:28:19 am »
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.

Is this a school project?

Is this the only solenoid that you have access to? The solenoid you are describing is a DC rated coil solenoid. You need one that does not have a diode and you can handle the back EMF with a snubber circuit. The diode is probably working against you, partly because you don't know it's zener voltage. You are now operating in the AC (pulsed DC) realm with the rapid pulsing. You can operate coils at higher voltages, just at a reduced cycle on time. This 10% duty cycle is not good either, you need something at least at 40% duty cycle, or an AC rated coil.

Just my 2 cents...
PEACE===>T
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5234
  • Country: us
Re: Fast linear cycles
« Reply #9 on: May 24, 2018, 02:54:44 am »
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.
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #10 on: May 24, 2018, 03:25:56 am »
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. 
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #11 on: May 24, 2018, 03:36:15 am »
This is something I am working on with a friend. I don't really have all of the details, just what part he wanted my help with. He is a mechanical engineering student at another school and I just finished a 4 year degree in EET. But I haven't ever worked with triggering mechanical things at this speed besides rpm on motors. This is isn't anything officially through a school or for competition against other schools. Just a personal project.

I can easily remove the diode or switch to the second solenoid that doesn't have it. They are identical except for the diode that must have been added by someone else. A snubber circuit makes sense for handling the back emf.

The solenoid is rated for higher duty cycles, but at lower voltages. I will post the datasheet tomorrow. I don't have the model number handy to look it up.
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #12 on: May 24, 2018, 03:50:18 am »
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.

No need to adjust stroke rate on the fly. Just when initially setting it up to find what works the best. I know this is an electronics forum, but do you have any suggestions in mind? I've been looking at all kinds of designs to do this, but a lot of them look like they could bind. I'm personally thinking that simple is better and just doing a wheel with an offset pin and a rod. The radius from the center of the wheel and the center of the pin determines the stroke length. Balancing will definitely be important at that rpm.
 

Offline tpowell1830

  • Frequent Contributor
  • **
  • Posts: 863
  • Country: us
  • Peacefully retired from industry, active in life
Re: Fast linear cycles
« Reply #13 on: May 24, 2018, 05:35:16 am »
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.

Mechanical spring returns are not going to work unless you have an incredibly strong spring at 12,000 strokes per minute. The idea of a nitro fueled powered piston engine will get you over 6000 strokes per minute fairly easily, but when you get up to 10-12,000 it is is a mechanical stretch, although it has been done, the tech is a bit difficult. However, if you were to get one of the BLDC motors, say for a drone and release the cylinder head to relieve pressure on one of the small nitro powered engines used for RC vehicles and mechanically attach the BLDC motor to the crank shaft of the engine, the piston is now moving up and down at the right distances that you mentioned. If the impact of the piston is very much more than a few Gs, it will destroy the mechanical structure of the crank shaft. The RC BLDCs can get to those RPMs.

The ESCs (Electronic Speed Controllers) for RC BLDC motors are very available, or as an EE, you could have fun designing your own. Your mechanical guy could figure out the mechanical coupling, etc.
PEACE===>T
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #14 on: May 24, 2018, 12:26:37 pm »
I used to race rc cars with brushless motors (hence the username). I for any mechanical solution I was definitely thinking brushless for speed, power, and longevity.

While I have no doubt that I COULD design an esc, I don't see the need. Plus it would take me a lot longer than some other people. I am Electrical Engineering Technology. That program focused more on hands on stuff and system integration. Like PLC controls, and fixing industrial equipment. We did have courses on analog and digital systems, but the program wasn't designed to create students that are good at designing their own pcbs. I would eventually like to learn more about it though.

Here is the datasheet for the solenoid that I have on hand. They distinguish models based on wire gauge, I have the 24awg model.
http://disti-assets.s3.amazonaws.com/testco-inc/files/datasheets/4001.pdf
« Last Edit: May 24, 2018, 12:28:35 pm by nerdyrcdriver »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Fast linear cycles
« Reply #15 on: May 24, 2018, 12:38:30 pm »
Seeing as the op said he got to 55 / second with his current setup, I have avoided ruling out his reasoning for the method,

However, speeding up the reversal could also help you speed up your rate, giving a small reverse polarity pulse at the crest of the motion to get it moving back,

There is a tradeoff point somewhere, but it may help,
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #16 on: May 24, 2018, 02:49:00 pm »
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.
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 5234
  • Country: us
Re: Fast linear cycles
« Reply #17 on: May 24, 2018, 08:26:53 pm »
I am a sparky by trade so your ME buddy may be a better source on a rotating mechanical system.  Simple pin and bushing systems work at these speeds and higher (think RC airplane motors which run as fast as 24K RMP).  As you mention, side loads are key as they define system friction.  This is true for the solenoid system also, but in the solenoid systems there is no fundamental source of these loads while in the crank mechanism there are direct and kinetic sources of these loads.  Key things will be the effective length of the bearing supporting the stroking shaft.

As an aside, you don't mention any requirements or desired features for the velocity profile of the stroke, force at endpoint or other features.  Your application may have needs in these areas and those will have an impact on the mechanism selected.  Most energy efficient solutions, like the resonant approaches Kleinstein mentions and the crank based systems result in sinusoidal motion.  May or may not be suitable for what you are doing.

 
The following users thanked this post: rs20

Offline duak

  • Super Contributor
  • ***
  • Posts: 1041
  • Country: ca
Re: Fast linear cycles
« Reply #18 on: May 25, 2018, 09:07:57 pm »
Food for thought:

Years ago I worked on a project that required a linear scanner with a 25 Hz, 35 mm stroke.  An eng-phys collegue went over the physics and showed that for a simple, non-resonant electromagnetic actuators using non-exotic materials and construction one could get about 200 G acceleration on a continuous basis.  This wasn't a hard limit but more of cost issue.  I wish I had the notes from that presentation to confirm my memory.  AFAIK, the primary limitations were the magnetic saturation and loss characteristics of the core, eddy currents and the I^2R losses of the coil.  Superconductors or helium cooling weren't considered.   This confirmed the original design decision to use a coil spring in a resonant sliding air bearing.  Springs were a problem though and until we found a supplier with an appropriate material and process, we considered going to a crank driven slider.

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 ). 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.

Note that hard disk head seek times have shown only incremental improvements in the past 20 years or so.  It seems they've reached some limit in cost-performance corner.

Cheers,
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Fast linear cycles
« Reply #19 on: May 25, 2018, 09:20:42 pm »
A motor and crank does seem like the obvious solution here, it's how the mentioned sewing machines work afterall.

The hard drive head actuator style servo mechanism might also work well, maybe using a capacitive position sensor.
 

Offline _Wim_

  • Super Contributor
  • ***
  • Posts: 1523
  • Country: be
Re: Fast linear cycles
« Reply #20 on: May 26, 2018, 06:27:59 am »
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...
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Fast linear cycles
« Reply #21 on: May 27, 2018, 02:23:38 am »
I didn't read the full topic, but I can help for your arduino commands being too slow

You can program the PWM to be at any frequency and any duty cicle (higher speed or higher definition than the standard 8 bits) by tweaking the registers, without the actual arduino board used I can't tell which registers to do what but in the datasheet, in the PWM section, should be clear enough. You'd probably want to set the prescalar to minimum, count as low as you can being high enough to reach your desired duty cycle, so you get the fastest cycle you can.

JS
If I don't know how it works, I prefer not to turn it on.
 

Offline nerdyrcdriverTopic starter

  • Contributor
  • Posts: 23
  • Country: us
Re: Fast linear cycles
« Reply #22 on: May 28, 2018, 06:58:47 pm »

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...

Yeah, that was the conclusion we came to as well. It will be more complicated to build, but theoretically capable of very high speeds. I hope to work with this idea on Tuesday or Wednesday.
 

Offline EmmanuelFaure

  • Regular Contributor
  • *
  • Posts: 154
  • Country: 00
Re: Fast linear cycles
« Reply #23 on: May 28, 2018, 09:19:12 pm »
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 ). 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.

A stock Yamaha YZF-R6 revs up to ~16.500rpm, with classic metal springs :


A CBR250RR from the 90's up to ~20.000rpm, again with classic metal springs. Enjoy the sound : :D
« Last Edit: May 28, 2018, 09:25:16 pm by EmmanuelFaure »
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Fast linear cycles
« Reply #24 on: May 28, 2018, 10:25:37 pm »
I suspect the only way the bike is able to run such high speed with springs is the small size and relatively low mass of the moving parts. That doesn't scale well, hence the challenges of developing higher RPM racecar engines.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf