Posts with «diy» label

NaNoWriMo progress meter uses Arduino to fight writer's block, may be its own distraction (video)

We've all had that moment where we sit in front of the keyboard and have trouble just getting started. It can be an especially dire problem when the 30-day deadline of National Novel Writing Month (NaNoWriMo) looms overhead, and that was enough for inventor Steve Hoefer to craft his own USB progress meter. The Arduino-based contraption advances a real-world dial or gauge as the word count reaches the NaNoWriMo servers, giving that extra incentive to meet a daily goal or hit the ultimate 50,000-word mark on time. Hoefer characterizes it as a simple project for those who know their way around an Arduino controller; the toughest part for them may just be constructing the box that keeps the meter presentable. Full instructions are available after the break, although we'd hurry to build the meter before November starts. It could all too easily be the source of the very procrastination we're trying to avoid.

Continue reading NaNoWriMo progress meter uses Arduino to fight writer's block, may be its own distraction (video)

Filed under: Peripherals, Alt

NaNoWriMo progress meter uses Arduino to fight writer's block, may be its own distraction (video) originally appeared on Engadget on Thu, 25 Oct 2012 14:34:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

DIY less-expensive Thermal imaging camera

A thermal imaging camera is used for the purpose of energy auditing for homes and offices. Typically these require equipments such as FLIR B60 which are worth $5000 to $8000. This article by David Schneider however talks about a cheap DIY camera. Inspired by the award winning design using Arduino by two two 18-year-old students, Max Ritter and Mark Kohl, from Mindelheim, Germany.

The Schneider version of the thermocam, however, uses a slightly different partlist for the sake of robustness.

The parts used were:
Melexis’s MLX90614?DCI ($52), Arduino microcontroller($30), powder-coated metal enclosure for Arduino($30), Hitec HS425BB x 2 servos($13×2), DDT500H for pan-tilt mechanism($25), plastic mount for servos($5), COM-08654 Laser module with digital controller($19)

The applications were numerous:
- Checking around the home for weather-stripping faults. Even minor gaps were shown more clearly.
- Scanning people and imitating Kirilian photography to picture the actual energy that people emit.

For a more step-by-step on how to build, head here.

Happy building!

Via:[IEEE Spectrum],[Cheap-thermocam]

Arduino Blog 25 Oct 10:29

DIY Arduino FM Radio (Part 2).

 Updates on 24 Oct. 2012.

If you have read my first blog on the topic, than you already know what I’m experimenting with. Low price FM Radio, build with TDA7088 / YD 9088. It was obvious, that technology from the early 90-x is outdated. I mean, simple “search and hold” function of the radio.

  • Scan function works only one way, up in the frequency.
  • After switching power “on/off” you have to tune it again on your preferred radio wave.
  • You have no means to know, what is the frequency it’s on.
  •  Occasionally you can’t “push” a tuner to the next station on the air, and have to send multiple commends.

The problem is that radio luck intellectuality, you can’t do much with  RS trigger.  Arduino, even it’s small and 8-bits only, just a monster on this matter, with CPU, ADC and EEPROM. Now it’s time to use them!  Radio-2 able to automatically scan all radio station in the area, store them in non-volatile memory, and plus do a manual “tunning” – mostly for debugging purposes.

This version of the shield requires 4 wires (plus a cap, 4 resistors, and radio, of course). Two power lines, the same like in the first project, and other two connected to pin 1 of the IC and to variable capacitance diode. You also have to cut a trace, which connects Varicap and pin 16. Look at the schematic above.

Digital pin 9 of the arduino, internally driven by TIMER 1, is PWM-ed frequency control voltage to tune a heterodyne.  FAST PWM mode, 10-bit is a compromise between PWM frequency and voltage resolution. We can’t get both, for example 16-bit PWM would drop a frequency down to 16 MHz / 65536 = 244 Hz, which is too low to be filtered by primitive  RC filter, and plus not adequate to do a fast “sweep” or changes in tunning. The same time 8-bit PWM has low voltage resolution, and consequently creates too big “steps” in bandwidth. Measurements show, that radio has about 1 V / 20 MHz sensitivity of the VCO, which would imply to have a resolution at least:  1 V / 20 MHz / 200 kHz = 10 mV, where 200 kHz is a “spacing” in FM broadcasting schedule.  8 bit analogWrite has a resolution 5 V / 256 = .19.53 mV. Even resistors divider improves this value on 0.6 times (3 v / 256 = 11.72 mV), it’s still bigger than necessary minimum. With 10-bits I have 3V / 1024 =   2.93 mV.   Using of external DAC isn’t an option for a few backs radio, but may be worse to try. PWM frequency with 10-bit equals to 16 kHz, which could be easily filtered out with 1-st order RC network.

