<?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"
	>

<channel>
	<title>Neuro spaghetti</title>
	<atom:link href="http://www.epokh.org/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.epokh.org/blog</link>
	<description>reflexions about artificial life and cybernetic</description>
	<pubDate>Sun, 16 Jan 2011 19:55:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>Linux and hametech USB GSM module from RF online</title>
		<link>http://www.epokh.org/blog/?p=357</link>
		<comments>http://www.epokh.org/blog/?p=357#comments</comments>
		<pubDate>Sun, 16 Jan 2011 19:14:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[usb gsm]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=357</guid>
		<description><![CDATA[I have bought a USB GSM modem from RF online a UK distributor of several RF products.
This interesting GSM modem is manufactured by Hametech, a Shenzen based company.
It is a very interesting module and the software drivers are included in the disk partition.
Most importantly it is supported by the linux kernel until version 2.4.32.
Now guess [...]]]></description>
			<content:encoded><![CDATA[<p>I have bought a USB GSM modem from <a href="http://www.rfsolutions.co.uk/acatalog/USB_GSM_Modem.html">RF online</a> a UK distributor of several RF products.</p>
<p><img class="alignleft" title="usb gsm modem" src="http://www.rfsolutions.co.uk/acatalog/GMS-USB-EDGE-200.jpg" alt="" width="200" height="206" />This interesting GSM modem is manufactured by Hametech, a Shenzen based company.</p>
<p>It is a very interesting module and the software drivers are included in the disk partition.</p>
<p>Most importantly it is supported by the linux kernel <span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; font-family: 'Times New Roman'; color: #000000;"><span class="Apple-style-span" style="font-size: 14px; font-family: Arial,Helvetica,sans-serif;">until version 2.4.32.</span></span></p>
<p>Now guess what?</p>
<p>On my latest Kubuntu 10.04 LTS it doesn&#8217;t work, so this is what I did to solve the problem.</p>
<p>This is my configuration:</p>
<blockquote><p><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; font-family: 'Times New Roman'; color: #000000;"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 14px; font-family: arial,sans-serif;">Linux epokh-quad 2.6.32-27-generic #49-Ubuntu SMP Wed Dec 1 23:52:12 UTC 2010 i686 GNU/Linux<br />
No LSB modules are available.<br />
Distributor ID: Ubuntu<br />
Description:    Ubuntu 10.04.1 LTS<br />
Release:        10.04<br />
Codename:       lucid</span></span></p></blockquote>
<div>This is what happen when you connect it:</div>
<div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><p>[ 5897.040178] usb 1-5.2: reset full speed USB device using ehci_hcd and address 5<br />
[ 5897.219533] usb 1-5.2: read over firmware interface failed: -32<br />
[ 5897.308179] usb 1-5.2: reset full speed USB device using ehci_hcd and address 5<br />
[ 5897.486935] zd1211rw: probe of 1-5.2:1.0 failed with error -32<br />
[ 5897.486976] usbcore: registered new interface driver zd1211rw<br />
[ 5897.538779] Initializing USB Mass Storage driver&#8230;<br />
[ 5897.538923] scsi6 : SCSI emulation for USB Mass Storage devices<br />
[ 5897.539113] usbcore: registered new interface driver usb-storage<br />
[ 5897.539117] USB Mass Storage support registered.<br />
[ 5897.553850] usb-storage: device found at 5<br />
[ 5897.553854] usb-storage: waiting for device to settle before scanning<br />
[ 5902.552777] usb-storage: device scan complete<br />
[ 5902.553591] scsi 6:0:0:0: CD-ROM            Philips  Dev. 0 LUN 0     1.0  PQ: 0 ANSI: 0<br />
[ 5902.562622] sr1: scsi-1 drive<br />
[ 5902.563827] sr 6:0:0:0: Attached scsi CD-ROM sr1<br />
[ 5902.564303] sr 6:0:0:0: Attached scsi generic sg2 type 5</p></blockquote>
<p>So as you can see the kernel only recognizes the usb-storage function but not the usb-serial interface!</p>
<div>A quick lsusb gives me:</div>
<div>
<div style="border-collapse: collapse; font-family: arial,sans-serif; font-size: 13px;">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><p>Bus 007 Device 003: ID 0471:1237 Philips TalkTalk SNU5630NS/05 802.11bg</p></blockquote>
</div>
</div>
<p>So we know that the vendor id is 0&#215;0471 and the product id is 0&#215;1237.</p>
<p>Now you can try to load manually the usbserial module with that ID:</p>
<blockquote><p><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; font-family: 'Times New Roman'; color: #000000;"><span class="Apple-style-span" style="border-collapse: collapse; font-size: 13px; font-family: arial,sans-serif;">usbserial vendor=0&#215;0471 product=0&#215;1237</span></span></p></blockquote>
<p>However this doesn&#8217;t work because the usb gsm modem requires a special string that will enable the serial connection BEFORE the module is loaded!</p>
<p>Draisberghof spent a considerable time eavesdropping at windows drivers of such devices and wrote an interesting script <a href="http://www.draisberghof.de/usb_modeswitch/#intro">USB_ModeSwitch</a> which takes the important parameters from a configuration file and does all the initialization and communication stuff for you.</p>
<p>The tool is already in the official repositories so to install just type:</p>
<blockquote><p>sudo apt-get install usb_modeswitch</p></blockquote>
<p>After the installation if you just type:</p>
<blockquote><p>sudo usb_modeswitch</p></blockquote>
<p>The program will tell you that the /etc/usb-modeswitch.conf is not present.</p>
<p>So we need to tell him which device is actually connected into the usb port, there is a list of ready-made configuration files in:</p>
<blockquote><p>cd /etc/usb_modeswitch.d/</p></blockquote>
<p>So we only need to copy our device&#8217;s configuration:</p>
<blockquote><p>sudo cp 0471\:1237 /etc/usb-modeswitch.conf</p></blockquote>
<p>Then we try to run it again and surprise surprise:</p>
<blockquote><p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial,sans-serif; font-size: 13px;"></p>
<div>USB description data (for identification)</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</div>
<div>Manufacturer: NXP Semiconductors</div>
<div>Product: Reference Design Dragonfly Platform</div>
<div>Serial No.: 354972-03-100562</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</div>
<div>Setting up communication with interface 0 &#8230;</div>
<div>Trying to send the message to endpoint 0&#215;03 &#8230;</div>
<div>OK, message successfully sent</div>
<div>-&gt; Run lsusb to note any changes. Bye.</div>
<p></span></span></p></blockquote>
<div>Our modem is successfully configured to the /dev/ttyACM0 serial port!</div>
<div>Now we can fire up minicom -s and configure the device:</div>
<blockquote>
<div>baudrate 460800 8N1</div>
<div>hardware flow control NO</div>
<div>software flow control NO</div>
</blockquote>
<div>Fire up a few commands to check if the modem is answering:</div>
<blockquote>
<div>ATZ</div>
<div>OK</div>
<div>ATE0</div>
<div>OKY</div>
</blockquote>
<div>Congrats!</div>
<div>I have developed a simple python library to use this modem and I will put it on github soon.</div>
<div>Cheerrs.</div>
<div></div>
<blockquote>
<div></div>
</blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=357</wfw:commentRss>
		</item>
		<item>
		<title>Xbee interface for the pololu 3pi</title>
		<link>http://www.epokh.org/blog/?p=348</link>
		<comments>http://www.epokh.org/blog/?p=348#comments</comments>
		<pubDate>Tue, 23 Nov 2010 23:35:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[pololu 3pi]]></category>

		<category><![CDATA[xbee]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=348</guid>
		<description><![CDATA[Hello guys,
I did an adapter board to interface an xbee digi module which operates with 3.3TTL logic to a polulu 3pi robot which operates with a 5V TTL logic.
I need it because I have to compute some information theoretic measures in real time from the robot while performing the task for my Phd research aim.
The [...]]]></description>
			<content:encoded><![CDATA[<p>Hello guys,</p>
<p>I did an adapter board to interface an xbee digi module which operates with 3.3TTL logic to a polulu 3pi robot which operates with a 5V TTL logic.</p>
<p>I need it because I have to compute some information theoretic measures in real time from the robot while performing the task for my Phd research aim.</p>
<p>The xbee adapter contains a small LDO regulator which step down the voltage from the Vcc of the pololu to the Vcc of the xbee. A simple resistor partition on the RX pin of the Xbee converts 5V ttl from PD1 to 3.3V ttl. There is no partitor between the xbee TX and the RX PD0 port of the pololu.</p>
<p>So in summary the dummy schematic is:</p>
<p>Pololu &#8212;&#8212;&#8212;&#8212;&#8212;- Xbee</p>
<p>Vcc &#8212;&#8211; LDO &#8212;&#8212;&#8211; Vcc</p>
<p>PD1 &#8212;&#8211; resistor &#8212;&#8211;RX</p>
<p>PD0 &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;TX</p>
<p>In this demo I&#8217;m using bidirectional communication as proofed in the pololu serial demo code.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="300" 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://vimeo.com/moogaloop.swf?clip_id=17138365&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed type="application/x-shockwave-flash" width="400" height="300" src="http://vimeo.com/moogaloop.swf?clip_id=17138365&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/17138365">Xbee interface to pololu 3pi test</a> from <a href="http://vimeo.com/user5068108">Robomotic</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>I input the commands from  terminal window from the PC and the pololu interprets the commands by playing 2 tones and turning on/off the red and green led.</p>
<p>If I press the center button on the pololu it will send an &#8220;hello &#8221; string to my terminal window.</p>
<p>Pretty basic but it serves my purpose of logging senory-motor data in real time.<br />
The git repository is available here:</p>
<blockquote><p>
<code>git@github.com:robomotic/Xbee-Pololu-3pi.git</code>
</p></blockquote>
<p>Cheerssss.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=348</wfw:commentRss>
		</item>
		<item>
		<title>Adding an ez430 to the S006 RC helicopter</title>
		<link>http://www.epokh.org/blog/?p=342</link>
		<comments>http://www.epokh.org/blog/?p=342#comments</comments>
		<pubDate>Sun, 31 Oct 2010 16:59:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=342</guid>
		<description><![CDATA[I&#8217;ve just got a brilliant idea. Modify the S006 Alloy Shark produced by Syma, an indoor RC helicopter which operates in the 27MHz NA range with 3 channels with an ezChronos 430.
The ezChronos 430 provides a 3 axis accelerometer, temperature and pressure sensor. The pressure sensor can be used as an altitude estimator, so what [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just got a brilliant idea. Modify the S006 Alloy Shark produced by Syma, an indoor RC helicopter which operates in the 27MHz NA range with 3 channels with an ezChronos 430.</p>
<p>The ezChronos 430 provides a 3 axis accelerometer, temperature and pressure sensor. The pressure sensor can be used as an altitude estimator, so what I&#8217;m thinking is simply to get the altitude reading and see how high this toy can fly.</p>
<p>Ideally one could you use the sensor reading to control the asset and to limit the height but using an FM PPM radio controller is not the best solution to be interfaced with a controller, so at the moment I just want to stick to a simple &#8220;read-only&#8221; configuration.</p>
<p>I have some other toys which operates in IR and in that case I will be able to do something from a controller.</p>
<p>This is the video of the helicopter:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" 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/mzBuXNwzTyY?fs=1&amp;hl=en_GB&amp;rel=0&amp;color1=0x006699&amp;color2=0x54abd6" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/mzBuXNwzTyY?fs=1&amp;hl=en_GB&amp;rel=0&amp;color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
To be fair is not the best helicopter in that price range, but it was a gift so I couldn&#8217;t really change it.</p>
<p>Anyway, I have noticed that there&#8217;s some useful space in the front chassis so I have decided to open it and try to fit an ez430 chronos inside.</p>
<p>This is the helicopter opened:<br />
<a title="front mask removed by epokh, on Flickr" href="http://www.flickr.com/photos/robomotic/5132477004/"><img src="http://farm2.static.flickr.com/1322/5132477004_05ba13b09f.jpg" alt="front mask removed" width="500" height="375" /></a></p>
<p>And then the chronos inside:<br />
<a title="front mask removed by epokh, on Flickr" href="http://www.flickr.com/photos/robomotic/5132477004/"><img src="http://farm2.static.flickr.com/1322/5132477004_05ba13b09f.jpg" alt="front mask removed" width="500" height="375" /></a><br />
Nice:<br />
<a title="Front head with the chronos by epokh, on Flickr" href="http://www.flickr.com/photos/robomotic/5131876861/"><img src="http://farm5.static.flickr.com/4025/5131876861_164b426768.jpg" alt="Front head with the chronos" width="500" height="375" /></a></p>
<p>Now the main problem to get the altitude reading is that I cannot press the button of the ezChronos to start the wireless communication so I have to tweak the open chronos firmware to give me a continuous communication with an interrupt.<br />
The idea is that the ezChronos will wake up every 1 second (with an interrupt) to check if the base station is available to receive data and then eventually start the telemetry function.</p>
<p>In the next article I will talk about the software module.<br />
Stay tuneeeeeeeed!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=342</wfw:commentRss>
		</item>
		<item>
		<title>MindFlex demystified</title>
		<link>http://www.epokh.org/blog/?p=317</link>
		<comments>http://www.epokh.org/blog/?p=317#comments</comments>
		<pubDate>Sun, 01 Aug 2010 21:24:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=317</guid>
		<description><![CDATA[Heyo guys,
this is my last ultimate hack for the mindflex. I wanted to reproduced the results of the mindflex as indicated by the manufacturer.The simplest test that can be done with an EEG device is to check if the alpha waves go up significantly when closing your eyes.
However doing some test with different subjects (i.e. my [...]]]></description>
			<content:encoded><![CDATA[<p>Heyo guys,</p>
<p>this is my last ultimate hack for the mindflex. I wanted to reproduced the results of the mindflex as indicated by the manufacturer.The simplest test that can be done with an EEG device is to check if the alpha waves go up significantly when closing your eyes.</p>
<p>However doing some test with different subjects (i.e. my guinea pig students/friends) and with or without electrogel I couldn&#8217;t find any prove that the neurosky chip is working properly.<br />
I will be happy if somebody can reproduce a high alpha activity with closed eyes.<br />
I could only see some random peaks in the alpha activity during closed eyes which were not stable.<br />
So here the instructions for 2 configurations that can be used to log the data and save it to a CSV file.</p>
<p>So you take out of the shell 3 wires: black is the GND, blue is the Vcc=3.3V and white is the TTL signal at 9600 bauds.<br />
I made 2 possible configurations one which uses a BUB board (based on the FT232 chip) to read the EEG raw data</p>
<p>stream directly to the computer and one which uses a xbee transmitter and an xbee receiver.</p>
<p>As I said before I totally desoldered the original radio modem that was on the main board inside, as in Figure.</p>
<p>What can I do with that? I have no idea! :-p</p>
<h2>Serial configuration</h2>
<p>The <strong>first configuration</strong> is the most dangerous one since you are connected to your<br />
computer via the usb without any opto-isolation so <strong><span style="color: #ff0000;">DO IT AT YOUR OWN RISK.</span></strong></p>
<p><img class="alignnone" title="MindFlex comm via bub board" src="http://farm5.static.flickr.com/4102/4851058720_c49d9a64c5.jpg" alt="" width="500" height="375" /></p>
<p>Make sure you put the jumper of the BUB board over the 3.3 V level,<br />
the black wires goes to GND, the white wire goes to the RX pin and the blue wire is not required because we don&#8217;t need the 3.3 Vdd, so I just put it on an unused pin of the bub board.</p>
<h2>XBee configuration</h2>
<p>The <strong>second configuration</strong> is more interesting because uses a pair of xbee modules to send the eeg data over the air, thus avoiding electrocuting yourself for some hardware faults.</p>
<p><img class="alignnone" title="MindFlex with xbee transmission" src="http://farm5.static.flickr.com/4139/4851059044_76c69c227f.jpg" alt="" width="500" height="375" /></p>
<p>The xbee connected to the MindFlex should be configured in this mode:</p>
<ul>
<li>ZNET 2.5 ROUTER/END DEVICE AT</li>
<li>PAN ID 1AAA as the one in the Xbee host receiver</li>
<li>DH-DL as the SH SL of the Xbee host receiver</li>
<li>PL power level: 2 MEDIUM</li>
<li>SERIAL INTERFACING is the most important:</li>
<li>Set the BAUD Rate to 9600 with NP no parity</li>
</ul>
<div>The xbee connected to the computer (host receiver):</div>
<div>
<ul>
<li>ZNET 2.5 COORDINATOR AT</li>
<li>PAN ID 1AAA as Xbee sender</li>
<li>SERIAL INTERFACING is the most important:</li>
<li>Set the BAUD Rate to 9600 with NP no parity</li>
</ul>
<div>This is the final integration, I used an Xbee breakout board and drilled a raw of holes to fit the pins.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" 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/LE3WhxjJ4AY&amp;hl=en_GB&amp;fs=1?color1=0x006699&amp;color2=0x54abd6" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/LE3WhxjJ4AY&amp;hl=en_GB&amp;fs=1?color1=0x006699&amp;color2=0x54abd6" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div>Now the next thing is to parse the data coming from the serial port,</div>
<div>to do so we use a software coded by <a href="http://ericmika.com/itp/brain-hack">EricMika</a> and <a href="http://spiffomatic64.com/">Spiffomatic</a>.</div>
<div>The code is written for the Processing environment and I have compiled</div>
<div>and put the source codes in the zip file provided.</div>
<div>This is my stable alpha activity during opened eyes which doesn&#8217;t differ much from the closed eyes condition!</div>
<div><img class="alignnone" title="Processing EEG" src="http://farm5.static.flickr.com/4121/4862322401_22f8060e57_m.jpg" alt="" width="500" height="385" /></div>
<h2>Wave exporter</h2>
<p>The export saves in CSV format.<br />
For the open eye condition: UP arrow start recording, DOWN arrow stop recording<br />
For the closed eye condition: LEFT arrow start recording, RIGHT arrow stop recording<br />
File are saved in the same folder, you can then import them in Matlab and plot.</p>
<h2>Conclusion</h2>
<p>The opened and closed eye condition does not discriminate in the alpha band.<br />
Elettrogel does not improve the condition.<br />
Even flipping the MindFlex so that the electrode is touching your backhead (close to the visual cortex) does not improve the discrimination.<br />
The problem of all consumer EEGs is the connection between scalp and amplifier. When measuring EEG in the lab there is quite a lot of effort going into making proper contact with each and every electrode each and every time by measuring impedance and carefully preparing each electrode.</p>
<p>The problem with EEG in general is the inherently bad SNR. If you have no properly connected (Ag/AgCl) electrodes, you&#8217;re not gonna get reliable signals, period. The voltage is so small, the DC polarization alone you get with mindflex electrodes might be several hundred times the signal and probably contains huge amounts of AC noise, too.</p>
<p>However I expected something more from the Neurosky guys because their marketing in terms of benchmarking is quite aggressive &#8230;. There&#8217;s is something going on in the toy but is not really really stable!</p>
<p>If you don&#8217;t trust me you can do the following, download these 2 CSV files containing the condition with opened eyes and closed eyes and try to determine which number is the open and which one is the closed.</p>
<ul>
<li><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/eeg_1.csv">EEG log 1</a></li>
<li><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/eeg_2.csv">EEG log 2 </a></li>
</ul>
<p>The best thing I could get off the mindflex was this run where, yes there are spikes of alpha activities but they are not stable considering I had my eyes closed all the time!</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/comparison.jpg"><img class="alignnone size-medium wp-image-338" title="Comparison on alpha waves ..." src="http://www.epokh.org/blog/wp-content/uploads/2010/08/comparison-300x224.jpg" alt="" width="300" height="224" /></a></p>
<p>I have produced the graph by using a simple matlab script:</p>
<blockquote><p>% After importing plots the eeg bands</p>
<p>function plotbands(data1,data2)</p>
<p>tstamp=data1(:,1)./1000;</p>
<p>signalquality=data1(:,2);</p>
<p>attention=data1(:,3);</p>
<p>meditation=data1(:,4);</p>
<p>delta=data1(:,5);</p>
<p>theta=data1(:,6);</p>
<p>lowalpha=data1(:,7);</p>
<p>highalpha=data1(:,8);</p>
<p>lowbeta=data1(:,9);</p>
<p>highbeta=data1(:,10);</p>
<p>lowgamma=data1(:,11);</p>
<p>highgamma=data1(:,12);</p>
<p>hold on</p>
<p>plot(lowalpha,&#8217;LineWidth&#8217;,2,&#8217;Color&#8217;,'red&#8217;);</p>
<p>plot(data2(:,7),&#8217;LineWidth&#8217;,2,&#8217;Color&#8217;,'black&#8217;);</p>
<p>xlabel(&#8217;Sample&#8217;);</p>
<p>ylabel(&#8217;EEG value&#8217;);</p>
<p>legend(&#8217;Closed&#8217;,'Open&#8217;);</p>
<p>title(&#8217;Low Alpha wave comparison&#8217;);</p>
<p>end</p></blockquote>
<p><strong>Download the software </strong><strong><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/brain_grapher.zip">Procesing Brain Grapher</a></strong></p>
<h2>Some cool pictures during my tests:</h2>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0125.jpg"><img class="alignnone size-medium wp-image-331" title="ElectroGel" src="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0125-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0116.jpg"><img class="alignnone size-medium wp-image-332" title="Mindflex opened and radio module desoldered" src="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0116-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0117.jpg"><img class="alignnone size-medium wp-image-333" title="The radio module desoldered" src="http://www.epokh.org/blog/wp-content/uploads/2010/08/img_0117-300x225.jpg" alt="" width="300" height="225" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=317</wfw:commentRss>
		</item>
		<item>
		<title>MindFlex hack 2</title>
		<link>http://www.epokh.org/blog/?p=310</link>
		<comments>http://www.epokh.org/blog/?p=310#comments</comments>
		<pubDate>Mon, 10 May 2010 12:07:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=310</guid>
		<description><![CDATA[I realised the xbee pops out of the enclosure.
So my next attempt will be to drill 3 holes for the wires and put in on the outside of the case.
It&#8217;s more complicate than expected! But is good work!
]]></description>
			<content:encoded><![CDATA[<p>I realised the xbee pops out of the enclosure.</p>

<a href='http://www.epokh.org/blog/?attachment_id=312' title='MindFlex Open XBee socket'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/dscf7830-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=313' title='Mind Flex with Xbee plugged'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/dscf7831-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=314' title='Mind Flex turned on with the Xbee'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/dscf7833-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>

<p>So my next attempt will be to drill 3 holes for the wires and put in on the outside of the case.</p>
<p>It&#8217;s more complicate than expected! But is good work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=310</wfw:commentRss>
		</item>
		<item>
		<title>MindFlex XBee HACK</title>
		<link>http://www.epokh.org/blog/?p=298</link>
		<comments>http://www.epokh.org/blog/?p=298#comments</comments>
		<pubDate>Fri, 07 May 2010 18:44:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=298</guid>
		<description><![CDATA[Inspired by the work of Arturo Vidich, Sofy Yuditskaya at EricMika.com,

I decided to interface an XBee Series 2.5 from DigiMark without using an external Arduino or MegaDuino which is bulky and technically unsafe for the missing opto-isolation interface between the electrodes and the main voltage.
Anyway! The interface is very simple: 3 wires.
The T pin on [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by the work of <a href="http://itp.nyu.edu/%7Eav849/blog/">Arturo Vidich</a>, <a href="http://www.yuditskaya.com/">Sofy Yuditskaya</a> at <a href="http://ericmika.com">EricMika.com,<br />
</a></p>
<p>I decided to interface an XBee Series 2.5 from DigiMark without using an external Arduino or MegaDuino which is bulky and technically unsafe for the missing opto-isolation interface between the electrodes and the main voltage.</p>
<p>Anyway! The interface is very simple: 3 wires.</p>
<p>The T pin on the daughter (neurosky chip) board is the TX (blue wire), the V pin (red wire) is the supply voltage 3.3V regulated from the batteries and the ground pin is either at the negative pole of the edge (black wire under the main board) or also at the right of the V pin.</p>
<p>I would suggest to solder on the - pole under the board because you can easily short circuit the V pin withe the GND pin which are only few millimeters apart.</p>
<p>I checked out with the oscilloscope and the V is a low ripple DC at 3.3 V which can be used to power up the XBee.</p>
<p>So the V pin goes into the pin #1 of the zigbee, the T pin goes to the pin #3 of the xbee (DIN) and the ground pin goes to the pin 10 of the zigbee.</p>
<p>Pictures follows.</p>

<a href='http://www.epokh.org/blog/?attachment_id=301' title='MindFlex open1'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/image033-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=302' title='image034'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/image034-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=303' title='image035'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/image035-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=304' title='image036'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/image036-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>
<a href='http://www.epokh.org/blog/?attachment_id=305' title='image037'><img src="http://www.epokh.org/blog/wp-content/uploads/2010/05/image037-150x150.jpg" width="150" height="150" class="attachment-thumbnail" alt="" /></a>

<p>The Xbee must be configured in AT mode to rely the incoming serial transmission at 9600 bps into the node coordinator.</p>
<p>Another xbee connected to the pc via the usb explorer simply receives the data in AT mode.</p>
<p>The processing library developed by Eric Mika can be used to decode and show the data.</p>
<p>This video (very poor quality sorry guys) shows a dump of the first successful attempt, I didn&#8217;t have time to make a decent video yet.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" 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/TkIYvELQ7DE&amp;hl=en_GB&amp;fs=1&amp;rel=0" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/TkIYvELQ7DE&amp;hl=en_GB&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The next great thing to do is to desolder the RF module on the board and see if the the neurosky chip will still send the raw data even if the RF module does not answer.</p>
<p>I also tried out a LIPO battery of 3.7 V @1100 mAh and it works great, it can also fit inside the battery pack.</p>
<p>I will post the pictures relative to the battery when I have time, I&#8217;m slaking off my official work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=298</wfw:commentRss>
		</item>
		<item>
		<title>Motion Tag testing</title>
		<link>http://www.epokh.org/blog/?p=279</link>
		<comments>http://www.epokh.org/blog/?p=279#comments</comments>
		<pubDate>Sun, 28 Mar 2010 19:08:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=279</guid>
		<description><![CDATA[I&#8217;m doing a feasibility study for tracking objects and persons in terms of range and motion.
The first prototype is based on 2 nodes:
an arduino with an xbee shield and a speaker.
a xbee 2.5 series 2mW antenna + ADXL335 + power supply + signal filters.
The 2 prototypes uses the zigbee API mode to communicate and check [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing a feasibility study for tracking objects and persons in terms of range and motion.<br />
The first prototype is based on 2 nodes:<br />
an arduino with an xbee shield and a speaker.<br />
a xbee 2.5 series 2mW antenna + ADXL335 + power supply + signal filters.</p>
<p>The 2 prototypes uses the zigbee API mode to communicate and check if they are moving away from each other. They measure the signal power as well as the motion to estimate the direction.<br />
An xbee explorer works as an internet gateway if connected via usb to an host pc.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/arduinomotion.jpg"><img class="aligncenter size-medium wp-image-281" title="Arduino Motion tracker" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/arduinomotion-300x225.jpg" alt="" width="300" height="225" /></a><br />
The relationship between RSSI and feet in open space can be interpolated using statistic sampling.<br />
Somebody did it already and this is the curve.</p>
<p><div class="wp-caption aligncenter" style="width: 490px"><img class=" " src="http://sociablepint.net/project/media/images/signalstrength.jpg" alt="RSSI vs Feet" width="480" height="297" /><p class="wp-caption-text">RSSI vs Feet</p></div></p>
<p>The second prototype is based on 2 nordic keyfobs and 1 usb interface.<br />
The only problem I encountered with the nRF24L01 chips is that the value for the RSSI is binary: 1 bit to detect either an RSSI under -64dBm or an RSSI over -64dBm.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/trio.jpg"><img class="aligncenter size-medium wp-image-283" title="Nordic Key Fob" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/trio-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p style="text-align: center;">They are provided with 3 tilt sensors for inclination (max 15 degree) to consume less power (4uA average current) and can be connected to the internet as well with the serial usb interface.<br />
<img class="aligncenter" title="tilt sensor" src="http://www.coolcomponents.co.uk/catalog/images/tilt.jpg" alt="" width="178" height="178" /></p>
<p>Detection Angle:15°<br />
Max Contact Current:0.25A<br />
Contact Resistance:30ohm<br />
External Diameter:4.7mm<br />
External Length / Height:10.2mm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=279</wfw:commentRss>
		</item>
		<item>
		<title>Cybernetic Leg Control</title>
		<link>http://www.epokh.org/blog/?p=273</link>
		<comments>http://www.epokh.org/blog/?p=273#comments</comments>
		<pubDate>Sun, 28 Mar 2010 17:07:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=273</guid>
		<description><![CDATA[This is an experimental setup to control a prosthetic leg built with the Lego NXT.
The leg is planar and has 2 degree of freedom, one for the knee and one for the ankle.
There are 3 sensors: a gyroscope at the thigh, an ultrasonic sensor at the hip level and contact sensor at the foot tip.

The [...]]]></description>
			<content:encoded><![CDATA[<p>This is an experimental setup to control a prosthetic leg built with the Lego NXT.</p>
<p>The leg is planar and has 2 degree of freedom, one for the knee and one for the ankle.</p>
<p>There are 3 sensors: a gyroscope at the thigh, an ultrasonic sensor at the hip level and contact sensor at the foot tip.<br />
<a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5105.jpg"><img class="alignnone size-medium wp-image-287" title="Lego Leg by side" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5105-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The gyroscope is used to measure the angular speed of the extension/flexion of the thigh and can be integrated to estimate the absolute angle of the thigh with the ground. The contact measures if the foot has touched something. The ultrasonic sensor measures the distance of the hip to the ground when the leg is extended.</p>
<p>The lego NXT has 2 powerful servomotor which can control the knee and ankle orientation.</p>
<p>The human operator position of the knee and ankle is tracked by using 2 accelerometers placed at the proper positions.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5119.jpg"><img class="alignnone size-medium wp-image-295" title="Sensors on human leg" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5119-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>The 3-axis accelerometers are wireless connected to the PC (I&#8217;m using the ZStar kit) which runs a C# environment. The host program receive the filtered readings from the sensors and then sends the angular positions to the program running on the NXT via bluetooth.</p>
<p>I used the NXT Osek real time environment on the NXT brick for trajectory planning.</p>
<p>The control system receives angular position and speed from the human operator and using a PID control setup the angular position and speed on the artificial leg.</p>
<p>This video shows some preliminary test with PID control on position but not speed.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/wtGhRN99iPU&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/wtGhRN99iPU&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>I&#8217;m working also on a prototype with sEMG (surface EMG) using a USB-DUX with a bio-amplifier.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=273</wfw:commentRss>
		</item>
		<item>
		<title>IMU test for leg hyper extension</title>
		<link>http://www.epokh.org/blog/?p=266</link>
		<comments>http://www.epokh.org/blog/?p=266#comments</comments>
		<pubDate>Wed, 17 Mar 2010 11:21:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=266</guid>
		<description><![CDATA[Here is the first test I did for the left leg hyperextension in  sitting position.
Duration of 20 seconds and 3 repetition (the  last one is discarded) with a wireless Freescale MMA7361L at 30 Hertz  sampling rate with 1.5 g scale.
For slow movements where the peak  of extension is reached after about [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the first test I did for the left leg hyperextension in  sitting position.</p>
<p>Duration of 20 seconds and 3 repetition (the  last one is discarded) with a wireless Freescale MMA7361L at 30 Hertz  sampling rate with 1.5 g scale.</p>
<p>For slow movements where the peak  of extension is reached after about 1 second from relax to extension we  have an angle of 47 degree which I manage to keep for 2 seconds.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/graph.jpg"><img class="alignnone size-medium wp-image-264" title="Knee extension using ZigBee 3 axis accelerometer" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/graph-300x137.jpg" alt="" width="300" height="137" /></a></p>
<p>Previous  studies such as (3D joint rotation measurement using MEMs inertial  sensors: Application to the knee joint) reports an angle a ROM of 51  degrees but they used a 9DOF unit and some advanced  compensation/calibration techniques.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/reference.jpg"><img class="alignnone  size-medium wp-image-265" title="Reference results from the paper" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/reference-300x118.jpg" alt="" width="300" height="118" /></a></p>
<p>For a  digital accelerometer I would say is not too bad!</p>
<p>Here are some pictures of the positioning of the sensors. Only the knee one was used in the test.</p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5052.jpg"><img class="alignnone size-medium wp-image-270" title="Leg double sensors" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5052-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5054.jpg"><img class="alignnone size-medium wp-image-271" title="Knee sensor details" src="http://www.epokh.org/blog/wp-content/uploads/2010/03/dscf5054-300x225.jpg" alt="" width="300" height="225" /></a></p>
<table style="border-collapse: collapse; width: 56pt;" border="0" cellspacing="0" cellpadding="0" width="74"><col style="width: 56pt;" width="74"></col></p>
<tbody>
<tr style="height: 15.75pt;" height="21">
<td class="xl63" style="height: 15.75pt; width: 56pt;" width="74" height="21"></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=266</wfw:commentRss>
		</item>
		<item>
		<title>NemoSport is out</title>
		<link>http://www.epokh.org/blog/?p=255</link>
		<comments>http://www.epokh.org/blog/?p=255#comments</comments>
		<pubDate>Sat, 05 Sep 2009 13:16:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.epokh.org/blog/?p=255</guid>
		<description><![CDATA[NemoSport prototype is finally working and doing some good analysis on sport performance!
]]></description>
			<content:encoded><![CDATA[<p>NemoSport prototype is finally working and doing some good analysis on sport performance!</p>
<p><div id="attachment_258" class="wp-caption alignnone" style="width: 310px"><a href="http://www.epokh.org/blog/wp-content/uploads/2009/09/nemosport1.jpg"><img class="size-medium wp-image-258" title="NemoSportIntro" src="http://www.epokh.org/blog/wp-content/uploads/2009/09/nemosport1-300x168.jpg" alt="NemoSport intro!" width="300" height="168" /></a><p class="wp-caption-text">NemoSport intro!</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://www.epokh.org/blog/?feed=rss2&amp;p=255</wfw:commentRss>
		</item>
	</channel>
</rss>
