Posts with «arduino» label

Voice Pitch Shifting – Scrambler.

After I’ve made astonishing breakthrough in speed of the FFT algorithm based on RADIX-4 version, I decided to create a new project, which would take a full advantage of Radix-4 “rocket science” performance. Reviewing my “Voice Recognition” blog it looks logically to create just exactly opposite application – Voice Scrambler. To make it happened, I need FFT subroutine to be completed twice, in forward and reverse ( iFFT ) direction. Than simply manipulating individual frequencies (bins) position in the array, I could scramble a voice in well known old fashioned manner, inverting the spectrum of the human voice, making it sounds completely non intelligible (alien’s voice).  For Pitch Shifting, bins have to be “progressively” spaced between each other, driving timbre up on the scale. It is possible to lower a Pitch as well, shrinking and over-lap bins, but I made only up shifting part for now.

Making preliminary calculation, I get:   10.1 milliseconds x 2 / 256 samples = 78.9 microseconds / sample.  Or turning up side down,  12.67 kHz sampling frequency. It’s rough estimation, but regular “public phone quality” – 8 kHz sampling rate looks quite achievable.  Next, as always, if CPU is o’k, let check into memory management. Unfortunately, arduino Uno (2 kB) wouldn’t allow to use fft-256, because:  input buffer (256) + output (256) +  fft processing ( real + imaginary) (512), plus multiply by 2 (integer size, 1024 x 2 = 2048) would occupy all available 2 kB. So, I have to decrease fft size on one level down, to fft-128, or even two level down – make fft-64, from original fft-256 (presumably good quality, comparable with MP3 codec).  After completing a couple sketchy tests, fft-64 shows pure quality of speech and was rejected. Can’t say I did thoroughful  research on this matter, may be fft-64 could still be good in other circumstances or with musical material content instead of speech.

O’k, fft-128 – compromise version was selected by God. But my code, published in “RADIX-4″ blog hasn’t included RADIX-8 section, which is required when size of the array isn’t a power of 4. Nothing to do, the only way to bring  Scrambler project to life, is  to write a missing section of the RADIX-8 code… So I did. Timing measurements show, that Radix-4 with new patch is running even faster, than extrapolated from fft-256 down to fft-128 speed of RADIX-4 without it, measurements result: 4.2 milliseconds (compare to extrapolated 4.6 milliseconds). By the way, as I mention in other post about Split-Radix, if it would be my next adventure. It was, I have re-written from “Matters Computational” http://www.jjj.de/  Split-Radix C/C++ code in my tools-box now, which is to my surprise shows practically no difference in speed with Radix-4 algorithm, same  10.1 (fft-256) milliseconds execution time, and loosing ! competition giving 4.6 milliseconds (fft-128).

 
Other things to explain, as Pitch Shifting considered to be most complicated task even for monstrous DSP processors, I’ve skipped two important procedures: windowing on input samples and add-overlap on the output flow, just because no processor’s time left. Luckily, due speech’s spectrum concentration around most noticeable “middle” area, cutting off “windowing” is only slightly increases noise level. On the other hand, missing add-overlap procedure has greater negative impact on the voice quality,  ”robotize” it via parasitic amplitude modulation. When frequency bins re-mapped in the pull, running inverse iFFT doesn’t produce continuity  ”match” with previous block as it should, because input has no a continuity disruption between samples blocks (128 samples, ~16 milliseconds of voice frame).  Well, if I do everything right, there wouldn’t be any fun with arduino, would it be?  Btw, there are two outputs buffer in the software, especially to track this issue. I was thinking to implement some kind of distortion estimator based on this information. Meanwhile, one of them could be removed to save some memory for other part of the program.

Hardware.

Arduino has 10 bits ADC, this is why I decided to build a DAC for audio output based on PWM TIMER0 feature, 5 to 5 bits split equally between pin 5 and 6. One PWM pin could only play 7 bits sound (don’t forget sign bit), which is too low. Weighted 32R-R ladder potentially allows to increase PWM frequency up to 250 kHz or so, and simplify requirements for output filter design. Nevertheless, I left “default” 31 kHz settings for TIMER0, just in case I need more research with 16 bits output later on, All it would takes to switch on “full” 16 bits, just add one 256 k resistor and divide integer in  high and low byte.

Please, be advised, that included scrambler function was not fully tested, as I don’t have second arduino to do a decoding in real time-);  (Probably, I can record a scrambled sound and decode it in the second passage trough the system – things TO DO.)  The same time Pitch Shifting was successfully tested, as you can see in posted video clip. YouTube Video

Summary:

  • Sampling rate 8 kHz. (easily to adjust by TIMER2 variable.)
  • Output rate 8 kHz. (same as sampling, two processes are synchronous.)
  • Delay 16 milliseconds. (1 block, or two blocks 32 milliseconds.)
  • Input/Output resolution: 10 bits.

