<?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>Cantareus &#187; Electronics</title>
	<atom:link href="http://cantareus.com/category/electronics/feed/" rel="self" type="application/rss+xml" />
	<link>http://cantareus.com</link>
	<description></description>
	<lastBuildDate>Sat, 06 Mar 2010 07:29:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Y-axis for CNC Machine</title>
		<link>http://cantareus.com/2010/03/y-axis-for-cnc-machine/</link>
		<comments>http://cantareus.com/2010/03/y-axis-for-cnc-machine/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 07:07:31 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[CNC]]></category>
		<category><![CDATA[y-axis]]></category>

		<guid isPermaLink="false">http://cantareus.com/?p=151</guid>
		<description><![CDATA[I&#8217;ve mostly completed the y-axis now.  Just got to do the x-axis and attach a tool and then a few touch ups.

I used the motor control and optical encoder stuff from my plotter to control it for the video.



]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mostly completed the y-axis now.  Just got to do the x-axis and attach a tool and then a few touch ups.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/5TqsLv9YC1Q&amp;hl=en_US&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/5TqsLv9YC1Q&amp;hl=en_US&amp;fs=1&amp;color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I used the motor control and optical encoder stuff from my plotter to control it for the video.</p>
<p><a href="http://cantareus.com/wp-content/uploads/dscf2168.jpg"><img class="alignnone size-medium wp-image-154" title="Bearings" src="http://cantareus.com/wp-content/uploads/dscf2168-224x300.jpg" alt="" width="224" height="300" /></a></p>
<p><a href="http://cantareus.com/wp-content/uploads/dscf2169.jpg"><img class="alignnone size-medium wp-image-155" title="Motor" src="http://cantareus.com/wp-content/uploads/dscf2169-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://cantareus.com/wp-content/uploads/dscf2173.jpg"><img class="alignnone size-medium wp-image-156" title="Encoder" src="http://cantareus.com/wp-content/uploads/dscf2173-300x200.jpg" alt="" width="300" height="200" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2010/03/y-axis-for-cnc-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Z-Axis for CNC Machine</title>
		<link>http://cantareus.com/2010/02/z-axis-for-cnc-machine/</link>
		<comments>http://cantareus.com/2010/02/z-axis-for-cnc-machine/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 06:40:36 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://cantareus.com/?p=144</guid>
		<description><![CDATA[I&#8217;m in the process of making a CNC machine out of aluminium. The finished machine should be able to work with a 400&#215;400x60mm volume, I&#8217;m making it small because aluminium is very flexible and I not sure if I&#8217;ll be making anything much bigger than that. I&#8217;ve almost finished the z-axis mechanism. It uses a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of making a CNC machine out of aluminium. The finished machine should be able to work with a 400&#215;400x60mm volume, I&#8217;m making it small because aluminium is very flexible and I not sure if I&#8217;ll be making anything much bigger than that. I&#8217;ve almost finished the z-axis mechanism. It uses a DC motor and will have an optical encoder mounted to the thread. The optical encoders I&#8217;ll be using are from printers and generate  about 7200 counts per revolution which should give it more accuracy than stepper motors would.</p>
<p>Here&#8217;s a video of what I&#8217;ve got so far:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/jjHeLLnHDGA&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/jjHeLLnHDGA&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The movable part slides up and down a pair of stainless steel rods. There&#8217;s a bit of slack, but that might go away when I tighten everything up properly.</p>
<p>The X and Y axes will use skate bearings on aluminium angle.</p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2010/02/z-axis-for-cnc-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Printer to Plotter Conversion</title>
		<link>http://cantareus.com/2010/01/printer-to-plotter-conversion/</link>
		<comments>http://cantareus.com/2010/01/printer-to-plotter-conversion/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 10:17:00 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[plotter]]></category>
		<category><![CDATA[printer]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://cantareus.com/?p=117</guid>
		<description><![CDATA[
This is my latest project. Converting a broken Brother MFC-425CN into a small plotter. I used the paper feed mechanism and the printer head with the optical encoders and stripped everything else out of the printer. There are a lot of gears and stuff that are used for cleaning the print heads and pumping away [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://cantareus.com/wp-content/uploads/dscf2159.jpg"><img class="alignnone size-full wp-image-122" title="Plotter" src="http://cantareus.com/wp-content/uploads/dscf2159.jpg" alt="" width="614" height="461" /></a></p>
<p>This is my latest project. Converting a broken Brother MFC-425CN into a small plotter. I used the paper feed mechanism and the printer head with the optical encoders and stripped everything else out of the printer. There are a lot of gears and stuff that are used for cleaning the print heads and pumping away ink. There&#8217;s also a second paper feed for picking up the next sheet of paper from the paper tray these prevent the motor from running the same speed both ways.</p>
<p>The up/down movement of the pen is controlled with a small solenoid. Black tape and copper wire are used to hold everything together. The rubber band is to stop the pen jiggling.</p>
<p><a href="http://cantareus.com/wp-content/uploads/dscf2157.jpg"><img class="alignnone size-medium wp-image-120" title="Pen" src="http://cantareus.com/wp-content/uploads/dscf2157-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>A PIC18F2550 decodes the optical encoders to detect which way they are moving and keeps a track of the absolute position of the head and paper feed. The origin is the position everything is in when the usb plug is inserted. There&#8217;s a IR and photo diode underneath the print head that the printer uses to detect the paper.  I should write a routine to find the position of the corner of the paper and set this to the origin every time a new program is run.</p>
<p>One of the optical encoder was acting up. Based on the PCB from the printer I should have been able to use a pair of 10K pull-ups and put the outputs directly into the microcontroller. I should have measured the voltage at a few points on the original PCB while it was running before I destroyed it. I&#8217;m always too quick to destroy stuff. Another problem with the encoders is quickly decoding the position. When things are moving too quickly the microcontroller can&#8217;t keep up.</p>
<p>Driving the motors is done with a pair of h-bridges I built for a different project. These aren&#8217;t shown in the schematic because they aren&#8217;t very good. I&#8217;m might get a pair of motor driver ICs.</p>
<p><a href="http://cantareus.com/wp-content/uploads/plotter-schematic.png"><img class="alignnone size-large wp-image-118" title="Plotter Schematic" src="http://cantareus.com/wp-content/uploads/plotter-schematic-1024x635.png" alt="" width="614" height="381" /></a></p>
<p>The computer software loads a G-Code file and sends movement commands to the plotter. The plotter sends back it&#8217;s new position at the end of each command. This lets the computer know when it can send the next command. The software uses the RS274NGC G-code interpreter.  This can be downloaded from <a href="http://code.google.com/p/rs274ngc/">http://code.google.com/p/rs274ngc/</a>, it makes using G-Code a lot easier. I wasn&#8217;t sure how to handle the Z-Axis because the solenoid only has two positions, up and down. So it takes positive values as down and negative or zero values as up.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/qUV3xwgfZbU&amp;hl=en_US&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/qUV3xwgfZbU&amp;hl=en_US&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>There&#8217;s a bit of pixelation in the drawings. It&#8217;s really difficult to keep the speed of the motors constant. If I try to use PWM on them they whine and wont move.</p>
<p><a href="http://cantareus.com/wp-content/uploads/plotterdrawing.jpg"><img class="alignnone size-medium wp-image-123" title="Drawing" src="http://cantareus.com/wp-content/uploads/plotterdrawing-232x300.jpg" alt="" width="232" height="300" /></a></p>
<p>Printers are a great source for parts. This printer had</p>
<ul>
<li>2 DC motors</li>
<li>2 stepper motors</li>
<li>A rotary and a linear optical encoder</li>
<li>~10 photo gap detector thingies</li>
<li>A 350&#215;6mm stainless steel rod</li>
<li>Lots and lots of springs</li>
<li>Nylon gears</li>
<li>2 belts</li>
<li>A 30v DC power supply</li>
<li>A phone keypad that shouldn&#8217;t be two hard to separate from the rest of the electronics</li>
</ul>
<p>All for $1.</p>
<p>I&#8217;ve got another two almost identical Epson printers. I want to use the parts from those to make a simple CNC machine for my next project. Next up for this project though is creating a PCB and tiding everything up.</p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2010/01/printer-to-plotter-conversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hardware Random Number Generator with 18F2550</title>
		<link>http://cantareus.com/2009/09/hardware-random-number-generator-with-18f2550/</link>
		<comments>http://cantareus.com/2009/09/hardware-random-number-generator-with-18f2550/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 10:48:09 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://cantareus.com/?p=104</guid>
		<description><![CDATA[This is a hardware rng I made over the weekend. It uses my PSU based power supply for the 12v and -5v and USB for 5v.
It&#8217;s based on http://robseward.com/misc/RNG2/. The voltage is read using the ADC on a 18F2550 and the bits of the voltage are XORed together to create a single random bit. Von [...]]]></description>
			<content:encoded><![CDATA[<p>This is a hardware rng I made over the weekend. It uses my PSU based power supply for the 12v and -5v and USB for 5v.</p>
<p>It&#8217;s based on <a href="http://robseward.com/misc/RNG2/">http://robseward.com/misc/RNG2/</a>. The voltage is read using the ADC on a 18F2550 and the bits of the voltage are XORed together to create a single random bit. Von Neumann&#8217;s algorithm is used to remove bias which reduces the number of bits by 4 times, I&#8217;m not sure if this is necessary I&#8217;ll check it out tomorrow. The resulting bits are saved up in a buffer and then sent to the computer over usb. The digital to analog conversion really slows things down. I&#8217;m getting about 500 B/s. I might see if I can do it digitally.</p>
<p>Here are the results on 12MB of random data that took over 6 hours to generate.</p>
<table border="1" align="left">
<tbody>
<tr>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref33" target="_blank">Entropy (-&gt;8)</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref14" target="_blank">Birthday Spacing</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref16" target="_blank">Matrix Ranks</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref18" target="_blank">6&#215;8 Matrix Ranks</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref26" target="_blank">Minimum Distance Test</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref27" target="_blank">Random Spheres Test</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref28" target="_blank">The Sqeeze Test</a></td>
<td><a href="http://www.ee.oulu.fi/research/ouspg/frontier/sota/whitepaper-prng/#h-ref29" target="_blank">Overlapping Sums Test</a></td>
</tr>
<tr>
<td align="right">7.999986</td>
<td align="right" bgcolor="#ffcccc">0.000527</td>
<td align="right">0.665</td>
<td align="right">0.535</td>
<td align="right">0.945358</td>
<td align="right">0.287282</td>
<td align="right">0.802857</td>
<td align="right">0.128108</td>
</tr>
</tbody>
</table>
<p><a href="http://www.cacert.at/cgi-bin/rngresults">http://www.cacert.at/cgi-bin/rngresults</a></p>
<p>I&#8217;m not sure why it came close to failing that one test. It&#8217;s listed as &#8220;Potentially deterministic&#8221;.</p>
<p>This is the schematic I used:</p>
<div class="wp-caption alignnone" style="width: 310px"><img title="Schematic" src="/wp-content/rng-300x195.png" alt="Schematic" width="300" height="195" /><p class="wp-caption-text">Schematic</p></div>
<p>And the relevant part of the code:</p>
<blockquote>
<pre><span style="color: #000080;"><strong>if</strong></span>(currentbyte &lt; 64)
{
  randompair = 0;

  <strong><span style="color: #000080;">if</span></strong>(currentbit == 0)
    USB_Out_Buffer[currentbyte] = 0;

  <span style="color: #000080;"><strong>for</strong></span>(i = 0; i &lt; 2; i++)
  {
    Delay10TCYx(10);
    ConvertADC();
    <strong><span style="color: #000080;">while</span></strong>( BusyADC() );
    randombit = ReadADC();

    <strong><span style="color: #000080;">for</span></strong>(j = 1; j &lt; 10; j++)
      randombit ^= (randombit &gt;&gt; j) &amp; 1;  <span style="color: #008000;">//Messy, the assembly created to do this is too long.</span>

    randompair &lt;&lt;= 1;
    randompair |= randombit &amp; 1;
  }

  <strong><span style="color: #000080;">if</span></strong>(randompair == 2)
  {
    USB_Out_Buffer[currentbyte] |= 1 &lt;&lt; currentbit;
    currentbit++;
  }
  <strong><span style="color: #000080;">else if</span></strong>(randompair == 1)
    currentbit++;

  <strong><span style="color: #000080;">if</span></strong>(currentbit == 8){
    currentbit = 0;
    currentbyte++;                    
  }
}

<strong><span style="color: #000080;">if</span></strong>(mUSBUSARTIsTxTrfReady() &amp;&amp; currentbyte == 64)
{
  putUSBUSART(USB_Out_Buffer, 64);
  currentbyte = 0;
}</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2009/09/hardware-random-number-generator-with-18f2550/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>18f4550 and 18f2550 with Piklab and Ubuntu</title>
		<link>http://cantareus.com/2009/08/18f4550-and-18f2550-with-piklab-and-ubuntu/</link>
		<comments>http://cantareus.com/2009/08/18f4550-and-18f2550-with-piklab-and-ubuntu/#comments</comments>
		<pubDate>Fri, 14 Aug 2009 10:26:44 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://cantareus.com/?p=94</guid>
		<description><![CDATA[I&#8217;ve been trying to compile some usb examples for my little 18F2550 micro-controller for the last few days and now I&#8217;ve finally got it working. Here&#8217;s a few things to watch out for.
Don&#8217;t try and port mcc18 code to hitech&#8217;s pic18 compiler. I tried without any success even trying to use examples other people had [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying to compile some usb examples for my little 18F2550 micro-controller for the last few days and now I&#8217;ve finally got it working. Here&#8217;s a few things to watch out for.</p>
<p>Don&#8217;t try and port mcc18 code to hitech&#8217;s pic18 compiler. I tried without any success even trying to use examples other people had ported didn&#8217;t work at all.</p>
<p>Instead use Microchip&#8217;s MpLab C18 compiler under wine. Wine is a wrapper that lets you run Windows programs in Linux. Install wine using your package manager. There are some How To&#8217;s on the net for getting the c18 compiler to work with wine but I think they are old and they have many unnecessary steps. All I needed to do was install arial32.exe(search Google, download, right click &#8220;Open with wine&#8230;&#8221;) and download and install the latest MpLab C18 compiler.</p>
<p>When you select the C18 compiler in piklab use &#8220;configure toolchains&#8221; to tell piklab where to find everything. These are the paths I used:</p>
<blockquote><p>Executable Directory :<em>~</em>/.wine/dosdevices/c:/MCC18/bin/<br />
Header directory :<em>~</em>/.wine/dosdevices/c:/MCC18/h/<br />
Linker directory :<em>~</em>/.wine/dosdevices/c:/MCC18/bin/LKR/<br />
Library directory :<em>~</em>/.wine/dosdevices/c:/MCC18/lib/</p></blockquote>
<p>Under &#8220;Configure compilation&#8221; there are a few things to change. piklab thinks the linker files for mplink are called <em>&lt;devicename&gt;</em>.lkr. To fix this change the linker configuration to Custom then change %LKR_NAME to %DEVICE_g.lkr.</p>
<p>The linker also needs _CRUNTIME defined so that it includes the correct libraries. Not sure why this isn&#8217;t defined already. Look in the .lkr files to see what I mean. You get errors like this if it isn&#8217;t:</p>
<blockquote><p>Error &#8211; could not find definition of symbol &#8216;FSR2L&#8217; in file &#8216;./mouse.o&#8217;.</p></blockquote>
<p>Anyway just add /u_CRUNTIME to the linker parameters.</p>
<p>The usb examples that come with the Microchip Applications Library require a few extra c files to be compiled before they&#8217;ll run. If you don&#8217;t include these you&#8217;ll probably get an error like this:</p>
<blockquote><p>Error &#8211; could not find definition of symbol &#8216;USBDeviceTasks&#8217; in file &#8216;./mouse.o&#8217;.</p></blockquote>
<p>They should be in</p>
<blockquote><p>/home/<em>&lt;username&gt;</em>/.wine/dosdevices/c:/Microchip Solutions/Microchip/Usb</p></blockquote>
<p>Just copy the relevant files into your project directory and add them to your piklab project.</p>
<p>If you try to compile one of the usb examples for the 18F2550 the HardwareProfile.h file wont find a demo board it can use. I renamed &#8220;HardwareProfile &#8211; PICDEM FSUSB.h&#8221; to &#8220;HardwareProfile.h&#8221; and got rid of all references to Port D.</p>
<p>If you&#8217;ve gotten this far you should be able to build the project and program your micro-controller. The pickit 2 programmer included with piklab doesn&#8217;t seem to work. I do get this warning saying it might not:</p>
<blockquote><p>Connecting PICkit2 Firmware 2.x on USB Port with device 18F2550&#8230;<br />
Firmware version is 2.32.0<br />
The firmware version (2.32.0) is higher than the version tested with piklab (2.10.0). You may experience problems.</p></blockquote>
<p>Instead I use pk2cmd. You can set up Piklab to program your chip using pk2cmd by selecting &#8220;Custom Programmer&#8221;</p>
<p>I hope this info is helpful to anyone else. If it is let me know.</p>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 429px; width: 1px; height: 1px;">HardwareProfile &#8211; PICDEM FSUSB.h</div>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2009/08/18f4550-and-18f2550-with-piklab-and-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Power Supply</title>
		<link>http://cantareus.com/2009/07/power-supply/</link>
		<comments>http://cantareus.com/2009/07/power-supply/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 04:31:28 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://cantareus.wordpress.com/?p=93</guid>
		<description><![CDATA[Ok, first post of the year. That&#8217;s pretty bad, nevermind. Just posting my latest endevours.
Here&#8217;s a pic demonstrating it working. A 300w power supply being used to light an LED  
It really isn&#8217;t that difficult. I followed the guide to make it here:
http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-92" title="psu" src="http://cantareus.files.wordpress.com/2009/07/psu.jpg" alt="psu" width="500" height="375" />Ok, first post of the year. That&#8217;s pretty bad, nevermind. Just posting my latest endevours.</p>
<p>Here&#8217;s a pic demonstrating it working. A 300w power supply being used to light an LED <img src='http://cantareus.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>It really isn&#8217;t that difficult. I followed the guide to make it here:</p>
<p><a href="http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply">http://www.wikihow.com/Convert-a-Computer-ATX-Power-Supply-to-a-Lab-Power-Supply</a></p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2009/07/power-supply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lunchbot II</title>
		<link>http://cantareus.com/2008/10/lunchbot-ii/</link>
		<comments>http://cantareus.com/2008/10/lunchbot-ii/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 23:54:49 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[assembly]]></category>
		<category><![CDATA[lunchbot]]></category>
		<category><![CDATA[microcontroller]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://cantareus.wordpress.com/?p=73</guid>
		<description><![CDATA[I made my first microcontroller based robot over the weekend. It is far from finished. But it can drive around randomly. Getting something to move randomly was harder than it should have been. I realised overnight that I don&#8217;t actually need a random number generator if I want it to appear to move randomly. I [...]]]></description>
			<content:encoded><![CDATA[<p>I made my first microcontroller based robot over the weekend. It is far from finished. But it can drive around randomly. Getting something to move randomly was harder than it should have been. I realised overnight that I don&#8217;t actually need a random number generator if I want it to appear to move randomly. I just need to use any function that is chaotic.</p>
<p>The motors are controlled using two h-bridges. I&#8217;ve used BD139 and BD140 transistors. They can handle a continuous current of 1.5A. That will be enough for the toy motors I am using.</p>
<p>A PIC16F505 Microchip microcontroller is the brains behind my robot. It&#8217;s a pretty limited chip. It has room for 1024 12-bit instructions and 72 bytes of RAM. I&#8217;ll replace it once I need some extra functionality. I started writing the code in C but I had lots of problems with it. Certain math functions seem to freeze up and I kept getting confusing errors. So I&#8217;m re-writing it in assembly using <a href="http://gputils.sourceforge.net/">gputils</a>.</p>
<p><a href="http://cantareus.files.wordpress.com/2008/10/dscf1196.jpg"><img class="aligncenter size-large wp-image-77" title="Lunchbot" src="http://cantareus.files.wordpress.com/2008/10/dscf1196.jpg?w=500" alt="" width="500" height="374" /></a></p>
<p>As you can see, there isn&#8217;t much to it. Eight transistors to control two motors with a few diodes and resistors and the microcontroller. The container has lots of room to add a big PCB later. In the top right corner you can see a capacitor with the battery leads connected to it. That&#8217;s the power switch. When I want to turn it on I plug that into the breadboard. It&#8217;s a bit crude, I&#8217;ll probably plug it in the wrong way or in the wrong place and fry everything knowing my luck.</p>
<p>I have a few plans for this little robot in the future. I want to give it more brains than any lunch box should ever have. It&#8217;ll be able to create maps and mark locations of interest. I&#8217;ll attempt to make it appear curious so when it finds something it hasn&#8217;t seen before it will keep going back until it isn&#8217;t new anymore. Hopefully I&#8217;ll make more than one and have them communicate via beeps or flashy lights. Then they can follow each other around and have twice as much fun.</p>
<p>I also want it to be able to recharge itself by homing in on a charging station that sends out a beacon.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="350" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/P9dTUph_l8Y" /><embed type="application/x-shockwave-flash" width="425" height="350" src="http://www.youtube.com/v/P9dTUph_l8Y"></embed></object></p>
<p>I only had a 8-bit &#8220;random&#8221; number generator when I videoed this. So It repeats itself twice in that short time.</p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2008/10/lunchbot-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robolympics</title>
		<link>http://cantareus.com/2008/10/robolympics/</link>
		<comments>http://cantareus.com/2008/10/robolympics/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 07:13:06 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[Uni]]></category>
		<category><![CDATA[line follower]]></category>
		<category><![CDATA[lunchbot]]></category>
		<category><![CDATA[massey]]></category>
		<category><![CDATA[robolympics]]></category>
		<category><![CDATA[robot]]></category>

		<guid isPermaLink="false">http://cantareus.wordpress.com/?p=55</guid>
		<description><![CDATA[Today was the competition day for the robots we built in our first year engineering class. I&#8217;m not sure the event deserves to be called robolympics but nevermind. It was fun. We didn&#8217;t win  
Our robot was too slow and the gearbox fell apart during one of the six events. It was also the [...]]]></description>
			<content:encoded><![CDATA[<p>Today was the competition day for the robots we built in our first year engineering class. I&#8217;m not sure the event deserves to be called robolympics but nevermind. It was fun. We didn&#8217;t win <img src='http://cantareus.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Our robot was too slow and the gearbox fell apart during one of the six events. It was also the event that ours was going to do well in. Line following a spiral in and out. We made it half way. Only one team completed it properly. It&#8217;s a pity.</p>
<p>These robots are really really dumb. All the can do is crudely follow a line and back up and turn when they run into an obstacle.</p>
<p>I think our robot was the best looking. It has personality <img src='http://cantareus.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://cantareus.files.wordpress.com/2008/10/dscf1168.jpg"><img class="aligncenter size-large wp-image-56" title="Spiral" src="http://cantareus.files.wordpress.com/2008/10/dscf1168.jpg?w=500" alt="" width="500" height="374" /></a></p>
<p><a href="http://cantareus.files.wordpress.com/2008/10/dscf1163.jpg"><img class="aligncenter size-large wp-image-57" title="Spiral" src="http://cantareus.files.wordpress.com/2008/10/dscf1163.jpg?w=500" alt="" width="500" height="374" /></a></p>
<p><a href="http://cantareus.files.wordpress.com/2008/10/dscf1166.jpg"><img class="aligncenter size-large wp-image-58" title="Maze" src="http://cantareus.files.wordpress.com/2008/10/dscf1166.jpg?w=500" alt="" width="500" height="374" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2008/10/robolympics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cycle Computer</title>
		<link>http://cantareus.com/2008/09/cycle-computer/</link>
		<comments>http://cantareus.com/2008/09/cycle-computer/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 09:35:33 +0000</pubDate>
		<dc:creator>Cantareus</dc:creator>
				<category><![CDATA[Electronics]]></category>

		<guid isPermaLink="false">http://cantareus.wordpress.com/?p=44</guid>
		<description><![CDATA[I lost the cycle computer for my bike a few months ago and haven&#8217;t the money to replace it. I used it as a pocket watch and that&#8217;s why I lost it. I&#8217;ve had a few ideas for projects lately and I think I can incorporate them into a neat bloggable project. A new cycle [...]]]></description>
			<content:encoded><![CDATA[<p>I lost the cycle computer for my bike a few months ago and haven&#8217;t the money to replace it. I used it as a pocket watch and that&#8217;s why I lost it. I&#8217;ve had a few ideas for projects lately and I think I can incorporate them into a neat bloggable project. A new cycle computer. Features:</p>
<ul>
<li>Heart rate monitor, using IR light to detect pulse. I&#8217;m not sure how well this works yet.</li>
<li>Logging to a microSD card. They are really cheap now, a 2GB card would store a lot of stats I imagine. The FAT file system isn&#8217;t too complex and it means no fancy software is needed to capture the log.</li>
<li>Output via morse code, if I don&#8217;t need to take it out of my pocket to get the time I shouldn&#8217;t lose it.</li>
<li>Cycling cadence and speed.</li>
<li>Tactile output, silent.</li>
</ul>
<p>I&#8217;ll probably be building it in this order. So by the end of the week I should have some photos and oscilloscope screen captures showing something that resembles a pulse.</p>
]]></content:encoded>
			<wfw:commentRss>http://cantareus.com/2008/09/cycle-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
