<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>http://mrbichel.com &#187; Electronics</title>
	<atom:link href="http://mrbichel.com/category/electronics/feed/" rel="self" type="application/rss+xml" />
	<link>http://mrbichel.com</link>
	<description>Johan Bichel Lindegaards personal webspace</description>
	<lastBuildDate>Thu, 02 Sep 2010 07:48:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Simple HIFI amplifier</title>
		<link>http://mrbichel.com/2010/09/simple-amp/</link>
		<comments>http://mrbichel.com/2010/09/simple-amp/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 22:29:24 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[Architecture & Design]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[41hz]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[amp6-basic]]></category>
		<category><![CDATA[amplifier]]></category>
		<category><![CDATA[hifi]]></category>
		<category><![CDATA[smps]]></category>

		<guid isPermaLink="false">http://mrbichel.com/?p=366</guid>
		<description><![CDATA[Almost a year ago I soldered up a pcb and ordered parts for putting together a small simplistic HIFI amplifier. Just recently I rediscovered the old project and finally got around to complete it. The amplifier is based on the amp6-basic 2 x 25 W chip amp from 41hz connected to a standard switch mode [...]]]></description>
			<content:encoded><![CDATA[<p>Almost a year ago I soldered up a pcb and ordered parts for putting together a small simplistic HIFI amplifier. Just recently I rediscovered the old project and finally got around to complete it.</p>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/09/ampbestdark_blog-450x265.jpg" alt="" title="ampbestdark_blog" width="450" height="265" class="aligncenter size-medium wp-image-369" /></p>

<p>The amplifier is based on the <a href="http://shop.41hz.com/shop/item.asp?catid=13&amp;itemid=43">amp6-basic</a> 2 x 25 W chip amp from 41hz connected to a standard switch mode power supply.  It&#8217;s supplied only with a mini-jack input since thats what my ipod, phone and mac use anyway. A DACT Type 23 50K stepped attenuator acts as volume control. I put it all together in an anodized aluminum chassis with a thick custom frontplate.</p>

<div id="attachment_371" class="wp-caption aligncenter" style="width: 460px"><img src="http://mrbichel.com/wp-content/uploads/2010/09/IMG_4047_blog-450x300.jpg" alt="" title="Amplifier components" width="450" height="300" class="size-medium wp-image-371" /><p class="wp-caption-text">Components laid out</p></div>

<p>I cut out the various holes in the back and frontplate using regular twist bits and flat wood bits on a column drill. I finished off the non round cutouts using a file. I ended up using a few hours with a dremmel to cut out the frontplate for the volume knob because I didn&#8217;t have a wide enough drill bit around. It turned out quite rough but I tried to use it as a design feature engraving the whole frontplate with the dremmel. I also mounted a blue LED as an on-off indicator, with a rather large resistor 13K Ohm to avoid it illuminating my whole room at nighttime.</p>

<p>I supply the amp6-basic with about 14 V which it can easily handle if it&#8217;s rather efficiently cooled. I mounted it to an aluminum plate in the side of the chassis furthest from the SMPS with cooling paste on the back of the chip. The power cables are wound around a large ferrite which should in theory reduce the noise.</p>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/09/IMG_4202_blog-450x674.jpg" alt="" title="IMG_4202_blog" width="450" height="674" class="aligncenter size-medium wp-image-377" /></p>

<p>The expenses add up to around DKK 1500 (~EUR 200). I am using the amplifier with two small Dali speakers and I am very satisfied with the overall sound quality.</p>
]]></content:encoded>
			<wfw:commentRss>http://mrbichel.com/2010/09/simple-amp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackline for KulturSydhavn</title>
		<link>http://mrbichel.com/2010/08/slackline-for-kultursydhavn/</link>
		<comments>http://mrbichel.com/2010/08/slackline-for-kultursydhavn/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:35:51 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[Architecture & Design]]></category>
		<category><![CDATA[Electronics]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[illutron]]></category>
		<category><![CDATA[interaction]]></category>
		<category><![CDATA[kultursydhavn]]></category>
		<category><![CDATA[slackline]]></category>

		<guid isPermaLink="false">http://accidentdesigns.com/?p=268</guid>
		<description><![CDATA[I did a small interactive slackline project for KulturSYDHavn. A festival on the quay of Teglholmen and around the Illutron barge in conjunction with the annual KulturHavn festival on Islands Brygge on the 6, 7 and 8th of August. We created an interactive playground around the barge and together with Illutron I put up the [...]]]></description>
			<content:encoded><![CDATA[<p>I did a small interactive slackline project for <a href="http://KulturSYDHavn.dk/" title="KulturSYDHavn">KulturSYDHavn</a>. A festival on the quay of Teglholmen and around the <a href="http://illutron.dk/" title="Illutron">Illutron</a> barge in conjunction with the annual KulturHavn festival on Islands Brygge on the 6, 7 and 8th of August. We created an interactive playground around the barge and together with Illutron I put up the slackline with RGB color feedback on the quay. I owe a great thanks to the Illutron crew who put a lot of energy into this festival, especially Troels Just Christoffersen who helped put the last pieces of the slackline installation up while I was gone in the week preceeding the festival. And I owe a thanks to the sponsors who made it possible, <a href="http://slackline.dk/" title="Slackline.dk">Slackline.dk</a> and <a href="http://rullegraesset.dk/" title="Rullegræsset.dk">Rullegræsset.dk</a> who sponsored a free feet slacklight15 kit and 1 metric ton of roll out grass respectively.</p>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/08/4883660866_091a4c9434_b-450x300.jpg" alt="" title="4883660866_091a4c9434_b" width="450" height="300" class="aligncenter size-medium wp-image-364" /></p>

<h2>Documentation</h2>

<p>The slackline is hooked up to a strain gauge that measures the weight on the slackline. An Op-Amp amplifies the signal for the arduino and two pieces of flexible high intensity RGB led strip are controlled with PWM via a ULN2003 Darlington transistor array.</p>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/08/IMG_2970forblog-450x300.jpg" alt="" title="Op-Amp and Network IC" width="450" height="300" class="aligncenter size-medium wp-image-350" /></p>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/08/4834895638_56744fa062_b-450x300.jpg" alt="" title="Arduino shields" width="450" height="300" class="aligncenter size-medium wp-image-354" /></p>

<h3>Schematics</h3>

<p><img src="http://mrbichel.com/wp-content/uploads/2010/08/ULN2003_schematic-450x399.png" alt="" title="ULN2003_schematic" width="450" height="399" class="aligncenter size-medium wp-image-348" /></p>

<h3>Code</h3>

<pre><code>// KulturSYDHavn Illutron Interactive slackline code by Johan Bichel Lindegaard

float h;
int h_int;
int r=0, g=0, b=0, intensity=100;
void h2rgb(float h, int &amp;R, int &amp;G, int &amp;B);

// Select which analog input the strain gauge is connected to.
const int mPin = 0;

int m = 0;
int state = 0; // 0: inactive, 1: active, 3: pending inactive
int deactivationThreshold = 8;
int deactivationTime = 1000;
unsigned long stateTimeStamp;
unsigned long stateTime = 0;

// Select which PWM-capable pins are to be used.
const int redPin = 10;
const int greenPin = 11;
const int bluePin = 9;

long brbgPreviousMillis = 0;
long fadePreviousMillis = 0;
boolean blinkState = 0;
boolean fadeUp = 0;

// range calibration variables.
int lowPoint;
int highPoint;

void setup()          
{
  // start serial port at 9600 bps:
  // Serial.begin(9600);

  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);

  // calibrate
  lowPoint = analogRead(mPin);
  highPoint = lowPoint + 124;
  if(highPoint &gt; 1024) {
    highPoint = 1024;
  }

  // test pins
  rgb(255,0  ,0  ); delay(500);
  rgb(0  ,255,0  ); delay(500);
  rgb(0  ,0  ,255); delay(500);
}

void loop()
{  
    int m = analogRead(mPin);

    // Check calibration, and expand range if needed.
    if(m &lt; lowPoint) {
      lowPoint = m;
    } else if(m &gt; highPoint) {
      highPoint = m;
    }

    // Serial.println(m);

    // keep track of how long the line has been active and inactive
    if(m &gt; lowPoint + deactivationThreshold) {
      if(state == 0) {
        state = 1;
        stateTimeStamp = millis();
      }
      stateTime = millis() - stateTimeStamp;     
    } else if(state == 1){
      state = 3;
      stateTimeStamp = millis();
    } else {
      stateTime = millis() - stateTimeStamp;
      if(stateTime &gt; deactivationTime) {
        state = 0;
      }     
    }

    if(state != 0){

      // Convert input to RGB through hue then output.
      h = ((float)map(m, lowPoint, highPoint, 1024, 0))/1024;
      h_int = (int) 360*h;
      h2rgb(h,r,g,b);

      // if active for a short while enter fancy blink mode then return to normal
      if(stateTime &gt; 15000 &amp;&amp; stateTime &lt; 60000) {
        int btime = map(stateTime,15000,60000,1000,50);
        brgb(r,g,b,btime);       
      } else {
        rgb(r,g,b);
      }

    } else {      
      unsigned long currentMillis = millis();
      if(currentMillis - fadePreviousMillis &gt; 100) {
        fadePreviousMillis = currentMillis;

        if(intensity &gt; 99) { fadeUp = false;
        } else if (intensity &lt; 1) {
          fadeUp = true; }         

        if(fadeUp) {  ++intensity;
        } else {      --intensity; } 

        rgb(255,0,0,intensity);   
      }

   }   
}

void rgb(int r, int g, int b) {
  analogWrite(redPin,r);
  analogWrite(greenPin,g);
  analogWrite(bluePin,b); 
}

void rgb(int r, int g, int b, float intensity) {
  if(intensity &gt; 100) {
    intensity = 100;
  } else if(intensity &lt; 0){
    intensity = 0; 
  }

  rgb(r/100*intensity, g/100*intensity, b/100*intensity);  
}

void brgb(int r, int g, int b, int interval) {
  unsigned long currentMillis = millis();
  if(currentMillis - brbgPreviousMillis &gt; interval) {
    brbgPreviousMillis = currentMillis;
    if (!blinkState) {
      blinkState = 1;
      rgb(r,g,b);
    } else {
      blinkState = 0;
      rgb(0,0,0);
    }
  }
}

void h2rgb(float H, int&amp; R, int&amp; G, int&amp; B) {

  int var_i;
  float S=1, V=1, var_1, var_2, var_3, var_h, var_r, var_g, var_b;

  if ( S == 0 )                       //HSV values = 0 √∑ 1
  {
    R = V * 255;
    G = V * 255;
    B = V * 255;
  }
  else
  {
    var_h = H * 6;
    if ( var_h == 6 ) var_h = 0;      //H must be &lt; 1
    var_i = int( var_h ) ;            //Or ... var_i = floor( var_h )
    var_1 = V * ( 1 - S );
    var_2 = V * ( 1 - S * ( var_h - var_i ) );
    var_3 = V * ( 1 - S * ( 1 - ( var_h - var_i ) ) );

    if      ( var_i == 0 ) {
      var_r = V     ;
      var_g = var_3 ;
      var_b = var_1 ;
    }
    else if ( var_i == 1 ) {
      var_r = var_2 ;
      var_g = V     ;
      var_b = var_1 ;
    }
    else if ( var_i == 2 ) {
      var_r = var_1 ;
      var_g = V     ;
      var_b = var_3 ;
    }
    else if ( var_i == 3 ) {
      var_r = var_1 ;
      var_g = var_2 ;
      var_b = V     ;
    }
    else if ( var_i == 4 ) {
      var_r = var_3 ;
      var_g = var_1 ;
      var_b = V     ;
    }
    else                   {
      var_r = V     ;
      var_g = var_1 ;
      var_b = var_2 ;
    }

    R = (1-var_r) * 255;                  //RGB results = 0 √∑ 255
    G = (1-var_g) * 255;
    B = (1-var_b) * 255;
  }
}
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://mrbichel.com/2010/08/slackline-for-kultursydhavn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screaming Potter</title>
		<link>http://mrbichel.com/2010/07/screaming-potter/</link>
		<comments>http://mrbichel.com/2010/07/screaming-potter/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 15:32:19 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[arduino]]></category>

		<guid isPermaLink="false">http://mrbichel.com/?p=285</guid>
		<description><![CDATA[Together with Troels Just Christoffersen I hacked together a screaming potter. The idea is to create the impression that some kind of screeching creature is living within the potter. The schematic and code are simple, a photoresistor activates the speaker when its subjected to light. Schematic Arduino code int photoResistorPin = 0; int startThreshold = [...]]]></description>
			<content:encoded><![CDATA[<p>Together with Troels Just Christoffersen I hacked together a screaming potter. The idea is to create the impression that some kind of screeching creature is living within the potter. The schematic and code are simple, a photoresistor activates the speaker when its subjected to light.</p>

<h3>Schematic</h3>

<div id="attachment_317" class="wp-caption aligncenter" style="width: 410px"><a href="http://mrbichel.com/wp-content/uploads/2010/07/screampotter_schem.png"><img src="http://mrbichel.com/wp-content/uploads/2010/07/screampotter_schem.png" alt="Schematics for Screaming Potter" title="screampotter_schem" width="400" class="size-full wp-image-317" /></a><p class="wp-caption-text">Schematic</p></div>

<h3>Arduino code</h3>

<pre><code>int photoResistorPin = 0;
int startThreshold = 4;
int speakerPin = 9;
int active = false;
int activationTime;

void setup() {
    Serial.begin(9600);
}

void loop() {
    int lightReading = analogRead(photoResistorPin);
    if(lightReading &gt; startThreshold) {
        // when first activated set timestamp
        if(active == false) {
            activationTime = millis(); 
            active = true; 
        }
        // the time could be usd to create more variation in the sound 
        // int runtime = millis()-activationTime;

        for (int i = 0; i &lt; 6; i++) {
            int frequency = lightReading*i;
            Serial.println(frequency);     
            tone(speakerPin, frequency);
            delayMicroseconds(500);
        }
    } else {  
        noTone(speakerPin);  
    }
}  
</code></pre>

<p><a href="http://mrbichel.com/wp-content/uploads/2010/07/screaming_potter.jpg"><img src="http://mrbichel.com/wp-content/uploads/2010/07/screaming_potter.jpg" alt="" title="screaming_potter" width="600" height="299" class="aligncenter size-full wp-image-334" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mrbichel.com/2010/07/screaming-potter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KEPS and the MakerBot</title>
		<link>http://mrbichel.com/2010/01/keps-and-the-makerbot/</link>
		<comments>http://mrbichel.com/2010/01/keps-and-the-makerbot/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 23:42:12 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[3D printer]]></category>
		<category><![CDATA[KEPS]]></category>
		<category><![CDATA[MakerBot]]></category>
		<category><![CDATA[Republikken]]></category>

		<guid isPermaLink="false">http://accidentdesigns.com/?p=245</guid>
		<description><![CDATA[Republikken has started up KEPS a department of their coworking space in copenhagen for digital fabrication. To get KEPS going and also equip it with a 3D printer I and a few other interested peeks joined up to construct a MakerBot. We have been meeting for a few hours every week for a bit over [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://republikken.net/index.php?option=com_content&#038;view=section&#038;layout=blog&#038;id=14&#038;Itemid=128">Republikken</a> has started up <a href="http://www.keps.dk/archives/96">KEPS</a> a department of their coworking space in copenhagen for digital fabrication. To get KEPS going and also equip it with a 3D printer I and a few other interested peeks joined up to construct a <a href="http://www.makerbot.com/">MakerBot</a>. We have been meeting for a few hours every week for a bit over a month now and the project is nearing completion.</p>

<p><a href="http://www.flickr.com/photos/53678031@N00/4155858447/sizes/m/in/set-72157622751603163/"><img alt="" src="http://farm3.static.flickr.com/2748/4155858447_76c0156b35.jpg" title="MakerBot" class="alignnone" width="332" height="500" /></a></p>

<p>I am looking forward to experiment with some plastic extrusion when its done.</p>

<p><a href="http://www.flickr.com/photos/53678031@N00/4252412530/in/set-72157622751603163"><img alt="" src="http://farm3.static.flickr.com/2447/4252412530_23e1772f9b.jpg " title="Johan soldering" class="alignnone" width="332" height="500" /></a></p>

<p>Republikken is a coworking space in Copenhagen for creative freelancers. It is a great place and I would definitely consider getting a desk there had I more business.</p>
]]></content:encoded>
			<wfw:commentRss>http://mrbichel.com/2010/01/keps-and-the-makerbot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DIY amplifier for boombox</title>
		<link>http://mrbichel.com/2009/06/diy-amplifier-for-boombox/</link>
		<comments>http://mrbichel.com/2009/06/diy-amplifier-for-boombox/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 19:39:58 +0000</pubDate>
		<dc:creator>Johan</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[amp6-basic]]></category>
		<category><![CDATA[amplifier]]></category>
		<category><![CDATA[boombox]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[stereo]]></category>

		<guid isPermaLink="false">http://accidentdesigns.com/?p=178</guid>
		<description><![CDATA[Me and my friends wanted some sound in our camp at this years Roskilde Festival so I set out to build us a boombox. I ordered an amp6-basic kit from 41hz.com because of the many recommendations I have read and because the kit comes with mostly through hole components and is relatively easy to solder. [...]]]></description>
			<content:encoded><![CDATA[<p>Me and my friends wanted some sound in our camp at this years <a href="http://roskilde-festival.dk/uk/">Roskilde Festival</a> so I set out to build us a boombox.</p>

<p>I ordered an amp6-basic kit from <a href="http://41hz.com">41hz.com</a> because of the many recommendations I have read and because the kit comes with mostly through hole components and is relatively easy to solder.</p>

<p>After soldering i mounted the amp in an aluminum plate from an recycled aluminum profile. It was quite a revelation to discover how forgiving aluminum is as a material. I have added a 50k Ohm stereo log pot for volume control a stereo minijack input and a switch that i wired to the 12V input since it didn&#8217;t seem to produce any noticeably larger turn on thumbs than the sleep jumper. I somehow managed to reverse the volume pot, meaning you turn it up rotating against the clock, and the power level seems to max out when turned half way around. It is not important for this amp, but for the next one I will look into improving the volume control, perhaps using an attenuator and an active preamplifier &#8211; can anyone point me to a good DIY volume control or preamplifier guide/advice? Currently the amp is powered by a screw machine battery but we are planning to bring a car battery to power it during the upcoming festival.</p>


<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1003/' title='amp6-basic_1003'><img width="150" height="76" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1003.jpg" class="attachment-thumbnail" alt="Amp6-basic components" title="amp6-basic_1003" /></a>
<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1005/' title='amp6-basic_1005'><img width="150" height="98" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1005.jpg" class="attachment-thumbnail" alt="Bottom side of PCB with caps soldered" title="amp6-basic_1005" /></a>
<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1006/' title='amp6-basic_1006'><img width="150" height="95" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1006.jpg" class="attachment-thumbnail" alt="PCB from top with resistors and caps" title="amp6-basic_1006" /></a>
<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1007/' title='amp6-basic_1007'><img width="150" height="96" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1007.jpg" class="attachment-thumbnail" alt="Through hole capacitors and a few resistors soldered" title="amp6-basic_1007" /></a>
<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1025/' title='amp6-basic_1025'><img width="150" height="124" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1025.jpg" class="attachment-thumbnail" alt="The amp6-basic mounted to a recycled aluminium profile" title="amp6-basic_1025" /></a>
<a href='http://mrbichel.com/2009/06/diy-amplifier-for-boombox/img_1027/' title='amp6-basic_1027'><img width="150" height="76" src="http://mrbichel.com/wp-content/uploads/2009/06/img_1027.jpg" class="attachment-thumbnail" alt="My Amp6-basic powered by a screwdriver battery" title="amp6-basic_1027" /></a>


<p>The amp sounds great, and is loud enough even through 8 Ohm, and being a class T amp it is very efficient thus giving us many hours of music on a recharge.</p>

<p>Next up is encasing the amp and speakers providing it with weather protection and fitting it with wheels, i am hoping to find some large bicycle wheels. Right now i am considering a light design using two 8 Ohm compact speakers, or using 2 heavier 4 Ohm speakers, they are very old and rated to 15W RMS which is not quite as much as the 25W RMS the amp outputs through 4 Ohm, I am not sure if this will be a problem.</p>

<p>On a side-note fooling around with electronics for the past 6 months i have been wondering why we are not all running with 12V DC as mains. I suspect there are a few reasonable arguments but i haven&#8217;t been able to find them.</p>
]]></content:encoded>
			<wfw:commentRss>http://mrbichel.com/2009/06/diy-amplifier-for-boombox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