There are build-in command line interface:

  • if (incomingByte == ‘m’) { // FREE MEMORY BYTES
  • if (incomingByte == ‘x’) { // PRINT OUT INCOMING SAMPLING BUFFER
  • if (incomingByte == ‘s’) { // SWITCHES – SCRAMBLING ON / OFF
  • if (incomingByte == ‘y’) { // PRINT OUT OUTGOING  BUFFER
  • if (incomingByte == ‘f’) { // DATA AFTER FFT, FREQUENCIES BINS
  • if (incomingByte == ‘p’) { // DATA AFTER PITCH SHIFTING – SCRAMBLING
  • if ((incomingByte >= ’0′) && (incomingByte <= ’9′)) { // DIGITS  ”1″ to “9″ – REGULATE MAGNITUDE OF SHIFTING, “0″ – SPECTRUM INVERSION.

Link to download an Arduino sketch: Pitch Shifting – Scrambler 


Rocket Brand Studios Transmitter

Primary image

What does it do?

A transmitter kit for just about any robot project

 

Cost to build

Embedded video

Finished project

Complete

Number

Time to build

Type

URL to more information

Weight

read more

How-To: Build a Room-Sized Skill Crane

Becky covered the first prototype of Instructables user marc.cryan’s homemade claw picker game about this time last year, when it was still just a two-axis machine in a doorframe. Now, Marc has added a third dimension, expanded the crane’s envelope to cover an entire room, and upgraded the business end with a SparkFun robotic claw. A universal TV remote serves as controller, communicating by IR with Arduinos in each of the two big motor housings.

Build a big crane game

More:
Mindstorms skill crane


Maker Shed Exclusive: MintDuino Game Pack

The MintDuino Game Pack provides a fun and informative way to learn about the world of Arduino compatible microcontrollers. This exclusive Maker Shed kit combines the Mintronics: MintDuino, Mintronics: Survival Pack, and the MintDuino book to give you all the necessary parts and instructions to create your very own 2-player reaction game. Even if you’ve never dabbled in electronics have no idea how to program, the MintDuino Game Pack will give you a firm foundation with Arduino and the confidence and ability to create your very own projects!

Using book as your guide and the included components you will:

  • Build the Mintduino and see first hand the relationship between the wires, capacitors, resistors and integrated circuits that come together to create an Arduino compatible microcontroller.
  • Learn how how to create basic circuits and program your microcontroller to blink an LED.
  • Discover how to use of the random() function to blink the LED unpredictably.
  • Interact with your MintDuino by using buttons as inputs.
  • Combine your skills to build a two player reaction based game you can play with your friends!

Features


A talk about “Making things”

Michael Newman, VP of Technology at Pomp Productions, was invited to participate at the TEDxUCLA 2011 event to talk about “Making things”. Following a trip to Maker Faire and taking inspiration from mind controlled Nerf guns, Michael built a special project using Arduino, a Nerf Gun and Twilio.

[Via:Twilio]

Arduino Blog 09 Apr 13:48

Very Simple Robot

Primary image

What does it do?

Can take simple Forward, backwards, stop commands.

My robot is a hacked RC car controled by an Arduino Duemilanove.   It has no sensors,  but I have left room on my chasis so I can add some more later when I feel more comfortable around Arduino.  Most of the time on this project was spent dealing with Arduino code and the motor shield.  

Cost to build

$70,00

Embedded video

Finished project

Number

Time to build

7 hours

Type

wheels

URL to more information

Weight

360 grams

read more

TextSpresso machine brews caffeinated goodness via text messaging (video)

The folks at Zipwhip may have unwittingly discovered a new business model. While the company is primarily focused on cloud messaging services, it's recently created an espresso maker that allows employees to whip up custom brews from the comfort of their mobile phone. Known as TextSpresso, it's based on the Jura Impressa XS90, but unlike the retail model, the machine accepts orders via SMS. As if that weren't enough, it's part of a larger system that's capable of printing employee names onto the foam (using edible ink) and then placing the drink onto a warming tray. TextSpresso is very much a custom job, but if you'd like an inside peek of the system -- complete with servo motors, an Arduino microcontroller and a retro-fitted Canon printer -- be sure to hop the break and dream of what could be.

Continue reading TextSpresso machine brews caffeinated goodness via text messaging (video)

TextSpresso machine brews caffeinated goodness via text messaging (video) originally appeared on Engadget on Sat, 07 Apr 2012 00:34:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Arduino Ambient Temperature Display

Larry Ogrodnek, creator of the LED NameTag kit, figured out a great way to use an RGB backlight LCD to display temperature data.

This is a really simple ambient display for temperature using an Arduino, an RGB backlight LCD, and a temperature sensor.

The LCD displays the temperature in Fahrenheit and Celsius and adjusts the color of the backlight depending on the reading. An ideal range is set at 61F to 67F. If the temperature is in this range the backlight will change green. Above this range and the color will change red, below the range it will change blue.

The great thing about these kinds of displays is that you can immediately get some rough information from across the room.

This is just a quick project. An obvious improvement is to have more variations in color depending on how far you are from your ideal range. I.e. as the temperature increases out of the ideal range, move along the color wheel and use shades of yellow, then orange before hitting red. There’s also a lot of empty room on that LCD. Possibly room for data from other sensors, or maybe just a larger (2-line) font.

This is perfect for someone like me who only needs 5 different temperature increments; really cold, cold, nice, hot, and really hot. Most of these parts and (Larry’s NameTag kit) are available in the Maker Shed.

[via Analog Machines]


GOduino II = Arduino + L293D Variable Speed Motor Controller

NTRODUCTION

The GOduino II is a self-contained

read more

Let's Make Robots 06 Apr 15:00

Arduino users are getting younger: Ella Smith, 10

Ella Smith, age 10, is an interesting young lady. At an age when most girls are fussing over the new dresses for the dolls, Ella actually started tinkering. She made Zeverino – a timely cat feeding device alongwith her father. With a passion for animals and an ambition to become a veterinarian, this young techie is a combination to watch out for.

An interesting interview with her had her naming soldering iron as her favorite tool to work with.

Kudos to the young lady and her father!

[Via: Makezine]

Arduino Blog 05 Apr 21:43