Off-the-shelf randomizer?
Moderators: Sparky, Moderators
- MillenniumFalsehood
- Posts: 17033
- Joined: Tue Nov 16, 2004 5:23 pm
- Location: Wichita, KS, USA
- Contact:
Off-the-shelf randomizer?
I need a circuit that will randomly generate a pulse out of one of twenty possible outputs whenever I send an impulse into the input. This is for the sound board from the Personal Soundtrack T-shirt from ThinkGeek.com. I'm ripping that unit out of the shirt and putting it in a droid, and I want it to emit one of twenty different sounds every time I send a signal from my remote. It's only got seven channels, which is why I'm using a randomizer on the circuit. Anyone got any bright ideas?
If a redhead works at a bakery, does that make him a gingerbread man?
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Gotta go with an AVR microcontroller for this one. :) You could also use an Arduino if that's easier.
To do this with lesser circuitry... the easiest way would probably be to use a counter - just have it constantly cycling through its options and stop when you press the button - wherever it lands, that's what gets played. But for 20 outputs, and to interface the way you want (i.e. not play sounds until the cycling stops, etc.) you'd need a time source (i.e. 555 and resistors/caps), two or three decade counters (if it's 4017s, you lose an output when you chain multiple 4017's together, so to get 20 outputs you'd actually need three 4017s.) plus, possibly some additional logic to gate the outputs of those decade counters so they only go live when the timer stops...
You could do all that, build a circuit with upwards of $6 of parts and at least four ICs - or you could go the AVR route, spend $30 for an AVR programming interface and $5 for an AVR, write a little C code and let that one microcontroller run the whole show.
I am a big believer in microcontrollers. :)
So is that Personal Soundtrack sound board reprogrammable? That's pretty cool.
To do this with lesser circuitry... the easiest way would probably be to use a counter - just have it constantly cycling through its options and stop when you press the button - wherever it lands, that's what gets played. But for 20 outputs, and to interface the way you want (i.e. not play sounds until the cycling stops, etc.) you'd need a time source (i.e. 555 and resistors/caps), two or three decade counters (if it's 4017s, you lose an output when you chain multiple 4017's together, so to get 20 outputs you'd actually need three 4017s.) plus, possibly some additional logic to gate the outputs of those decade counters so they only go live when the timer stops...
You could do all that, build a circuit with upwards of $6 of parts and at least four ICs - or you could go the AVR route, spend $30 for an AVR programming interface and $5 for an AVR, write a little C code and let that one microcontroller run the whole show.
I am a big believer in microcontrollers. :)
So is that Personal Soundtrack sound board reprogrammable? That's pretty cool.
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
There are no rats.
The skulls eat them.
- MillenniumFalsehood
- Posts: 17033
- Joined: Tue Nov 16, 2004 5:23 pm
- Location: Wichita, KS, USA
- Contact:
Yep, completely reprogrammable. Just pop the SD card into your computer and rewrite the music or sound effects to whatever floats your boat. I'm getting a second one, when I get around to making the purchase, which I'm going to load up with Star Wars and Trek music. The Mutara Nebula one should come in handy when my sister comes around. R2-unit builders like it because of the reprogrammable feature and because it can interface with a 12-channel receiver and allow complete control over the sound effects and vocalizations.
I like the idea of microcontrollers, but I'm on a rather tight budget and would rather get some cheap ICs and hook them together to get the result I want than spend $$ on the interface necessary for a PIC. Plus, I suck at programming and would rather not have to deal with that headache. Unless you or someone would be willing to program it for me. Then I'd gladly take that route!
I like the idea of microcontrollers, but I'm on a rather tight budget and would rather get some cheap ICs and hook them together to get the result I want than spend $$ on the interface necessary for a PIC. Plus, I suck at programming and would rather not have to deal with that headache. Unless you or someone would be willing to program it for me. Then I'd gladly take that route!
If a redhead works at a bakery, does that make him a gingerbread man?
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
It really doesn't cost much: The $30 figure I quoted before was a guess... Sparkfun's USB-interface AVR programmer sells for $15. And then it's $5 or less per microcontroller...MillenniumFalsehood wrote: I like the idea of microcontrollers, but I'm on a rather tight budget and would rather get some cheap ICs and hook them together to get the result I want than spend $$ on the interface necessary for a PIC.
Well, that would be a problem... But for something like this, the program wouldn't be too complicated anyway. I think it's worth learning...Plus, I suck at programming and would rather not have to deal with that headache. Unless you or someone would be willing to program it for me. [-o< Then I'd gladly take that route! :D
Apart from using a micro, I think the cascading-4017 circuit would probably be easiest - and I guess you'd need a latchic-buffer off the 20 outputs to pick your sample from the counter on a button press... 7 ICs and miscellaneous parts to do the same job as one micro. :) But if you're building a droid, I guess you can afford to waste space...
---GEC (三面図流の初段)
There are no rats.
The skulls eat them.
There are no rats.
The skulls eat them.
- MillenniumFalsehood
- Posts: 17033
- Joined: Tue Nov 16, 2004 5:23 pm
- Location: Wichita, KS, USA
- Contact:
Hmm. I guess I could afford it, then. And at $5 a chip, it could pay for itself.
Like I said, I am not a good programmer (even with the professor helping me, I got a D in a class on 2D game programming), but I could try.
Like I said, I am not a good programmer (even with the professor helping me, I got a D in a class on 2D game programming), but I could try.
If a redhead works at a bakery, does that make him a gingerbread man?
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!
Ponies defeat a Star Trek villain? Give them a Star Wars award ceremony!