S'ware Generated Sinewaves for Motor Drive

I have an audio editing program (CoolEdit) that can generate audio frequency sinewaves and adjust the relative phase of each.

I would like to generate three at 20Hz (for 120RPM), offset from each other by 120 degrees.

The signals would be output via a 3 channel sound card (yes I have one) and fed to 3 channels of a 4 channel car audio amp.

This would drive a small 3 phase motor.

The objective here is to be able to define precise RPM's via the fixed software frequencies. Also to play around with the waveform and duty cycle.

Does anyone see any potential problems with this approach?

One thing that is missing is the ability to adjust the RPM in real time, since each signal in the above scheme needs to be saved to memory before playback.

Any suggestions on how this feature might be added would be appreciated.

Bob Griffin

Reply to
Bob Griffin
Loading thread data ...

Sorry, that should have been 1200RPM.

Bob Griffin

Reply to
Bob Griffin

It looks to me like the problem is just limitations in the package you're using to generate the waveforms. I have no idea what your background and capabilities are, but generating 3 sinewaves in real time by programming an embedded system isn't at all difficult. That way you can control everything yourself in whatever way you want.

Reply to
Bruce Varley

potential problems are in the failure modes.

make sure the hardware is design is fail safe such that it will not be destroyed by any conceivable combination of errors in the software output.

Mark

Reply to
makolber

One problem with your approach is that it may be classified as dual-use under export controls! (Classified as 3A225 - look it up.) Information about how to build such a thing would be 3E001, so keep your WAV files of sine and cosine waveforms off the internet, or you might get locked up for exporting them when someone uses them to run their centrifuges with a CD player and car stereo. Hehe just thinking about what happens when it gets to the end of the CD. And no I can't help you with your question or I could be locked up also for some more 3E001!

Chris

Reply to
Chris Jones

On a sunny day (Wed, 18 Mar 2015 01:07:18 +1100) it happened Chris Jones wrote in :

They already have 40,000 centrifuges, so they do not need y'r help. Let's see

1 Microchip PIC 2 power pins 3 x 8 = 24 pins for R2R DACs 1 speed up buttin 1 speed down button.

28 pins PIC. internal oscillator. Sine lookup table with three pointers. Variable delay between samples.

Add one button to step through 'waveforms' if needed (why?).

Cost 5 $ (including the buttons) No peesee needed

Use 3.8 V lipo.

Maybe ebay has it, mmm lets see;

formatting link
LOL, 2.2 kW, 140$, cannot match that!

formatting link

29 $

So, it seems building your own nuke is easy these days. ;-)

I just typed '3 phase variable frequency' in the ebay search window.

Reply to
Jan Panteltje

3-phase VFDs are stupidly cheap from China. Maybe a bit less chance than Europoon or US ones that they have a cyberterrorism virus pre-installed.
Reply to
Spehro Pefhany

Sounds feasible, assuming the amplifier isn't rolling off at 120Hz- if so the phases may not have the desired relationships. Not sure what you mean by "duty cycle" in this context. I suppose you could record hours of such waveforms on a computer, but it appears kind of wasteful compared to a few K bytes of lookup table. If you're intending to loop the waveform that might well have issues at the boundaries.

Usually the approach for controlling a 3-phase motor is to synthesize or play back the 3-phase sine waves on the fly using a DSP, DDS or microcontroller with a single quadrant lookup table.

You only really need a single quadrant (from 0 to Pi/2, say) lookup table, the rest can be done with pointers into that table runing forward in time, then backward in time, then repeating with the sign of the lookup element flipped for the last half of the sine.

Reply to
Spehro Pefhany

If you have enough CPU time available, you can use a DDS approach to synthesize the three sinewaves in the proper phase relationship, and adjust the RPM in arbitrarily-small amounts.

Rather than generating three sinewave tables (offset by 120 degrees), just generate one. Use three pointers into it, offset by 1/3 of the table size. Advance each pointer by the same amount during each cycle, wrapping around. The amount of advancement could be either an integer, or integer + fraction (the latter allows extremely small frequency adjustments).

