LaserBoy

Software => Laser Software => Hinged Newt => Topic started by: James on August 23, 2009, 06:24:37 pm

Title: James' sound card TTL idea
Post by: James on August 23, 2009, 06:24:37 pm
I'm not suggesting subdivisions. I'm just putting things into catagories so we might come up with more stuff.

Also, if you're clocking out TTL at 48KHz, you can easily use that to control a stepper motor. It takes one bit, if the motor always goes the same direction, two bits if you need to reverse it.

James.  :)
Title: James' sound card TTL idea
Post by: Fanny Pack on August 23, 2009, 06:32:33 pm
It won't be sent out anywhere near 48KHz.  More like 30Hz or around whatever the frame rate is.  Just fast enough to turn stuff on and off in sync with the show.
Title: James' sound card TTL idea
Post by: James on August 23, 2009, 06:43:13 pm
Says you!  ;D

If I'm going to work this into LaserBoy, it will be in the LSBs of the waves.

Or I could just dedicate all 16 bits of the aux channel to the USB board.

Obviously this would require my own player application, hence the need to talk to the sound card directly.

At 48KHz, you could make a pulse wave of 255 samples long that would very smoothly dim large arrays of LEDs ~ just one bit per color. You'd be hitting the LEDs at a minimum of 188 times per second. I think that's more than fast enough.

Pretty cool!  ;D

Now you can wash and fade R, G, B and V over the whole screen while you draw on it with laser in complimentary colors!

James.  :)
Title: James' sound card TTL idea
Post by: Fanny Pack on August 23, 2009, 07:34:09 pm
:)  I don't think your idea would work.  But feel free to explain how you think it might.
Title: James' sound card TTL idea
Post by: James on August 23, 2009, 07:43:07 pm
It a matter of energy over time.

If you have one bit that you can set high or low at 48KHz, then you can make a pulse wave that is 255 samples long. That's about 188Hz. The number of bits you set high within that 255 sample window will determine how much energy gets to the LEDs ~ from 0 to 255.

You can also use this to control the speed of a DC motor.

It's plain-old PWM.

How would you like a 3 mirror DC motor abstract generator you could control digitally?  ;D

~ With synchronized color mod!  :o

James.  :)
Title: James' sound card TTL idea
Post by: Fanny Pack on August 23, 2009, 08:33:49 pm
Interesting.  I thought you were saying something else.  Your solution is going to cost more, though.
Title: James' sound card TTL idea
Post by: James on August 23, 2009, 09:13:55 pm
How so?

James.  :)
Title: Re: James' sound card TTL idea
Post by: Fanny Pack on August 23, 2009, 09:45:40 pm
Just seems like it.  Cost of ownership more than anything I guess.  Not saying it won't work but you're getting less than you would if you just bought the $29 USB DIO thingy and interfaced to it.
Title: Re: James' sound card TTL idea
Post by: drlava on August 23, 2009, 11:57:53 pm
Int-erest ing thread title :)

did you know that the controller chip has ttl control built in on a separate pin? it's something I've been wanting to build into the driver when time allows.
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 02:47:24 am
Just seems like it.  Cost of ownership more than anything I guess.  Not saying it won't work but you're getting less than you would if you just bought the $29 USB DIO thingy and interfaced to it.

Huh?

I thought we were talking about how to use that $29 USB DIO thingy!

I'm just thinking with my fingers!

You know me. I'm crazy for waves!

I'm just trying to imagine how I would store and play back the information that flips those switches.

James.  :)
Title: Re: James' sound card TTL idea
Post by: Fanny Pack on August 24, 2009, 07:04:31 am
I thought you were talking about using one of the sound cards channels and swinging the signal between max and min to simulate a TTL output and then decoding every 255 signals into a byte.  But, I guess that wouldn't even work because you wouldn't be able to tell when 255 signals came through if 2 or more in a row were high or low. Unless you clocked it of course.  But that would require even smarter hardware.  You can't write to the USB device but so fast.  Definitely not at 48Khz so if you were thinking of doing that it won't work.  So, I have no idea what you were talking about I guess.
Title: Re: James' sound card TTL idea
Post by: Fanny Pack on August 24, 2009, 07:06:30 am
Int-erest ing thread title :)

did you know that the controller chip has ttl control built in on a separate pin? it's something I've been wanting to build into the driver when time allows.

Are you talking about the CM106 chip?  If so, what kind of TTL?  How many lines? That would be cool if you could get a few TTL lines out to control things.
Title: Re: James' sound card TTL idea
Post by: BlinkenLights on August 24, 2009, 03:22:55 pm
(http://i.pbase.com/o4/98/583898/1/63713938.qaEEdjG9.popcorn.gif)
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 03:38:42 pm
Let me explain a "bit" more...

As you know, my preferred medium of storage is wave. This is because it can be ready to go. All you need to do is play it. But, I've also put some thought into embedding information into the wave so that it can be decomposed back into the original vector art from whence it came. The cool thing about that is that this extra information has no effect on normal, generic playback.

Along those same lines...

We now have a device that can externalize a 16 bit number, in the form of TTL levels on a set of contacts. We can use these TTL signals to switch high speed, high current FETs.

So.....

It would be possible to use the LSBs of the waves or the entire aux channel as perfectly time synchronized data that flips those switches.

{X, Y, r, g, b, aux, L-audio, R-audio}

It would require a custom written wave player that would know how to read the wave, split off the information that goes to the USB switch and send the rest of the filtered wave on to the sound card.

But, if the wave was just played from any-old wave player, it would still work. You just wouldn't get any USB switch information. And you'd have some really noisy crap in the aux channel, which is not in use anyway.

Just one channel of wave is all 16 (independant) bits clocked out at 48KHz, ready to tickle that USB thingy.

Each bit can either be thought of as a simple switch or a PWM control signal.

James.  :)
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 04:12:39 pm
Int-erest ing thread title :)

did you know that the controller chip has ttl control built in on a separate pin? it's something I've been wanting to build into the driver when time allows.

Can you tell us more about this?

Dude! You need an avatar!  ;D

I can't find you when I'm looking for posts!  O0

James.  :)
Title: Re: James' sound card TTL idea
Post by: Lazerjock on August 24, 2009, 04:29:45 pm
He had one what happened to it?
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 04:56:35 pm
The really tricky part of doing this clocked out wave thing would be synchronizing the sound card DAC and the USB thingy down to the sample.

I think you'd either have to merge the two device drivers into one (easily done in Linux) or use a separate execution thread to clock the stuff to the USB thing while the sound card driver was emptying out its buffer.

Hmmmmm.

It would be awesome if you could get the sound card DAC clock on an address inside your own code!

James.  :)
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 08:52:42 pm
Been thinking about this idea some more and it seems like the best possible way to use this kind of "raw digital signal" trick would be from the 8 channel sound card itself.

If it was possible to make the bits of all 8 channels latch as TTL levels onto a cooresponding set of pins (8 X 16 pins == 128 bits per sample) every 48 thousandth of a second...

You could do whatever you wanted to do with those values ~ no special driver or wave player needed (or USB thingy)!

What do you think drlava?

James.  :)
Title: Re: James' sound card TTL idea
Post by: drlava on August 24, 2009, 09:40:08 pm
The CM106 and 6206 have at least one digital I/O port but I was going to purpose that for a shutter.  Other than that, the simple USB PIc device would probably be best.  I was thinking a while ago that a channel and an input on the sound card could be used to get DMX I/O but for just TTL it seems overkill.
Title: Re: James' sound card TTL idea
Post by: James on August 24, 2009, 09:46:05 pm
I want 16 bits of TTL from one channel!

James.  :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal