Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Audio / Re: Lightning Detection on: July 08, 2014, 12:10:59 am
there are ICs that do this job, and are pretty good (more sensitive than your eyes or ears at detection):
2  Using Arduino / Audio / Re: Can't use FHT library on: May 04, 2014, 04:55:30 pm
there have a been a lot of people unable to properly install the FHT library lately, and i dont know what is causing it.  so any input from more experienced people would be very helpful.

the reason for the wiered output data is because the code is optimized for use with PD, so the output is a serial.write, rather than a serial.println (the latter does ascii readable text, the other is just raw data).
3  Using Arduino / Audio / Re: how to record an analog signal with arduino and send it to matlab. on: May 04, 2014, 04:52:09 pm
its been a while since i used matlab, but you used to just be able to use the soundcard to both take in audio, and output audio, directly from matlab.
4  Using Arduino / Audio / Re: Can't use FHT library on: May 01, 2014, 03:23:45 pm
did you unzip the library files and place them in your library folder manually?  if not, give that a try.  there have been some problems with the library import.  it sounds like its finding the library, but none of the files in the library.
5  Using Arduino / Audio / Re: arduino FHT on: April 11, 2014, 11:08:50 pm
using the above method (sequential sampling of ADCs) will give the same sample rate, and 1/3 the update rate (as compared to doing a single ADC).  so the frequency resolution will be the same as if you did only 1 ADC, but you only get that information every 3rd time.
6  Using Arduino / Audio / Re: arduino FHT on: April 10, 2014, 09:33:41 pm
the rate at which it samples is set by ADCSRA.  with ADCSRA = 0xf5 the sample rate is 38ksps, ADCSRA = 0xf6 gives 19ksps, and ADCSRA = 0xf7 gives 9.5ksps.  to go to lower sample rates you will need to setup a timer to trigger the ADC.  using delays is not reccomended as it isnt consistent, although that may not matter too much for your application.  be sure to uncomment the cli() if you want to use delay().
7  Using Arduino / Audio / Re: arduino FHT on: April 10, 2014, 08:38:52 am
you need to switch between the various ADC inputs in the loop().  also, you should turn off all DIDR0 that you will be using.  if you are sampling 3 ADCs, you can either interleave them, which gives you 1/3rd the sample rate, or you can do them sequentially, which gives you the full sample rate.  the example below shows the latter.  the advantage to doing it this way, is that you dont run out of memory.

#define LOG_OUT 1 // use the log output function
#define FHT_N 256 // set to 256 point fht

#include <FHT.h> // include the library

void setup() {
  Serial.begin(115200); // use the serial port
  TIMSK0 = 0; // turn off timer0 for lower jitter
  ADCSRA = 0xe5; // set the adc to free running mode
  ADMUX = 0x40; // use adc0
  DIDR0 = 0x07; // turn off the digital input for adc0,1,2

void loop() {
  for (byte n = 0; n < 3; n++) { // go through the first 3 ADCs
    ADMUX = 0x40 | n; // set mux to the current ADC
    cli();  // UDRE interrupt slows this way down on arduino1.0
    for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
      while(!(ADCSRA & 0x10)); // wait for adc to be ready
      ADCSRA = 0xf5; // restart adc
      byte m = ADCL; // fetch adc data
      byte j = ADCH;
      int k = (j << 8) | m; // form into an int
      k -= 0x0200; // form into a signed int
      k <<= 6; // form into a 16b signed int
      fht_input[i] = k; // put real data into bins
    fht_window(); // window the data for better frequency response
    fht_reorder(); // reorder the data before doing the fht
    fht_run(); // process the data in the fht
    fht_mag_log(); // take the output of the fht
    Serial.write(255); // send a start byte
    Serial.write(fht_log_out, FHT_N/2); // send out the data
8  Using Arduino / Project Guidance / Re: digital low-pass filtering and fft for accelerometer data on: February 09, 2014, 01:49:57 pm
the output is in binary, not ascii characters, which is why it looks like gibberish.  you can change serial.write to serial.print and it should be readable, although you might have to go through and output each number, one at a time, rather than the batch operation shown.

you should also take a look at the equations for calculating the number of bands, band width, and sampling rate.

finally, the FHT on that site is a lower overhead program that does the same thing
9  Community / Products and Services / Arduino compatible audio DSP platform on: November 19, 2013, 06:12:47 pm
we are selling out the last of our MICrODEC's at below cost.  it is an arduino compatible (atmega3250p) platform for doing audio processing.  it has a stereo, 16b, 44ksps codec, and 6 seconds of sample memory.  there is also a case, while they last.

some soldering is required, and you will also need an FTDI cable to program it.  there is a very basic library written for it, but it is geared more at advanced arduino users.  we have a few of these left in stock, and are looking to get them out to good homes.
10  Using Arduino / Audio / Re: Arduino Realtime Audio Processing on: October 28, 2013, 03:50:43 pm
that sounds pretty good.  if you want a reference design for aliasing filters, here is one that works pretty well.

there is a sound sample on there as well, so you can see if it will be any improvement over what you have.
11  Using Arduino / Audio / Re: TL082 preamp: help please! on: October 26, 2013, 02:10:27 pm
RE: rail to rail - opamps are all a little different from one another, and none of the behave exactly like an "ideal" opamp.  and there are a number of different ways in which they stray from this "ideal" behaviour.  one of these has to do with how close a signal can get to the powersupply, both for signals being applied to the input pins, and the signal coming out of the output.  the TL082 is pretty bad about this, it can only get within ~3V of the output rail, on both the bottom and top rail.  The LM358 is better, it can accept inputs all the way down to the bottom rail, and apply outputs all the way down to the bottom rail, but can only go as high as (Vcc - 2V) at the input and (Vcc - 1V) output.  so if you were to run it off 0V and 5V rails, you could only get an output swing of 0V to 4V.  so its almost rail-to-rail, but not quite.

i usually like to reccomend the TLV2372 for generic rail-to-rail circuits.  its a little more expensive, and not available at the corner electronics store, but acts more like an "ideal" opamp.  the MCP602 is a good opamp as well, but it can not accept inputs all the way to the positive rail.  the MCP6002 is also a good choice, as it is very inexpensive and has full rail-to-rail inputs and outputs (RRIO), but i only hesitate to reccomend them because they run off 6V max.  so if you want to do a 9V battery circuit at somepoint and not use a voltage regulator, it will fry the amplifier.  so i generally keep a stash of TL082's and TLV2372's, and use the latter when i need rail to rail.
12  Using Arduino / Audio / Re: TL082 preamp: help please! on: October 25, 2013, 01:48:11 pm
the lm358 isnt quite rail to rail, but will be close enough to get you started.  i would definitely reccomend starting from scratch with the lm358 and an inverting amplifier.  its good to understand what you have done, but you might find it easier to get there if you take smaller steps along the way.  if you look a the circuit for the AC inverting amplifier on this page

you can just make R1, R3, and R4 10k, R2 100k, and C 1uF, and run everything off 5V.
13  Using Arduino / Audio / Re: TL082 preamp: help please! on: October 24, 2013, 05:31:24 pm
you shouldnt need an oscilloscope to make a preamp.  it helps, but is not neccessary.

do you have a drawing or picture of what you have currently built?  how are you making +/-6V from the 12V?

the only advantage of the inverting amplifier is that it is easier to bias / requires less components/
14  Using Arduino / Audio / Re: TL082 preamp: help please! on: October 16, 2013, 06:26:53 pm
biasing always confused me when i was first getting started.  im working on an online tool to help out with this:

it may or may not work, making webpages is not really my thing.  actually, using computers must not be my thing, considering i can no longer view much of anything on this webiste since they updated it.

basically, you take 2 equal value resistors, and connect one to 5V, the other to ground, and the juncture between them goes to the positive input of your amplifier.  the TL082 needs about 3V of headroom, so the +Vcc pin (postive powersupply) wil need more than 8V, and the -Vee pin (negative power supply) will need at least -3V.  otherwise they make different opamps that can go all the way to the rails, so you can just use +5V and ground as your supplies.
15  Using Arduino / Audio / Re: Problem using op-amp in audio system on: September 29, 2013, 01:53:15 am
the ts922 is a rail-to-rail opamp, whereas the tl072 is not.  this means that the tl072 can not amplify signals that get too close to ground or the powersupply rail, either at the input or the output (which happens in this circuit).   the ts922 also has a higher max output current.
Pages: [1] 2 3 ... 7