Analog pin 3 (AN3 ADC), reading the “signal strength” output line from the YD9088.

uint16_t read_tuner()
  {
   uint16_t temp = 0;
      for( uint8_t i = 0; i < 16; i++ ) {
        ADCSRA |= (1<<ADSC);
        while(!(ADCSRA & 0x10));
        temp += ADC;
       }
    temp = 5 * temp / 16;
    return temp;
  }

As you can see, readings averaged over 16 values, which increases a resolution on two additional bits.

Search algorithm has a “window” of 5 samples, to be able to recognize a peaks in the incoming data.

for( uint16_t i = 1023, prn_dot = 0; i > 500; i-- ) {
     OCR1A = i;
     delay(200); // T = R x C = 1 M x 0.1 uF = 0.1 seconds.
     lpf[i%5] = read_tuner();

  uint16_t accum = 0;
       for( uint8_t jp = 0; jp < 5; jp++ ) {
         accum += lpf[jp];
         }
        accum /= 5;
        if ((prn_dot++) % 32 == 0) Serial.print("\n");
          Serial.print(" *");
        if ( accum > maxim )
         {
          maxim = accum;
          trigg = 1;
         }
        if ( accum < maxim )
         { 
          if ( trigg )
           { 
            if ( accum > BARRIER )
             {
              store_entry( posit, (i + 1));
                Serial.print("\n");
                print_transl( posit );
                prn_dot = 0;
              posit++;
              if ( posit >=20 ) return;
              }
             }
          maxim = accum;
          trigg = 0;
     }
   }
 }

All I have to do, is to set a threshold for radio station, in order to be distinguished from the background noise and interference. Tunning data are stored in 40 EEPROM bytes, list includes 20 radio stations overall.

Sketch, Arduino UNO:  FM_Radio_YD9088

 24 Oct. 2012

 In first part of this project, I already write about voltage – frequency non-linearity and how I get the coefficients to improve accuracy of the voltage-to-frequency (VTF) conversion formula, based on power regression. Formula in second part was slightly different, I used second degree polynomial (parabola) approximation, which provides better match to measurements data. Even LibreOffice helps a  lot with calculation, but in overall I spend a lot of time to figure out the values of the coefficients. Plus filling the data table in spreadsheet also quite time consuming. Can Arduino do this work, finding a coefficients to second degree polynomial that “fits” to experimental data? From mathematical / science point of view, the task is interesting itself, and could be a great part of any science project, not necessarily a radio tuner. The method I choose – Least Squares.

 To my great surprise, arduino solved a problem in a splits of second!  I upgrade a sketch, which includes a calibration procedure now, calling via “c” from the serial monitor console input-output interface (Hi, DOS era).

void calibrate()
 {
 //Least squares parabola (2-nd degree polynomial) coefficient calculation
 float arr[5][5] ={{0},{0}}, err[5] = {0}, coeff[5] = {0};

 err[0] = 5;
 for(uint8_t i = 1; i < 5; i++)
  {
   err[i] = 0;
   for(uint8_t j = 0; j < 5; j++)
    {
     err[i] += pow(calibration[j], i);
    }
  }
 for(uint8_t i = 0; i < 3; i++)
  {
   for(uint8_t j = 0; j < 3; j++)
    {
     arr[i][j] = err[i+j];
    }
  }
 for(uint8_t i = 0; i < 3; i++)
  {
   arr[i][3] = 0;
   for(uint8_t j = 0; j < 5; j++)
    {
     if (i==0) arr[i][3] += radio_table[j];
     else arr[i][3] += radio_table[j] * pow(calibration[j], i);
    }
  }
 for(uint8_t k = 0; k < 3; k++)
  {
   for(uint8_t i = 0; i < 3; i++)
    {
     if ( i != k )
      {
      for(uint8_t j = (k + 1); j < 4; j++)
       {
        arr[i][j] -= ((arr[i][k] * arr[k][j]) / arr[k][k]);
       }
      }
    }
  }

union split_float {
 uint16_t tegri[2];
 float loatf;
 } sf;

for(uint8_t i = 0; i < 3; i++)
 {
  coeff[i] = ( arr[i][3] / arr[i][i]);
  sf.loatf = coeff[i];
  store_entry(( 20 + 2 * i), sf.tegri[0] );
  store_entry(( 21 + 2 * i), sf.tegri[1] );
 }
}

In order to perform a calibration procedure, you would need 5 Radio Stations (RSts) available in your area, and their frequencies. (Calibration doesn’t have much sense, if there are less than 5).  Edit this line in the code:

const float radio_table[5] = { 92.5, 97.7, 100.7, 105.7, 107.3 };  

For better results, choose two RSts from both side of the band ( 88 and 108 for North America ) and others in the middle. The signal (RSSI) has to be strong, you may need an external antenna properly oriented for maximum RF field. Run a “scan” first, and see what you get in the list. After this part completed, run “c”.

