Hot answers tagged

6

You can interface arduino to telephone line using MT8870D chip. This IC can decode DTMF tones. Below is a reference schematic from the datasheet. Another popular design floating on the internet is below: There are pre-build modules available from futurelec : You can use Holtek HT9200 IC to encode DTMF that can be interfaced with Arduino. Below is the ...


6

For the AtMega328's ADC the datasheet says • Up to 76.9kSPS (Up to 15kSPS at Maximum Resolution) So, sampling two channels at 10bit resolution and 44.1kHz is not possible. If 8bit resolution is enough, and if there's only one channel to sample, it should be able to do the job. Edit: To answer Connor's comment: Of course, this does only apply when ...


5

A lot of 3.5mm jacks come with built-in normally-closed contacts, and their state can be tested through the pins of the jack with a multimeter or sensed by your MCU like any other switch. There are usually 2 pins each for the ring (pins 2 and 4 below) and the tip (pins 3 and 5), each pair connected to the other and one pin for the sleeve. The insertion of ...


5

A simple SPI SRAM chip. Available up to 128KB, such as the 23LC1024: http://www.microchip.com/wwwproducts/en/23LC1024


5

Bluetooth supports multiple protocols for multiple purposes. There is low latency low quality monorail bi-directional communication with a little bit of bandwidth for control for Bluetooth phone calls. This is called HFE Bluetooth protocol. If you are interfacing a keyboard or a mouse you would use the Human Interface Device protocol or HID. If you ...


5

You calculation of the data rate is wrong: Serial.println() adds CRLF (i.e. "\r\n") to terminate the line, That's 2 bytes, not one. Each byte is sent by the serial port as one start bit, followed by 8 data bits, followed by one stop bit. That's 10 bits in terms of timing. In the worst case scenario (value ≥ 1000), you are sending 6 bytes, or 60 ...


5

Not really an applause detector, but I have written a sound meter program you could use as a starting point for your own project. It is available here: Arduino sound meter. It works as follows: the analog input is read at a constant rate of about 9600 samples per second, which is normally fine for telephone quality audio processing the DC offset from the ...


5

Your amplifier arrangement is fundamentally flawed. At the moment you are "tickling" the top end of the electromagnet in the speaker - that is, you are energising it when the Arduino outputs a HIGH, and leaving it energised to de-energise by itself when the Arduino outputs a LOW. Coupled with that the fact that a PCM file outputs PWM with a carrier ...


4

Mike's answer uses a Fibonacci Linear Feedback Shift Register configuration, but the compactness Galois Linear Feedback Shift Register Configuration could be faster: #define speakerPin 8 unsigned long lastClick; void setup() { // put your setup code here, to run once: pinMode(speakerPin,OUTPUT); lastClick = micros(); } /* initialize with any ...


4

I don't know that you need all that - just an Arduino and a piezo speaker and a pot if you want to play with the volume. void generateNoise(){ unsigned long int newr; unsigned char lobit; unsigned char b31, b29, b25, b24; b31 = (reg & (1L << 31)) >> 31; b29 = (reg & (1L << 29)) >> 29; b25 = (reg & (...


4

If all you need is to play back lo-fi audio then any with PWM will do, which means that any Arduino will do. If you want hi-fi sound then you'll need a DAC, which means either choosing the Due or using a discrete DAC via SPI. If you need decoding of complex audio formats such as MP3 or Vorbis then you'll need either the Due for its power, or a separate audio ...


4

The equation to calculate it is given in the first article you linked: The 2MHz value comes from the factor of 8 prescale on the 16MHz clock and 256 is the size of the lookup table specified by your LENGTH define. If you start from a frequency you want to synthesize, just use the above equation to solve for the necessary value of OCR2A. Note that since you ...


4

This project connects the headphones directly to a digital pin. Here is the schematic: I would, however, be more cautious and add a limiting resistor. The output of an Arduino pin should be limited to 20mA as stated here. So, using V=I*R 5 = 0.02 * R R = 5 / 0.02 R = 250ohms So I would add a ~250ohm resistor in series with the head ...


4

One sample takes 38 I2C clock cycles to write. That's: 1 START 7 Address 1 R/W 1 ACK 8 Byte 1 ACK 8 Byte 1 ACK 8 Byte 1 ACK 1 STOP At the default 100kHz clock speed that's 100,000/38 = 2631.58 samples per second absolute maximum. You can increase the clock speed to 400kHz, which would allow you 400,000 / 38 = 10526 samples per second absolute maximum. ...


4

The short answer would be "yes, it is possible". There are lots of gadgets around that record MIDI. They would have microprocessors in them, and they would have something like an SD card, which itself is like EEPROM in concept. You may possibly have problems with storing the notes in RAM, and then writing them to the SD card fast enough not to lose some. ...


3

This is now 5 months later - but I recently had the same problem. Because the TMRpcm library plays through pulse width modulation, make sure your speakers are hooked up to a PWM capable pin. That caused me no end of headaches trying to figure out.


3

The replacement microphone you link to contains all the circuitry in that instructable*. You can do away with the op-amp and all the associated stuff, and just connect it direct to the analog input of the Arduino. *Actually it's better circuitry since they do it right, unlike the Destructable that is a rubbish circuit.


3

In theory, the peak signal accepted from your amplifier should be 0.894V p2p if you want to rescpect the common -10dB signal strength/level. I don't know why you would want to have a 5V to 2.5V "voltage divider" in the first place, but in any case if you use that you already limit the current probably enough, it all depends on the resistor values used. ...


3

After doing some reading here Serial.begin(): Why not always use 28800? and looking at the manual for the 168. You should be able to achieve the baud rate you want by directly programming the USAR. According to the answer there you should be able to use miniterm to keep up with a high baud rate. As stated there you might run into problems with computer ...


3

Well, a sort of... You can stream 64kbps MP3, get it via wifi from esp8266. Then for all the rest, forget the Arduino. You need a dedicated MP3 decoder chip (many out there, sta013 was one of the oldest beasts) which can take the digital mp3 stream and convert it to analog output. You can feed the line level analog output to the FM Transmitter, and then ...


3

On my page about the ADC converter I attempted to record a 4 kHz sine wave on the ATmega328P with the following code: const byte adcPin = 0; // A0 const int MAX_RESULTS = 256; volatile int results [MAX_RESULTS]; volatile int resultNumber; // ADC complete ISR ISR (ADC_vect) { if (resultNumber >= MAX_RESULTS) ADCSRA = 0; // turn off ADC else ...


3

An FRAM chip? Non-volatile (though you don't need that) SPI or I^2C available on a breakout board from Adafruit Or roll you own from a bare chip, if you're handy with Surface Mount Devices.


3

Depending on how loud your audio signal is, you may be able to do it with just one capacitor and two resistors: If your signal is quite quiet, though, you may need to amplify it using an op-amp. For instance: That arrangement would double the volume of the audio. It also has the effect of inverting it, so you will need to invert your readings in software. ...


3

If you want fine control over the phases, I assume you may also care about having low phase noise. In this case your best bet is to avoid toggling the pins in software and go for a hardware signal generation. With an Arduino Uno or similar board, this can probably achieved by programming a timer. I would try the following: Configure Timer 1 in ...


3

Yes, read the MIDI file format specification. Create a single track midi file and append just note press / release commands / pitch or volume changes and delta times (reverse conversion of delta times to milliseconds is explained here). When you finish recording, just seek to the beginning of the file and update the track length value (total size of the ...


3

One would think that single channel for voice would be enough. Remember the old Sprint commercials? "So quiet you can hear a pin drop", that was only single channel. 12 bits at 16 MHz for max 8 KHz bandwidth would be good. Per Wikipedia "In telephony, the usable voice frequency band ranges from approximately 300 Hz to 3400 Hz. It is for this reason that ...


3

If you are only interested in getting a reading of the sound intensity, then 8 kHz may be enough. You can also convert the signal to mono using a pair of resistors. If you want the Arduino to do other stuff while taking the analog readings, then you should forego analogRead() and access the ADC directly. This is more involved that typical Arduino ...


2

It's probably not damaged, but you shouldn't do it again. To get the 5V signal down to 400mV you need to create a voltage divider. As such you will need a: 5V / (400mV / 20kohm) − 20kohm = 230kohm resistor between the pin and the input. 220kohm should be close enough.


2

LUFA is used for the USB to serial firmware on the separate USB-serial bridge AVR found on Uno and newer Megas. The firmware is compiled using a supplied makefile. Otherwise LUFA isn't used by Arduino. But LUFA is probably the right choice if you want to make a USB audio device. It comes with examples of both input and output audio devices. But you will ...


2

Regular sound files will have an even amount of time spend energizing the coil positive and negative, so the motor will not spin around in the normal sense. With a strong enough amplifier it will produce the sounds in the file like a speaker, but it will not noticeably turn. Actual PWM varies the percentage of the time the signal is HIGH in a fixed ...


Only top voted, non community-wiki answers of a minimum length are eligible