Posts with «arduino» label

Arduino users are getting younger: Davis Fortenberry, 10

Arduino users are getting younger! Davis Fortenberry, Age 10 designed his own robot and won The Institute of Electrical and Electronics Engineers, South eastern competition, in Orlando. He competed with a lot of college level teams and had a robot that was equally competent.

Davis, who has tinkered with robots since he was 5, built his “davibot” in a week, starting with an m3pi (“a robot in itself, really”) as the base.

He added an Arduino (Italian microcomputer that tells the base unit whether to go left, right, straight ahead), then designed components for measuring contest specifics: voltage, capacitance, temperature and waveform.

He attends the Tennessee Virtual Academy an online approved school.

[Via: Commercial appeal]

Arduino Blog 27 Mar 12:49
arduino  competition  kids  robot  

Sensing Light Variations using LDR

Today, I’m going to show how easy it is to read data from an accessory to your android device. In this example, we are going to use a special kind of resistor whose resistance is dependent on the amount of light falling on its surface. It is called Light-Dependent-Resistor or LDR or also known [...]

Android + Arduino 26 Mar 16:03
adk  android  arduino  ldr  photocell  red pill  

Getting Started with Android and Arduino

Writing applications on Android is cool but writing applications on Android that can talk to the physical world is totally awesome. I recently bought a Seeduino ADK Board, which is actually a clone of an Arduino board that has support for the Android Accessory Development Kit. You can find more information about Seeduino here.

[...]
Android + Arduino 25 Mar 17:13
adk  android  arduino  led  red pill  

RADIX-4 FFT (integer math).

Tweaking the FFT code, that I’ve published earlier in my series of blogs, I hit a “stone wall”. There are nothing could be improved in the “musical note recognition” version of the code, in order to make it faster. At least, nothing w/o completely switching to assembler language, what I’m trying to avoid for now.  I’m sure, it’s the fastest C algorithm. Looking around it didn’t take long to find out that there is other option: change RADIX-2 algorithm for RADIX with higher order, 4, 8, or split-radix approach. Putting split-radix aside, (would it be my next adventure?), RADIX-4 looks promising, with theoretically 1/4 reduction in number of multiplications (what I believe is an “Achilles heel”).

Googling for awhile, I couldn’t find fixed point version in plain C or C++ language. There is TI’s “Autoscaling Radix-4 FFT for MS320C6000TM” application report, which I find useful , but the problem is it’s ”bind” with TI microprocessors hardware multiplier, and any attempt to re-write code would, probably, make it’s performance even worse than RADIX-2. Having “tweaking” experience with fix_fft source code from:  http://www.jjj.de/             I decide to follow same path, as I did before, adapting fix_fft for arduino: take their floating point source, disassemble it to the pieces, and than combine all parts back as fixed point or integer math components.    And you know what ? Thanks God, I successed!!!

I decided not all parts to re-assemble back again, this is why fft_size has to be power of 4 ( 16, 64, 256, 1024 etc.). Next, the software is “adjustable” for different level of the optimization. Trade is always the same, accuracy against speed. I’d highlight 3 level at this point:

1. No optimization, all math operation 15-bits.   The slowest version. Not tested at all.

2. Compromise version.  Switches: 12-bits Sine table, regular multiplication (long) right shifted >>12, Half-Scaling in the sum_dif_I (RSL) >>1. Recorded measurements result:  24 milliseconds with N = 256 fft_size.

3. Maximum optimization. Switches: 8-bits Sine table, macro assembler multiplication short cut, no scaling in the core. Timing 10.1 millisecond!!!

Fastest. Best of the Best Ever written FFT code for 8-bit microprocessor.   Enjoy the meal:   https://docs.google.com/open?id=0Bw4tXXvyWtFVMldRT3NFMGNTZVN0Y0d4eVRsenVZdw

Here is slightly modified copy, where I moved sine table from RAM to FLASH memory using progmem utility. For someone, who was curious to find the answer: how much progmem slower compare to access data in the RAM, there is an answer. 10.16 milliseconds become 10.28, or 120 usec slower. Divide by 84 x 6 = 504 number of readings, each progmem costs 0.24 useconds. Its about 4 cycles CPU.