Arduino starts / a scan : optional /, than would ask you to tune a radio  on the first RSt in the radio_table.  When calibration was done at least ones, print a list with “l” command (interface isn’t blocking, you can send any commands, except digits). If Rst in the list, than use “u” or “d” to tune a radio. Than use “v”  -  ”n” for fine tunning, plus “x”, pay attention to RSSI, find the best position. If you start calibration first time, you can’t use a radio_list, because MHz data would be far off or completely wrong. Use another radio with digital scale or you have to listen content and compare it to RSts broadcasting schedule.

Enter “y” and send. Follow the instructions on the screen. At the end, arduino would store coefficients in the EEPROM, print them out for your review and say “Finished”. Print a list again, and check if the data in front of MHz is correct.

CLI:

  1. “x” – print current settings, fine tunning / calibration / debug;
  2. “Dr” – read settings from the previously stored radio list. (D is digits 0 <-> 19).
  3. “Dw” – write settings to the radio list. (D is digits 0 <-> 19).
  4. “u” – change radio to next “UP” in the list;
  5. “d” – change radio to next “DOWN” in the list;
  6. “s” – full “SCAN” of the air, and save to EEPROM;
  7. “l” – print out a stations list from the memory;
  8. “v” – push tuner “up” on 1 step, debug (“ux”);
  9. “n” – push tuner “down” on 1 step, debug (“nx”);
  10. “c” and “y” – calibration of the VCO, voltage settings – frequency conversion.

Listing of commands isn’t final, and  may have some variation.

Sketch:  FM_Radio_calibration.


DIY Arduino FM Radio Shield.

I’ve been visiting local convenience store (Dollarama, here in Montreal, Canada) and notice nice looking FM Radio, just for only $3. Why not to try to interface it to my lovely Arduino? Idea looks quite challenging, the same time what is the point in interfacing a DSP radio shield to arduino? I don’t need a radio, I want to have fun experimenting with it, so  lets go to the bare metal!

You, probably, could find the same or very similar radio all around the globe, with two buttons user interface, powered by two AAA or one CR2032 coin battery (like in my case), and low price. Hardware design based on IC TDA7088 (depending on the manufacturer, may be “clones” SC1088, SA1088, CD9088, D7088, or YD9088). My radio has YD9088  inside. Quick search on a Google, brings a  data sheet. I’d say, It’s not very informative, but at least it shows basic application circuit.

 HARDWARE.

 The most difficult part of this project, is soldering to surface mount radio components. In minimum configuration just two wires, “interfacing” two front-panel buttons. (Other two, for powering up the radio from arduino +3.3 V on-board voltage regulator instead of battery, should be much easier to attach). I solder wires to the caps, on the side, which connected  to the pins 15 and 16 of the IC. In this case, there is minimum impact on usability of the radio, as buttons were not touch. May be important for debugging. If your soldering skills are not as good as mine, you could solder to the traces, removing buttons. On the pictures below you would find two more wires, attached to pin 1 and to earphone’s jack-connector, but they are not in use in this project, and you could left them out.

If you look at the electrical drawings of the shield, you would notice  1 k pot. I build a first version using just two resistors divider, as it shown in “Reset” signal line. But it turns out, that IC is quite capricious for the voltage level it senses on the “Scan” input. On some occasions, it refused  to change a station, and in some it flipped to “reset”. Trim the pot, to get voltage at pin 15 about 3.1 – 3.2 V.  It would be easy to measure voltage with DMM, temporary changing “delay” in this section of the code:

 if (incomingByte == 's') { // SCAN - UP 
  digitalWrite( scan_pin, HIGH ); 
  delay(50); 
  digitalWrite( scan_pin, LOW ); 
  } 

to 10000 or even 20000.  You may need something to be plugged in the earphones jack, as radio is using wires like an antenna. Headphones, or USB speakers cable, works quite well. BTW, the default value 50 may not be enough to “push” a radio up with strong RF signal. Try to send a few “s” simultaneously, “ss” or “ssss”. Setting delay higher than 50 is not recommended, as “jump” may be to wide, so you likely to miss something interesting in broadcasting.

SOFTWARE.

int tunning = 0;

const uint8_t scan_pin = 14;
const uint8_t reset_pin = 15;

void setup() {
Serial.begin(115200); 
 ADCSRA = 0x87; // turn on adc, freq = 1/128 , 125 kHz. 
 ADMUX = 0x44;

pinMode ( scan_pin, OUTPUT );
pinMode ( reset_pin, OUTPUT );
digitalWrite( scan_pin, LOW );
digitalWrite(reset_pin, LOW );
}