What you'd be doing, with this approach, is constructing the final three-channel audio output buffer "on the fly". It would require a few adds (integer or integer+fraction), a fetch, and a store, for each of the three samples, for each sample set to be generated.

Even the lowest sample rate supported by your sound card (might be as low as 8000 samples/second) should give you plenty of resolution. Even a moderately fast microcontroller ought to be able to do this easily enough. A desktop PC wouldn't even begin to start thinking about considering maybe breaking a sweat.

Reply to
Dave Platt

Quite true, though you can be persecuted for exporting things without a licence even if the same thing is widely available in the place to which you export it.

The fact that a mediocre car stereo plus a CD of sine/cosine waves could be used to make the thing that is export-controlled exemplifies this exact problem. That is why I mentioned it. I don't actually think anyone anywhere has trouble obtaining this particular item. The rules don't have to make sense. It may even be deliberate that we are being trained to obey rules that obviously don't make sense.

Chris

Reply to
Chris Jones

If it's one of those cheap cdrom bldcs there may not be enough torque to sync to an arbitrary drive angle. You'll have to wire up those hall sensors, then.

Reply to
Johann Klammer

Oops! I didn't read the original post properly. The OP wants to generate

20Hz, that is perfectly fine and not export controlled at all, since it is less than 600Hz. Just make sure to type in the correct frequency value.

In this case what Dave Platt said is good advice though I don't know an off-the-shelf PC application that does it. There are several a PC programs that work as a signal generator but I don't know which ones are good and can do multi-phase output and on-the-fly adjustment of frequency.

If the main difficulty is just in finding a signal generator program that supports more than two channels, then this can be solved with some electronics: Put out sine and cosine waves with a 2-channel soundcard, and turn it into three phases using some op-amps with resistors chosen to sum the correct amount of the sine and cosine waves to make up three phases spaced 120 degrees apart.

Chris

Reply to
Chris Jones

200Hz, actually (the OP corrected it), but you're suggesting the premeditated export of something that's clearly capable of 600Hz, so.. and (though ignorance is not an excuse in this case) you are aware of the regulations..

Best regards, Spehro Pefhany

--
"it's the network..."                          "The Journey is the reward" 
speff@interlog.com             Info for manufacturers: http://www.trexon.com 
 Click to see the full signature
Reply to
Spehro Pefhany

On a sunny day (Wed, 18 Mar 2015 09:25:41 +1100) it happened Chris Jones wrote in :

Yes, but ANYTHING has dual usage, a hammer can be used to hit a nail or hit somebody on the head, a match to light a cigarette or burn down the White House. A candy to eat or have some kid choke on it. the list is endless.

You are getting buried in legislation written by morons for morons, and that is the end of your free (not as in beer) world. Leaves dummies and zombies. Next nuke war will clear out the dead wood. You will lose because by that time you have no clue what end of a gun to hold.

I mean, this IS a bit black and white put it, but that really IS the trend.

Reply to
Jan Panteltje

Or you can generate it on-the-fly by approximating a sine wave quadrant with a square function. I did that over 20 years ago for a system which needed to generate 100Hz down to 1mHz, and no-one noticed that the 'sine' function is a bit 'fatter' than it should be.

Cheers

--
Syd
Reply to
Syd Rumpo

Well I was not suggesting exporting the thing, but pointing out that depending on where you live, telling someone how to adjust the frequency (of a thing they already have) might be naughty unless you only tell them how to adjust it to a limited range of values. If somebody in another country already has their hifi amplifier hooked up to a signal generator program on their PC, that they can type any frequency into, and you specifically don't tell them how to type numbers higher than 600 into it, I have no reason to believe that you are not allowed to tell them how to type 20Hz into it (which is 1200RPM for a 2-pole motor).

If one were to write a piece of software for making a computer put multi-phase AC waveforms of arbitrary frequency out through a sound card, one might under some interpretations have a problem distributing it on the internet, if someone got it into their heads that the computer might be connected to a large-ish hifi amplifier and a motor. One could put a software limit in, (in the same way as there are velocity limits in the software of consumer GPS receivers) but for open source projects such limits are not likely to be all that effective for their intended purpose. Perhaps the software writer can (with equal futility) mandate the use of subwoofer amplifiers that don't work above 600Hz, or forbid people from using amplifiers that are rated for more than 40 Watts. I certainly forbid the use, (and even the contemplation) of audio amplifiers capable of more than 40 Watts, especially if it should happen to be my duty to do so. On the other hand I have no objections to collections of amplifiers having a power capability of up to 39 Watts.

A similar problem arises with PLL RF synthsizer chips: if the lock time is less than a certain value (the limit used to be 1ms, it has since been changed), then it is export controlled. If one wished to sell a PLL chip for use in synthesizers with a lock time of 1.5ms, and if one showed an application circuit that has a lock time of 1.5ms, it is foreseeable that someone might be able to acheive a different lock time using the same chip (though I won't say how!).

I also wonder whether all of these performance limits apply to rated performance or actual performance. Things like machine tool accuracy are what I was thinking about. What if one day on the lathe production line, everybody was having a really good day and they accidentally built a lathe that is more accurate than it is supposed to be, but nobody measured it carefully enough to tell that its actual performance would make it too good to be allowed to export. If its rated performance is not good enough to make it nominally subject to export controls, is it still illegal to export it even unknowingly? I strongly suspect that it is considered naughty to deliberately not measure it carefully enough to be able to determine that it is an accurate lathe, especially if you know that the customer might be hoping for this, but do you have to invest in extra-accurate characterisation equipment just so that one can prove that every unit isn't very good?

In the same way, would a logic gate manufacturer have to prove that their typical chips could not possibly achieve performance that would fall under 3A230? I wonder if some companies think that they can avoid extra complication by specifying an absolute maximum supply voltage of

5.5 Volts for their logic chips. (And for the record, I don't actually know of any logic chips that could simultaneously achieve both performance limits of 3A230, and I haven't tried to find any, and I don't have access to the equipment that would permit me to identify such a chip.)

Chris

Reply to
Chris Jones

I know the US has some truly absurd export restrictions, but this one reaches new heights. Does anyone really believe that there are "bad guys" capable of building or acquiring high speed centrifuges, can run them fine at 200 Hz, but are incapable of running them at 600 Hz because they can't generate a 600 Hz sine wave on a PC? We are talking about perhaps a half-dozen lines of Python code to make the wav files!

Reply to
David Brown

On a sunny day (Wed, 18 Mar 2015 14:38:48 +0100) it happened David Brown wrote in :

LET IT BE!

Other countries will be more than happy to sell the equipment. It was Siemens PLCs in the ultra-centrifuges in Iran. Siemens is a German company. US is just choking itself into a country of dummies.

Look at the F35, a demonstration of incompetence. Needs a Russian taxi to the ISS. Trying to copy the European health system. Even Israel walks all over it. I was watching some Malaysian aerospace exhibition pictures:

formatting link

China fighters..probably 10 for the price of 1 F35 plus a free car. :-)

Reply to
Jan Panteltje

Like so much of the administrative-law raj we currently suffer under, a lot of this stuff is intended to be enforced very selectively. Equality under the law is such a quaint idea.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

I suppose the rules here could exist merely as extra ammo for when the US authorities know someone has been supplying directly to Iranian centrifuges (or whatever). There are many such rules and laws that sound pointless at first, but are aimed at making it easier to prosecute people or companies which break other laws. So it might be a lot easier to charge a company for selling 600 Hz motor drivers than to prove that the drivers were knowingly sold to "bad guys".

My favourite in this line is the law some American states have requiring all terrorist organisations to be registered with the state authorities!

Reply to
David Brown

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.