Need assistance with sound project

Status
Not open for further replies.

Solomin66

New member
Hello,

I am new to the world of Teensy (and Arduino), and I am going to purchase one this weekend along with any necessary accessories.

I have a project which is challenging for me as I have never worked with this device and I am hoping someone can steer me in the right direction.

I currently have a mechanical machine with coils. There are 4 buttons on the machine. When button number one is pressed, it activates coil # 1 by sending a 5 volt electrical current. The coil then expands and hits bell #1. The functionality is the same for the the remaining coils - button # 2 activates coil number and then bell # 2, and so forth.

I would like to replace the 4 coils and and bells with an arduino solution instead.

When a button is pressed, the unit would identify which button was activated, receive a 5 volt current and then play a custom sound (.wav file is sufficient) for a few seconds (probably 3 seconds) which would be unique for each button. So, button 1 would play sound clip 1, button 2 sound clip 2, etc.

I hope that something as I explained can be put together and work. I am not certain what components are required for such a project and how difficult it would be to put together something like this.

This little project does not seem too complicated. I imagine that I would need an amplifier, speaker, some sort of sound control, and storage card.

My goal is to have something working by April 30.

Any guidance would be greatly appreciated.

Thanks in advance.

Solomin
 
If you've never used audio on Teensy before, this tutorial is the place to start.

https://www.pjrc.com/store/audio_tutorial_kit.html

Part 2-3 of the tutorial, starting on page 14 in the PDF (or 12:02 in the walkthrough video) is pretty close to what you need. If you're going to put the samples right into Teensy's flash memory, you might consider getting Teensy 3.6, since it has more flash memory to allow you to hold longer samples (or higher quality samples).
 
I do not mind purchasing additional storage. The additional storage would provide more flexibility.

How does one power this configuration? I do not have the luxury of a USB port to provide power. However, I might be able to piggy back power off of one of the mechanical component's existing power lines. How many volts are required?

Does the tutorial also include option for storage, say an SD card?


The tutorial audio kit says it is ready made and comes with Teensy 3.2. How does one get them to do the same thing with teensy 3.6?

I am not certain which components need to be purchased.



Also, I do not need the push buttons. Basically a ball will randomly hit a relay (existing button) which will send and electrical current to the teensy leading to sound clip (which I would like to be customizable).

Thanks!

Solomin
 
Generally 5V power is used. The allowed range is 3.6V to 6V.

Yes, the tutorial covers SD cards. Maybe look through the PDF or watch some of the video where Alysia & I demo the whole thing in 45 minutes.

On what to buy, you have some choices and trade-offs. If you're well funded, getting the $60 tutorial hardware is the path of least resistance. If you already have a breadboard, pushbuttons & pots, and you're good with soldering, you can probably get much less.

For your final project, ff you don't need really high quality, you might be able to use the DAC pin and something like amplified computer speakers. But the tutorials are all built around the audio shield. So if you go without the shield, you're going to have to read carefully and try to adapt the tutorials. It's kind of a chicken-and-egg problem... once you learn how the design tool and the system works, it's pretty easy to edit designs to use different outputs. If you try to do that as you're learning, it's certainly possible if you're the type of person who can learn by reading and do some experimentation. But following the tutorial and using the already-built tutorial hardware is by far the easiest path, just not the cheapest.

On the hardware side, unless I've misunderstood (which is quite possible - you gave only a brief and imprecise description) the hardware you've described seems like it'll appear as just 4 ordinary monentary contact switches, as far as Teensy is concerned. So while you won't be using pushbuttons, as far as the code and design on the Teensy side is concerned, it'll probably be the same as pushbuttons. Maybe you'll increase the debounce time if that hardware has a lot of mechanical chatter, but that's just a matter of editing a number in the code.
 
Status
Not open for further replies.
Back
Top