void loop() {
char incomingByte;

 ADCSRA |= (1<<ADSC);
 while(!(ADCSRA & 0x10));

 uint16_t temp = 0;

 for( uint8_t i = 0; i < 16; i++ ) {
 ADCSRA |= (1<<ADSC);
 while(!(ADCSRA & 0x10));
 temp += ADC;
 } 
 tunning = (5 * temp) / 16;

 if (Serial.available() > 0) {
 incomingByte = Serial.read();
 if (incomingByte == 'x') { // 
 Serial.print(F("\t Tunning = "));
 Serial.print( tunning, DEC);
 Serial.print(F("\t Frequency = "));
 Serial.println(( 92.5 + pow((3340 - tunning), 0.85)/ 24.5), 1);
}

 if (incomingByte == 's') { // SCAN - UP
 digitalWrite( scan_pin, HIGH );
 delay(50);
 digitalWrite( scan_pin, LOW );
 }
 if (incomingByte == 'r') { // RESET - RESTART
 digitalWrite(reset_pin, HIGH );
 delay(50);
 digitalWrite(reset_pin, LOW );
 }
 } 
}

As you can see, arduino is not doing much in the scetch, only constantly monitoring “tunning” line and checking serial if there is any command waiting to be proceed. CLI includes 3 commands, so far, “x”, “s” and “r”. Sending last two, is equivalent to pressing “switch to next” and “reset” buttons. First one, would print out current “tunning” settings of the radio in millivolts and in MHz. Very likely, you will have to change a coefficients in frequency calculation formula (power regression equation):

92.5 + pow((3340 – tunning), 0.85)/ 24.5

In order to find right digits, you would need to run a full “scan” of all available radio stations in your area. Write down a name of radio station, and corresponding voltage you are getting constantly sending “x”. Than, replace the names with appropriate frequency numbers to any radio station in your list. Look up for such data over Internet at  the station’s web page.  If you do have an another radio with digital scale, than tune this radio on the same radio station as your shield currently preset, and write down a frequency – voltage table.  Filling this data in LibreOffice spreadsheet and plotting a chart would reveal some-kind of non-linear curve:  On the picture you can see:  blue line – real data for my DIY FM Radio shield, orange line – linear approximation, and yellow line is a “power – polynom” approximation. Linear gives big error in the middle, around 1 MHz “off”. Polynomial is much better, and stay close to real data with accuracy +- 0.2 MHz, which is quite good. All you have to do, is “tweak” a coefficients to find the best approximation. Start with lowest frequency you get in your list ( 92.5 and 3340 in an example), than vary 24.5 to get close for highest radio station data. Very likely, 0.85 will be the same, I just have no clue why is it so. To do calculation right, a lot of information is missing, I even don’t know the varicap diode they use to tune a radio!


Beer Keyboard combines Arduino and Raspberry Pi... and beer

Sure, Red Bull may have gotten a lot of attention by sponsoring Felix Baumgartner's space dive, but it's not the only beverage-maker that has made some great accomplishments possible. The Prague-based brewery Staropramen was a sponsor at the recent Webstock 2012 conference, where the folks from Robofun Create showed off this so-called Beer Keyboard built with the brewer's backing. As you can see, it's more beer than keyboard, with 40 cans of Staropramen serving as "keys" that just need to be gently pressed to input a letter. To make that actually work, Robofun paired an Arduino board with some capacitive controllers for the base, and connected that to a Raspberry Pi that linked the keyboard to the TV. Unconfirmed reports suggest that the keyboard has since gone missing. Head on past the break for a video.

Continue reading Beer Keyboard combines Arduino and Raspberry Pi... and beer

Filed under: Peripherals

Beer Keyboard combines Arduino and Raspberry Pi... and beer originally appeared on Engadget on Tue, 16 Oct 2012 20:36:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Mechanical Donkey Kong game tests your barrel-jumping skills, patience

We've seen quite a few NES mods in our day, but we can't say we've ever seen one hooked up to anything quite like this. Built by DIY-er Martin Raynsford, this contraption / work-of-art makes use of an Arduino (naturally) to relay signals from the NES controller to the Donkey Kong screen brought to life above, which was constructed with near pixel-perfect accuracy out of laser-cut parts. As Raynsford points out, though, things are still a bit limited in the game's V1 state. There isn't much of an actual "game," for starters -- just Mario stuck in the middle with a never-ending loop of barrels / ball bearings that you can jump over. A second version is planned with a greater degree of control, but we're guessing the video for it won't be quite as hypnotic as the one after the break.

Continue reading Mechanical Donkey Kong game tests your barrel-jumping skills, patience

Filed under: Misc, Gaming, Alt

Mechanical Donkey Kong game tests your barrel-jumping skills, patience originally appeared on Engadget on Mon, 24 Sep 2012 19:11:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Quasi real-time oscilloscope: REMIX

 Updated on 21 Sept. 2012, version 4.

 Updated on 15 Oct. 2012, version 5.