https://docs.google.com/open?id=0Bw4tXXvyWtFVQjZpZkw1c3VUZXlmaF9sOEJwMmpEUQ

Screenshot from the running application, signal generator running on the computer, feeding audio wave to OPA and than analog input 0. Look for hardware setup configuration on the “color organ” blog-post.

LInk to first version based on RADIX-2 FFT:     LINK

BTW, there is one more important thing, I missed to emphasize in my short introductory paragraph, code offers FLEXIBILITY over SNR ratio. Basic FFT algorithm has an intrinsic “build-in” GAIN: G(in) = FFT_SIZE / 2 . (in) stands for intrinsic. That is perfect value for fft_size = 64 ( Gain = 64 / 2 = 32) and arduino (Atmel AtMega328)  10-bit ADC ( max value = 1023 ). FFT output would be 32 x 1023 = 32736, exactly 15 bit + sign. In other words, scaling in the algorithm core doesn’t required at all! That alone improve speed and lower rounding noise error significantly. The same time G(in)  grows too high with FFT_SIZE = 256, when G = 256 / 2 = 128 and output of the FFT would overflow size of 16-bit integer math. But again, scaling don’t have to be 100%, as long as there is a way to keep it in balance with ADC data. In this particular case, with 10-bit ADC, we can keep gain just below 32, it’s not necessary to make it exactly “1″.  For 12-bit ADC upper G limit would be 8, still not “1″. To manipulate the gain, division by 2 (>> 1) in the “sum_dif_I” could be set, to prevent overflow with fft_size > 64. Right shift “gain limiter” creates a square root adjustment, according to new formula: G(rsl) = SQRT (FFT_SIZE) / 4 . (rsl) stands for right-shift-limiter.

  1.  G = 1 for fft_size = 16,
  2.  G = 2 for fft_size = 64,
  3.  G = 4 for fft_size = 256,
  4.  G = 8 for fft_size = 1024.

Summing up, for using RADIX-4 with arduino ADC and FFT_SIZE <= 64, keep division by 2 (>> 1) in the “sum_dif_I” commented out. In any other circumstances, >10 bits external ADC, >64 fft_size, uncomment it.

To be continue…..


RADIX-4 FFT (integer math).

Updates on 30 Sept. 2014:

Everything below is correct, and may worth to read. But new  code based on Split Radix Real is published. Faster, lower memory demands, both version for UNO and DUE available as libraries.  New algorithm makes it possible to run FFT_SIZE =  512 on UNO board in less than 9.6 milliseconds.

/**************************************************************************************************************************************

Tweaking the FFT code, that I’ve published earlier in my series of blogs, I hit a “stone wall”. There are nothing could be improved in the “musical note recognition” version of the code, in order to make it faster. At least, nothing w/o completely switching to assembler language, what I’m trying to avoid for now.  I’m sure, it’s the fastest C algorithm. Looking around it didn’t take long to find out that there is other option: change RADIX-2 algorithm for RADIX with higher order, 4, 8, or split-radix approach. Putting split-radix aside, (would it be my next adventure?), RADIX-4 looks promising, with theoretically 1/4 reduction in number of multiplications (what I believe is an “Achilles heel”).

Googling for awhile, I couldn’t find fixed point version in plain C or C++ language. There is TI’s “Autoscaling Radix-4 FFT for MS320C6000TM” application report, which I find useful , but the problem is it’s “bind” with TI microprocessors hardware multiplier, and any attempt to re-write code would, probably, make it’s performance even worse than RADIX-2. Having “tweaking” experience with fix_fft source code from:  http://www.jjj.de/             I decide to follow same path, as I did before, adapting fix_fft for arduino: take their floating point source, disassemble it to the pieces, and than combine all parts back as fixed point or integer math components.    And you know what ? Thanks God, I successed!!!

I decided not all parts to re-assemble back again, this is why fft_size has to be power of 4 ( 16, 64, 256, 1024 etc.). Next, the software is “adjustable” for different level of the optimization. Trade is always the same, accuracy against speed. I’d highlight 3 level at this point:

1. No optimization, all math operation 15-bits.   The slowest version. Not tested at all.

2. Compromise version.  Switches: 12-bits Sine table, regular multiplication (long) right shifted >>12, Half-Scaling in the sum_dif_I (RSL) >>1. Recorded measurements result:  24 milliseconds with N = 256 fft_size.

3. Maximum optimization. Switches: 8-bits Sine table, macro assembler multiplication short cut, no scaling in the core. Timing 10.1 millisecond!!!

Fastest. Best of the Best Ever written FFT code for 8-bit microprocessor.   Enjoy the meal:   https://docs.google.com/open?id=0Bw4tXXvyWtFVMldRT3NFMGNTZVN0Y0d4eVRsenVZdw

Here is slightly modified copy, where I moved sine table from RAM to FLASH memory using progmem utility. For someone, who was curious to find the answer: how much progmem slower compare to access data in the RAM, there is an answer. 10.16 milliseconds become 10.28, or 120 usec slower. Divide by 84 x 6 = 504 number of readings, each progmem costs 0.24 useconds. Its about 4 cycles CPU.

https://docs.google.com/open?id=0Bw4tXXvyWtFVQjZpZkw1c3VUZXlmaF9sOEJwMmpEUQ

Screenshot from the running application, signal generator running on the computer, feeding audio wave to OPA and than analog input 0. Look for hardware setup configuration on the “color organ” blog-post.

BTW, there is one more important thing, I missed to emphasize in my short introductory paragraph, code offers FLEXIBILITY over SNR ratio. Basic FFT algorithm has an intrinsic “build-in” GAIN: G(in) = FFT_SIZE / 2 . (in) stands for intrinsic. That is perfect value for fft_size = 64 ( Gain = 64 / 2 = 32) and arduino (Atmel AtMega328)  10-bit ADC ( max value = 1023 ). FFT output would be 32 x 1023 = 32736, exactly 15 bit + sign. In other words, scaling in the algorithm core doesn’t required at all! That alone improve speed and lower rounding noise error significantly. The same time G(in)  grows too high with FFT_SIZE = 256, when G = 256 / 2 = 128 and output of the FFT would overflow size of 16-bit integer math. But again, scaling don’t have to be 100%, as long as there is a way to keep it in balance with ADC data. In this particular case, with 10-bit ADC, we can keep gain just below 32, it’s not necessary to make it exactly “1″.  For 12-bit ADC upper G limit would be 8, still not “1″. To manipulate the gain, division by 2 (>> 1) in the “sum_dif_I” could be set, to prevent overflow with fft_size > 64. Right shift “gain limiter” creates a square root adjustment, according to new formula: G(rsl) = SQRT (FFT_SIZE) / 4 . (rsl) stands for right-shift-limiter.

  1.  G = 1 for fft_size = 16,
  2.  G = 2 for fft_size = 64,
  3.  G = 4 for fft_size = 256,
  4.  G = 8 for fft_size = 1024.

Summing up, for using RADIX-4 with arduino ADC and FFT_SIZE <= 64, keep division by 2 (>> 1) in the “sum_dif_I” commented out. In any other circumstances, >10 bits external ADC, >64 fft_size, uncomment it.

To be continue…..


Live your life like there's no tomorrow with David Lee Roth in a box (video)

Seriously, guys, when was the last time you ran with the devil? It's been a while, hasn't it? Leave it to David Lee Roth to show us all the way, yet again, this time courtesy of Arduino-based soundbox created with help from the Adafruit Wave Shield. The box runs on a nine-volt battery and has a big trigger button on the top that plays what sounds like Roth's infamous "Runnin' With the Devil" isolated vocal tracks through a speaker on the bottom. The box's builder has promised more to come -- we'd like to request a Murry Wilson "I'm a genius, too" box, if one isn't already in the pipeline.

Continue reading Live your life like there's no tomorrow with David Lee Roth in a box (video)

Live your life like there's no tomorrow with David Lee Roth in a box (video) originally appeared on Engadget on Thu, 22 Mar 2012 15:44:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Insert Coin: Tabber lights up your fretboard, shows you the way to rock

In Insert Coin, we look at an exciting new tech project that requires funding before it can hit production. If you'd like to pitch a project, please send us a tip with "Insert Coin" as the subject line.
The idea of a lighted fretboard isn't a new one by any stretch (how do you think the Fretlight got its compound name?), but there's something to be said for not having to buy a brand new guitar for that functionality. The folks behind Tabber are working to make that a reality, having tested a number of prototypes for a product that you can simply slip over the neck of your axe for a quick tutorial. The company is looking to create a slicker version of the concept that it can bring to the market. Tabber's creators need your help to "transform the guitar industry," so naturally they've taken to Kickstarter, with a little under a month to hit their $45,000 goal. The Arduino-powered LED guitar instructor will connect to a mobile device via Bluetooth, accessing information to let you play along with songs, figure out chords and bend your fingers around some scales. Click the source link to send some cash Tabber's way, or to find out a bit more about the project.

Update: As a number of commenters have pointed out, there's a similar project currently awaiting your donations on Kickstarter. Great minds, huh?

Continue reading Insert Coin: Tabber lights up your fretboard, shows you the way to rock

Insert Coin: Tabber lights up your fretboard, shows you the way to rock originally appeared on Engadget on Thu, 22 Mar 2012 11:00:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Creating a new Arduino PCB in the Arduino IDE - Trials and Tribble-ations

If someone can help me out then I will write a tip/walkthough on this subject.

Quite often DAGU products use the ATmega168 MCU rather than the ATmega328 because they are a bit cheaper and 16K of program memory is often enough.

The problem is that ATmel no longer produce the ATmega168 20-AU which we had been using. They now produce the ATmega168PA which is almost identical but has a different device signature ID.

read more

Let's Make Robots 22 Mar 07:22
arduino  avr  boards  bootloader  new  pcb  signature id  

IOIO, another cool physical computing project

Over at Engineer Blogs, I found out about another cool project for connecting computers up with the real world—the IOIO (pronounced yo-yo):  An Interview with Ytai Ben-Tsvi, Inventor of the IOIO.

Basically, it is a $50 IO board for an Android phone, using either USB or Bluetooth connection, controllable with a Java API from an Android 1.5 or later device.  It has a PIC24F microcontroller providing 48 I/O pins, which have the usual sorts of capabilities (PWM, I2C, SPI, …).  You can use it in much the same way you would use an Arduino, except that you need an Android device to talk to it.

This is a plus and a minus, as the Android phones come with a fair amount of compute power and some powerful software (like face recognition software), but they cost a lot also, and you wouldn’t want to tie up your phone in a dedicated project (a $25 Arduino board is cheaper to embed than a phone and a $50 IOIO board).

I don’t think that the Android phone+IOIO is quite as exciting as the $35 Raspberry Pi if you need cell-phone-level compute power, but it looks like a good way to make cell-phone-controlled gadgets.


Tagged: Android, Arduino, IOIO, PIC24F, Raspberry Pi

Old style tweet printing machine

The Twittertape Machine prototype from Adam Vaughan connects to his Twitter account via Ethernet, checks for updates twice every minute, and prints out a hard copy of any new Tweets without the need for printer ink.

Vaughan told us that the idea for the Twittertape Machine was born of a desire to have the kind of old stock ticker seen in movies sitting on his desk. After a lukewarm reception to his pitch from friends, he decided to make his dream a reality. Rather than sacrifice a rare original (like the Edison Universal Stock Ticker used for Ames Bielenberg’s Spring Break project), he opted to build his own replica version from some old brass clock movements, a wooden plinth and a glass dome found online.

It is powered by two AC adapters and is controlled by a network-enabled Arduino-style microcontroller running custom code in the base. The board checks Vaughan’s Twitter account every 30 seconds for new Tweets.

The little thermal printer hidden at the base prints the tweets on a cut-down thermal paper. An awesome product in an awesome demand!

[Via: Twittertape and Gizmag]