project question

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

project question

Post by Rocken80s »

Hi New here and need help with a project. How do i do this?

I would like to create a proximity device which takes the sensor input voltage and converts
to audio in a simple low cost audio device. I have been able to make a visual output with no problem. I have been looking at the simple Trinket audio device. what I have learned is that this devise will put out a constant loop of recorded sound. However, I want a different sound for each voltage input. Please help. also, seems that the Winbond25Q80BV is no longer sold. Do you have a replacement? Thanks.
Last edited by Rocken80s on Thu Sep 10, 2015 5:50 pm, edited 3 times in total.

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: New- Need help

Post by adafruit_support_bill »

[Moved to General Project Help]
I don't know what a Winbond25Q80BV is, but from what you describe, one of the Fx Sound boards could work for your project
https://www.adafruit.com/product/2210

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: New- Need help

Post by Rocken80s »

The winbond 25q80bv is a serial flash memory (1 megabyte DIP)

www,adafruit.com/products/1564

discontinued, any other recommendation to replace this?

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: New- Need help

Post by Rocken80s »

The FX board you pointed out is getting there: https://www.adafruit.com/product/2210
However, the input or instead of manually pushing a button needs to come from a proximity voltage sensor. ex. .5 v input, adiuo output: "two feet", 1v. input, adiou out: "three feet"

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: New- Need help

Post by adafruit_support_bill »

The Fx can also be triggered by logic-level signals or a TTL serial interface from a microcontroller such as the Trinket.

We do not have a replacement for the W25Q80BV. Both Mouser and DigiKey carry a variety of serial Flash products.

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: New- Need help

Post by Rocken80s »

OK so getting there. The FX board can be triggered by the Trinket and the trinket can be hooked up to the sensor. So the question is the fx board has 11 different inputs, each one when triggered can play a different sound. So the Trinket would have to be wired to the fx board and for various voltage inputs would send out 11 signals. So example: .5v input to trinket, output on pin #1, 1v. input, output on pin #2. 1.5v input, output on pin#3. etc. Is this correct? I assume the trinket will have to be programmed from a Arduino Uno for example?

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: New- Need help

Post by adafruit_support_bill »

the fx board has 11 different inputs, each one when triggered can play a different sound.
It also has a serial port, so you can trigger as many different sounds as you like using just two pins:
https://learn.adafruit.com/adafruit-aud ... io-control

The Trinket can be programmed from a PC or a Mac.

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: New- Need help

Post by Rocken80s »

Im sorry, I am really stumped with this. If i have various voltages coming out of the proximity sensor, how does one send a signal through the serial port of the trinket to the sound board? The goal is example: if the output of sensor is .5v then this would trigger x wav file, if the output from sensor is .75v then this would trigger y wav file. In other words various voltage outputs need to trigger various .wav sound files. I have no idea how to write the code for this to program the Trinket controller to tell the sound board to play a particular wav file from a particular voltage output from the sensor. Obviously this is an "if then" situation. Can you please help? Is there any sample code that is written to do such a thing?

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: New- Need help

Post by adafruit_support_bill »

If i have various voltages coming out of the proximity sensor, how does one send a signal through the serial port of the trinket to the sound board?
The analog voltages are read with an analog pin on the Trinket. Then the Trinket sends serial commands to the Fx board. The demo sketch in the link above shows how to send serial commands to the Fx board.

If you go this route, I would suggest using the Pro Trinket since serial communication with that board is a little easier.

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: New- Need help

Post by Rocken80s »

Next question, If I wanted to blue tooth this audio to a set of blue tooth compatible headphones, what would i need for
equipment and programming? Is this something the Trinket pro can handle?.

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: project question

Post by Rocken80s »

what do I use for a blue tooth controller that links the two devices?

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: project question

Post by adafruit_support_bill »

We don't have any Blue Tooth audio products.

User avatar
Rocken80s
 
Posts: 9
Joined: Wed Sep 09, 2015 11:57 am

Re: project question

Post by Rocken80s »

Hi. two questions: 1. I was able to load sound files into the fx board that trigger when grounded. How can i raise the volume
into my ear buds with a dial or pot.? 2. I have a pro trinket that i am hooking up to this for serial triggering, I also have a voltage input sensor plugged into the trinket. Is there somewhere a written "sketch" that will allow me to trigger say pin#1 (wave) with "x" voltage, pin#2 with "y" voltage, pin #3 with "z" voltage etc.?

User avatar
adafruit_support_bill
 
Posts: 88144
Joined: Sat Feb 07, 2009 10:11 am

Re: project question

Post by adafruit_support_bill »

In GPIO Trigger mode, you can use the volume control pins: https://learn.adafruit.com/adafruit-aud ... igger-pins
In serial mode, you can control the volume via serial commands: https://learn.adafruit.com/adafruit-aud ... p-and-down

We don't have any example sketches, but it would be just a series of 'if' statements.

Code: Select all

input = analogRead(0);
if (input < 250)
{
    // do something
}
else if (input < 500)
{
    // do something else
}
else if (input < 750)
{
    // or something else
}
else
{
   // whatever
}

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”