Recently I was reviewing one of my oldest project, and decided to “refresh” previous design by taking full advantage of the new arduino Leonardo board.  Based on AtMega32U4, which include PGA (programmable gain amplifier), oscilloscope’s  analog front end doesn’t require external OPA this time, end could be build in 1-2 hours on prototype board, using 5 resistors, 5 capacitors and one IC. Short specification:

  • Four channels.
  • Switchable gain settings 1x, 10x, 40x, 200x.

Hardware.

 As you can see on drawings above, inputs are AC coupled with caps, and biased with 1.25V generated by LM317. Connector for other two inputs not installed yet.

Software.

Project keeps almost same  structure of commands (CLI – command line interface) as its ancestor, with only two new for channel and gain selection. Read comments, it explains how to use them. One more things, I removed “r” – re-print option from the list of available commands.

Have fun!.

Link to arduino Leonardo sketch:  Oscilloscope_Leonardo.

********************************************* Version 4*********************************************

 Well, even posted above sketch has low complexity, and its good for beginning, nevertheless it’s quite limited as measuring device. The most important feature for oscilloscope, except V/div,  is T/div, or timing, that has to be as much precise as possible.   This is why “standard” timing options based on TIMER1 were add to next version of software. There are 9 time settings Time/div (10 samples):

50ms, 20ms, 10ms, 5ms, 2ms, 1ms, 500us, 200us, 100usec

corresponding to

200Hz, 500Hz, 1kHz, 2kHz, 5kHz, 10kHz, 20kHz, 50kHz, 100kHz

sampling rate. You can choose any of of this in the same manner, entering a digit 1-9 and letter d (display). Zero would skip capture, and just do whatever next letter request. Basically, 0 should be used to print channels data from memory. Combination: 9d0i – capture at 100 kHz rate, print chart and info-table,
4c2g7d – select 4-th channel, set gain to 10, select 20 kHz sampling rate and display.

I also add multichannel sampling capability. Commands 2m, 3m or 4m would configure oscilloscope for 2, 3 or 4 channels simultaneously capturing input waveform.   As arduino has only 1 ADC, switching in multichannel mode would reduce sampling rate proportionally to number of channels, and this changes would be reflected in right top corner of the display. What more, arduino would automatically change vertical resolution per channel, to fit all 2 – 4 charts on one screen!

Known caveats:

  • Sampling rate 9, or 100 usec per division (10 usec per sample) could not be selected in multichannel mode, should be in use for single channel only (1m, 1c – 2c – 3c – 4c).
  • There is a “shift” in channel number, signal  presented at input 1 would show up on screen 2, and so on. This happens on time settings 7 (occasionally), 8 and 9 in 4x multichannel mode due delay in MUX registers switching. Shouldn’t be an issue for 2x channel mode, or when you have an “overview” of the signals shape in single channel mode (1m) before switching to 4x, so you would know what to expect at each input port.

Link to arduino Leonardo sketch:  Oscilloscope_LeonardoV4

********************************************* Version 5*********************************************

 New updated version. I was thinking how to improve simplest ever oscilloscope, and have made some structural changes in the code, mostly related to sampling in multichannel mode.

First of all, instead of “delay” 2 microseconds, that was used to give a multiplexer (and PGA amplifier) time to “settle” on new channel, I decided not to waste a time (that may be priceless in real-time application), rather start new conversion, than track samples based on the “history” of MUX settings, and store new sample in corresponding two dimensional array box. Now MUX and PGA would have more time,  and consequently I could reduce ADC pre-selector’s clock to get better readings. It solved all the problems with wrong association port number and picture on the screen.

Secondly,  as you, probably, already notice I’ve been working on another project recently, where phase is a PRIME factor of the whole idea of the design. Phase noise is a jitter, and it degrades  spatial resolution and the sensitivity of the sound localization.  Jitter always would be presented in the incoming signal – sampled waveform due “not synchronous” way of sampling, as “start new conversion” events were generated in “manual” mode. As microprocessor spend different amount of time to get inside of the ISR (interrupt subroutine) depends on where it was interrupted, time frame of the events, basically, was not defined. In order to get rid off the phase noise, I changed ADC settings to be triggered via TIMER 1. There is a code:

