PDA

View Full Version : a strange question



Dan Brown
20-12-2009, 11:41 AM
i know this is going to sound a bit daft but it is a serious question i'm afraid

can any of you think of a way of converting audio to g.code?

i was thinking about the LEDs you get on some sterios showing the volume of differant chanels from green up to red

now if i could find a way of translating that to stepper motors turning from 0 to around 190 degrees i could make a friend of mine very happy and i could even get a job out of it:naughty:

any thoughts would be apreciated

Dan

BillTodd
20-12-2009, 12:09 PM
You don't need to convert to g-code: All you'd need is a small mpu (like an AVR or a PIC) that will output appropriate pulses to a stepper/servo driver (actually it'd be possible to drive a small stepper with just a few transistors and a PIC)

If you are just trying to display volume like say a PPM or VU meter it would work, but most steppers will be too slow for a VU. A peak meter would be OK-ish I suppose.

What you really need is one (or more, lots more ;)) of my VFDs to make your meter.:joker:

YouTube- VFD

Dan Brown
20-12-2009, 12:10 PM
thanks for the input but i feel i'm suffering from de jar vooo

Dan Brown
20-12-2009, 12:11 PM
sorry billtod, my sarky comment was aimed at the standard mycncuk reply

BillTodd
20-12-2009, 12:14 PM
Try posting in the PIC or electronic sections of the forum. I think it's only the new member area that generate the auto answer message :)

Dan Brown
20-12-2009, 12:22 PM
i don't suppose you could elaborate on how i would rig that up could you? i'm realy dumb with electrics (the devils business if you ask me)

irving2008
20-12-2009, 12:28 PM
What exactly is your need? If I read you right, what you are asking is what virtually every car dashboard does today... the speedo and rev counters are stepper motors driving the nedle... It not hard to achieve...


If you dont mind I shall move this thread to the problems area...

Dan Brown
20-12-2009, 12:45 PM
Thanks for moving this post Iving,

I knew this was a silly question and its probly not even appropriate for this forum but as i'm in the early stages of getting all the stuff to build my own cnc machine i've got stepper motors on my mind, so when my friend who is organising a festival in portugal approched me about rigging up some sort of fire display the first thing that came to mind was gas torches controlled by stepper motors

i'm sure i could use mach3 to run some motors for some random affects but if i could get the steppers to move in time to the music i would be 'the man'

FatFreddie
20-12-2009, 01:12 PM
i'm sure i could use mach3 to run some motors for some random affects but if i could get the steppers to move in time to the music i would be 'the man'
Hi Dan,

I'm going to start off my conversion by running the steppers from an Arduino Duemilanove board which is a small processor with lots of IO and is easy to program. It has analog inputs which you could use to sample the sound and should directly drive a stepper controller from it's digital outputs.

They're programmed in C using a PC to compile and download the program which is then self sufficient. Big advantage is cost - £25 + whatever the analog circuits cost (probably not much more than a fiver) and simplicity (it's programmed via a USB cable which can also act as a serial link for basic debugging).

You will need to be able to program in C (or C++) though or find a tame programmer but there is a good support forum for it.

I should know more in a couple of weeks - I'm expecting a 3 axis System4 setup to arrive just in time for Christmas :-)

Mark

Dan Brown
20-12-2009, 02:50 PM
thanks Mark, that dos sound interesting although i've now idea about programming,

i really wish i could get my head around all this a bit better

irving2008
20-12-2009, 07:52 PM
Stepper motor controlled gas valves... hmm nice idea, and not hard to rig up... but i wouldnt use a stepper.. adds complexity... i would use a RC servo and generate a pulse width based on the average signal level at each frequency I want to sample. The only issue might be the reactiveness of the valves..would they be able to move fast enough?

What sort of fire display?

Dan Brown
20-12-2009, 10:26 PM
the valves shouldnt be a problem in regards to how stiff they are as i can have a second manual valve to shut of the system completly therefore the stepper/servo driven valve can be loosend as it dosen't need to be totally gas-tight as there will also be a constant pilot light that besides makeing sure everything ignights properly will also burn of any lost gas.

the only problem with useing servos instead of steppers is that since i realised it was possable for someone like me to build a cnc machine the learning curve has been fairly steep and this follows for ALL my current ways of making a living and i'm starting to get the feeling that maybe i was issued with a pretty small internal H.D

it seems for everything i learn i have to forget something else

so servos may be economical in one way but in brain space they are proberly more than i can afford:wink:

Dan Brown
21-12-2009, 12:02 AM
answering your question irving the display i have in mind is maybe six indapendant 10 foot (above the stage platform)poles (well away from the crowd obviously) on oposite sides of the stage area giving off varying size puffs of flame (the max being roughly no more than 1 foot in diamiter) in line with the treble, mid and base,
this would preferably be run from a standard analogue light control unit but if another option is more viable then so be it.

as for the type of valve i am thinking of useing something like a simple quarter turn water stopcock, hob taps are o.k but not enough flow unless i try and modefy in some way

irving2008
21-12-2009, 12:43 AM
the problem with an analogue light control unit is that its output is triac controlled AC, they are merely on/off switches. I suppose the gas control valve as used on a boiler could be utilised as that is solenoid driven, but i doubt they'd last very long.

I stil think a radio-control model servo would be a good bet for driving the stopcock and simpler to implement than a stepper motor control...

i think your first experiment is to obtain a suitable valve and find out just how much torque is required to operate it... then we could work out necessary accelerations etc and see what is the best driving technology. The rest, getting analogue signal, frequency splitting it, and converting to a control signal is a seperate issue and maybe an existing analogue light contol could be adapted.

(btw I designed and built an analogue light control chaser for a mobile disco I used to run in the 70's.. it was quite sophisticated for the time, with an 8-channel frequency analyser, each channel controlling either intensity or strobe rate, and a seperate beat follower channel.)

wires
21-12-2009, 12:46 PM
rc servos are great, they come in many varieties. brushed motor or brushless, plastic, metal or titanium gear. different reaction speeds and torque ratings. might sound a little complicated but its not really, its all just a price thing - more expensive servos tend to be stronger and quicker and to make them stronger they put in metal or titanium gears.

i could only see one potential problem with using rc servos. i can tell you from experience that a servo pushing against an imovable force will burn out its internal driver board. for example, if you had one attached to a valve and your control circuit was calling for the servo to open the valve. if your program was not calibrated right and was getting the servo to try and turn the valve passed open(assuming the valve has a stop) the servo wont last long, you can count on that.

if you go down this route you will need some sort of spring loaded coupler. if the valves are nice and loose then this is no biggie.

this is a typical rc 'servo saver'
http://www.rc-area.co.uk/blog/wp-content/uploads/2009/07/New-Edam-Spirit-Slide-Type-Servo-Saver.jpg
you will see in the pic two cams pressed together by a spring. the spring tension is adjustable. in your application i guess the servo would attach to the top,black, part(you can see a lever on the back of it) and then some linkage from the orange part to the handle on your valve.

there is a simpler design http://news.killerhurtz.co.uk/servo_saver.jpg but its hard to explain how it works. you have to see it in your hand.

if you got something like this in your design you would have no problems, except for programming the PIC. i might be able to help you out by getting some specs for controlling the servos. i can tell you now that they are three wire, most are max 6volts but work away quite happily at 5volts.
i cant remember if it is PCM or PWM they use. anyway, if you need info i might be able to help.

a decent rc servo will cost £80 -£100. really good ones even more. £40 - £80 will get something reasonable but stay away from anything cheaper unless you read good reviews about them.

btw, do you think there will be much lag between the valve opening and the flame shooting up in the air. if there will be some lag, like half a second or more then it might not look right. imagine a nice loud kick drum beat hitting you and half a second or more later the flame shoots up out of the stage. im just saying it might be something to consider.

wires
21-12-2009, 01:00 PM
just as an example here is the servo i use in most of my rc cars...
http://www.hitecrcd.com/servos/show?name=HS-7955TG

you will see speed and torque ratings have two values depending on input voltage. this servo is usually £60 - £70
there are other brands but hitec is just what i use, never had any problems with these servos.