ADCSRA = ((1<< ADEN)| // 1 = ADC Enable
(0<< ADSC)| // 1 = ADC Start Conversion
(1 <<ADATE) | / / 1 = ADC Auto Trigger Enable
*****
ADCSRB = ((1<<ADHSM)| // High Speed mode select
(0<< MUX5)| // 0 (10100) ADC1<->ADC4 Gain = 1x.
(0<<ADTS3)|
(1 <<ADTS2) | / / Sets Auto Trigger source Timer/Counter1 Compare Match B
(0 <<ADTS1) |
(1 <<ADTS0) );

For some unknown for me reason, Atmel designed TIMER 1 channel B to be an auto trigger source of the ADC, the same time to run TIMER 1 itself in CTC mode, channel A must be set. I simply “bind” two channels A and B in “parallel”, so both of them rise interrupt flag at the same moment, only A re-starts a TIMER 1, and B generates “start new conversion” event and calling ISR for “maintenance” – take a new sample waiting in the line and switch a MUX to another channel of the oscilloscope.

uint8_t take_it( int fast )
{
   ADCSRA &= 0xF8;
   if ( multChan -1 )
   {
    switch( fast ) { 
       case 7: // 20 kHz / 
         ADCSRA |= 0×03; 
         break; 
       case 8: // 50 kHz / 
         ADCSRA |= 0×02; 
         break; 
       case 9: // 100 kHz / 
         Serial.print(F(“\n\t *** NOT SUPPORTED ***”));
         return 0;
        default:
        ADCSRA |= 0×04;
       }
     }
    else
    { 
     switch( fast ) { 
        case 6: // 10 kHz / 
          ADCSRA |= 0×06; 
          break; 
        case 7: // 20 kHz / 
          ADCSRA |= 0×05; 
          break; 
        case 8: // 50 kHz / 
          ADCSRA |= 0×04; 
          break; 
        case 9: // 100 kHz / 
          ADCSRA |= 0×03; 
          break; 
        default:
          ADCSRA |= 0×07;
        }
      }
OCR1A   = smplTime[fast -1];
OCR1B   = smplTime[fast -1];
TCNT1   = 0;
TIFR1    |= (1<<OCF1B); 
TIMSK1 |= (1<<OCIE1B);
   flagSamp = 0; 
   while ( !flagSamp );
   for ( uint8_t indx, y = 0; y < multChan; y++){
      if ( multChan -1) indx = y;
      else indx = chanNumb;
   for ( int i = 0; i < INBUF; i++){
      if ( x[indx][i] & 0×0200) x[indx][i] += 0xFE00; // Convert to negative 16-bit word (2′s comp)
      else x[indx][i] += 0×200;
      }
     }
  return 1;
}
ISR(TIMER1_COMPB_vect)
{
   static uint8_t n_sampl = 0;
   static uint8_t history = 0;
   x[history][n_sampl] = ADC;
    history = chanNumb; 
   if ( multChan -1 )
   { 
    chanNumb++;
    if ( chanNumb >= multChan )
      {
       chanNumb = 0;
       n_sampl++;
      }   
     ADMUX &= 0xFC;
     ADMUX |= chanNumb; 
    }
   else
   {
     n_sampl++;
    }
   if ( n_sampl >= INBUF )
    {
      flagSamp = 1;
      n_sampl = 0;
TIMSK1 &= ~(1<<OCIE1B);
   }
}

Oscilloscope_Leonardo_V5.

The only issue that not solved yet, is a sampling in multichannel mode in “9″ T/div. Probably, Atmel just was not design to do such things…


Digital artist Julien Bayle [Interview]

Julien Bayle is a digital artist and technology developer, and his work is an excellent starting point for anyone interested in the DIY man-machine interfaces.

Back in 2008, Julien created a clone of the Monome, a control surface consisting in a matrix of leds and buttons whose functioning is defined by software.  It was called Bonome and RGB leds were used, instead of  monochromatic leds of the standard model.  Here are the instructions to build it.

Some time later, inspired by the DIY controller used by Monolake, Julien decided to build its own Protodeck to control Ableton Live.

Recently I stumbled upon his post titled “Arduino is the Power” and I discovered that Julien has started writing a book about the Arduino platform. So I thought that regular readers of the Arduino Blog would welcome an interview with this interesting guy. And here it is!

Andrea Reali: Tell us something about you.

Julien Bayle: I’m Julien Bayle from France. I’m a digital artist and technology evangelist. I’m inside computers world since my dad bought us a Commodore 64, around 1982.
I’m working with music softwares since the first sound-trackers and I began to work with visuals too with my Amiga 500, using some first POV-like softwares.
I first began by working as an IT Security Architect by day, then I quit to be only what I am today and especially to be really free to continue my travel inside art & technology.
I’m providing courses & consulting & development around open-source technology like Arduino, java/processing but also & especially with Max6 graphical programming framework which is my speciality. Max6 is really an universe itself and we’d need more than one life to discover all features. As an Ableton Certified Trainer, I’m still teaching that a bit.
All technology always provides tools to achieve art. I guess my path comes from pure technology and goes to pure art.

AR: How did you get interested in the area you’re interested in?

JB: I always thought technology was only a tool to achieve projects, artistic or not.
Progressively, I understood that pure technology could be interesting itself too and I began to learn as a maniac but without forgetting about applying theory, illustrating each bit of knowledge.
Each time I learn something, I feel ideas coming in my head, possible applications appearing in front of my eyes like “wow this totally abstract Interrupt Service Routine is tricky but it can provide THE way to make this RGB Leds matrix driven only by that CPU with few outputs”
I achieved the protodeck like that, progressively learning & making at the same time, encountering some solid walls but finally finding my way breaking them!
We all need huge motivation to make things, especially today. Indeed, all seem integrated, already made, and you have to twist your mind to understand : “Yes, I can make by myself exactly what I need !”
Applying theory, having fun, making things, helps to keep the motivation very high and helps to achieve totally crazy projects! People thought you were insane at the beginning and the same people think you are a guru, at the end.

AR: Describe one of your projects.

JB: The Musée de la Buzine in Marseille is a central point of the Mediterranean cinema. Early 2011, I worked on this project both as a software designer & an hardware developer.
The permanent exhibition is based on 7 rooms in which you can experience visuals, sounds contents.
The system is based on 24 computers and 1 server, everything being federated by a gigabit ethernet network.
There are also 7 touch screens, 10 video-projectors, 20 RFID readers, 7 arduino UNO & MEGA handling buttons and ultra-sonic sensors, and finally 2 multi channels sound systems. Yes, it is a huge installation.
Everything has been made using Max5 (also named Max/MSP before Max6)
Max/MSP is a graphical programming environment which means you can create softwares by connecting virtual boxes on your screen without typing one row of code, if you don’t like that. It is obviously totally possible to use JAVA, C++ and more inside of it.
Each system is based on the same model, in the museum. A kind of template I designed in order to provide similar features like OSC protocol communication system, RFID parsing routines for user language identification, jitter real time subtitling (subtitles on videos according to ID of RFID cards), especially.
The server is able to send command to all machines. This is a nice feature to be able to switch off all 24 computers in one click and to power on them using Wake On Lan too. Of course, everything is scheduled according to a calendar and is be automated.
Arduino takes a particularly important role in this global design.
Indeed, it adds new capabilities & skills to computers by giving them a way to feel our universe with sensors and to act on it too.
In this installation, Arduino are used on the simpler way.
They are reading buttons state. For instance, drawers contain secret switches: when you open a drawer, the switch is triggered and the reading loop circuit is opened too; the board detects that and send bytes to the computer via USB cable basically. The Max patch (= name of programs you make in Max) receives the bytes and act properly by triggering a video, a sound, both or lighting on something.
There is a nice machine installed there : a DMX / Ethernet router.
I can send special bytes over the network from my Max patch to this gear. The router then translates my messages into DMX pre-programmed sequences.
For instance, I wired an ultrasonic distance sensor, used as a presence detector. The Arduino check distance and when the distance is less than a particular value, it fires a specially byte to the computer. This one reacts by triggering a sound and a video on 2 video-projectors. It also sends another peculiar byte to the DMX Router and this one makes a very nice light sequences like fadin lights in different moody way in order to grant an immersive experience to users.

The presence of Arduino made this installation alive, by bringing computers to another level of interaction.
I enjoyed a lot in making this complex project and people seemed very satisfied by the result.

I have been asked to develop more installations like that and now I freely choose which offer to accept.

If you understood me correctly, you know I’ll choose only those with a really strong artistic matter & purpose

AR: What skills did you draw upon?

JB: This project involved a lot of different technology.
I programmed using:
– C with the Arduino IDE
– Max5, including javascript scripting and jitter openGL programming and MSP audio stuff too
I had to wire and solder a bit too, which was nice and made things more real, concrete, physical.
The main thing about this project is the fact I had to mix a lot of things together.
It was interesting to connect all these very open & efficient technologies.
Using open protocol like serial, OSC (Open Sound Control) was a very nice way to keep things simple and indeed, I wanted to keep things simple.
Designing huge projects doesn’t mean you have to raise the complexity.
Often, great & big projects are based on very simple bits.
My advice to readers: Keep it simple! Build some units, then connect them together progressively.
This is my credo when I’m teaching Arduino!

AR: When did you hear about Arduino, and when did you first start using it?

JB: I hear about Arduino as soon as I began to make my own hardwares (around 6 years ago)
It brought me into the hardware gear field.
I began by tweaking leds & buttons with the bonome, an RGB monome clone (http://julienbayle.net/bonome)
It was a nice project and I learned a lot about shift-registering, buttons matrices, LED matrices and especially RGB Leds.
Arduino is THE way to learn about electronic.
I also played a bit with MIDI & OSC protocol directly with Arduino board and I still have a couple of projects I’d like to make available a bit on the monome distribution model. These include a strange drone machine, a 8-bit synthesizer very raw and a little and led based sequencer but with a strong part including shuffling and random.
By diving in the Arduino world, you can easily learn the direct link between the code (software) and the wires (hardware)
The bootloader included in the chip provides a totally user friendly way to upload your C code from the IDE on your computer to the board.
It is useable out-of-the-box without following a 3 years University cycle !
I’ll spread the arduinoword around: it can easily make people learning about electronic and especially about making their own things.
Today we can follow the DIY way  easily because of people like Massimo Banzi, Tom Igoe and the whole community created by the Arduino Team.
They opened a road and gave people more motivation to design and build things themselves.

AR: Where can readers see your works, both past and present?

JB: I have 3 websites.
http://julienbayle.net is the main one. You can find there my blog, and all my communities connection like Soundcloud, Facebook and more.
http://protofuse.net is my music website which will be merged probably into http://julienbayle.net quite soon. Indeed, I’m known as protofuse on the IDM electronic scene.
http://designthemedia.com is my small company. I’m providing Ableton Live devices & max for live stuff.
I am currently writing a book on Arduino and this is the first official place where you see this news.
I’m writing for the very amazing publisher PACKT publishing and I’m really happy about that, enjoy writing, designing things and spreading the following words to the world as far as possible: “yes you can build your own machines without any big companies help !”

AR: What inspired you to make the thing you made?

JB: I’m both a technology-driven guy and a minimalism art admirer.

I guess you can find minimalism in everything I’m making, from the apparently totally complex stuff to the most easy one.
My work is a quest into minimalism & zen digital territories. My latest iOS application is a piece of work which can be felt like an artwork too.
I’m making a lot of ambient music and IDM music too and from the most syncopated rhythm to the most peaceful synthesize soundscape, I feel minimalism.
Artists like Autechre, Brian Eno, Pete Namlook, Aphex Twin, Arpanet, inspire me a lot.
I guess my whole design (sound design, music design, software & hardware design) is inspired by artists like them, but not only.
We definitively need more peace and more quietness in our world.
I’m just trying to find mine making my art and trying to bring my words to people too.

 

I wish a bright and peaceful future for Julien and I deeply thank him for the interview.

 

Bioshock custom rig is Big Daddy of pinball machines, gives players a taste of Rapture

If you're going to revisit a certain underwater dystopia, you might as well have a ball. At least that's the approach being taken by Sweden-based DIYer rasmadrak, who has decided to build a Bioshock-themed custom pinball machine just for kicks. The project is filled with lots of neat little touches from Rapture, including Little Sister vents and a few Big Daddy homages. The builder also does a pretty good job of drilling into the details and providing insight on the creation process -- like the challenge in using two different systems such as Arduino and chipKIT together, for example -- via detailed posts in the Poor Man's Pinball! blog. The project proved to be a pleasant shock to the system for fellow pinball aficionado Ben Heck, who gave the project a sprinkling of Heckendorn love via Twitter. Pinball geeks can also follow the saga, so to speak, by checking out the source link below.

Filed under: Gaming

Bioshock custom rig is Big Daddy of pinball machines, gives players a taste of Rapture originally appeared on Engadget on Sun, 19 Aug 2012 23:17:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments

Arduino Leonardo finally launches with new pin layout, lower price (video)

We caught our first glimpse at the new, simplified Arduino Leonardo at Maker Faire back in September of last year. At the time, we were promised a late October shipping date, but it failed to materialize. Finally, Massimo Banzi has taken the wraps off the slimmed down microcontroller and its now in stock at retailers across the web. The Leonardo sports a new pin layout, dubbed R3 (which the Uno has also been updated with), that will become standard across all Arduino boards. That's a big deal for shield makers who only have to design and manufacture an add-on once to ensure it's compatible with the entire product line. The new layout also adds some extra pins and versatility, especially in the realm of shields, which can use to the new IOREF pin to determine the voltage of the processor and thus its model. That means a shield doesn't have to be designed specifically with the new ARM-based Due in mind. The other big news is that the circuitry for converting USB to serial communication and the processor itself have been combined, which not only simplifies the design and drives down costs, but allows it to communicate directly with a computer and imitate all sorts of accessories (such as keyboards and mice). Best of all, is the price. The Leonardo, complete with headers, costs just $25 -- a good $10 less than the Uno -- while the headerless, solder-friendly version retails for $22.50. Check out the video after the break for a few more details from Massimo himself.

Continue reading Arduino Leonardo finally launches with new pin layout, lower price (video)

Filed under: Misc. Gadgets

Arduino Leonardo finally launches with new pin layout, lower price (video) originally appeared on Engadget on Mon, 23 Jul 2012 22:27:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments