<?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>IT-Robotix</title>
	<atom:link href="http://www.it-robotix.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.it-robotix.net</link>
	<description>Sito dedicato al mondo della Robotica amatoriale</description>
	<lastBuildDate>Tue, 26 Mar 2013 15:31:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>IT-Robotix on Google Currents</title>
		<link>http://www.it-robotix.net/en/2013/03/26/it-robotix-su-google-currents/</link>
		<comments>http://www.it-robotix.net/en/2013/03/26/it-robotix-su-google-currents/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 15:31:34 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[IT-Robotix]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=483</guid>
		<description><![CDATA[Sorry, this entry is only available in Italiano.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.it-robotix.net/feed/">Italiano</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2013/03/26/it-robotix-su-google-currents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenCV experiments</title>
		<link>http://www.it-robotix.net/en/2012/03/07/esperimenti-con-le-opencv/</link>
		<comments>http://www.it-robotix.net/en/2012/03/07/esperimenti-con-le-opencv/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 15:17:39 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Codice]]></category>
		<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[EMGU]]></category>
		<category><![CDATA[OpenCV]]></category>
		<category><![CDATA[Visione artificiale]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=462</guid>
		<description><![CDATA[Sorry, this entry is only available in Italiano.]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.it-robotix.net/feed/">Italiano</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2012/03/07/esperimenti-con-le-opencv/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>B4 project start</title>
		<link>http://www.it-robotix.net/en/2012/02/16/b4-project-start/</link>
		<comments>http://www.it-robotix.net/en/2012/02/16/b4-project-start/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 22:30:56 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[B4]]></category>
		<category><![CDATA[mbed]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[RS485]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=452</guid>
		<description><![CDATA[From too much time I missing updates on the site, if you exclude a slow translation of existing articles in English that is currently in progress, in this post I wanted to officially open the works to a new Robot that had already been announced some time ago so vague. As usual, when I get [...]]]></description>
			<content:encoded><![CDATA[<p>From too much time I missing updates on the site, if you exclude a slow translation of existing articles in English that is currently in progress, in this post I wanted to officially open the works to a new Robot that had already been announced some time ago so vague. As usual, when I get half an idea, the first thing I can do is find a name, this time is &#8220;B4&#8243;, is not just a name of my imagination but this is a quote, let&#8217;s see who is the first who posts a comment with details of the quote?<br />
But let&#8217;s get on to serious matters, in the past I always thought robots with dimensions of 20x20cm in classic Robot Explorer format, but this time I thought I&#8217;d make a bigger Robot, it was for me a solid and functional basis for future studies, for this reason I focused on a circular base with diameter of 36cm. The project involves the construction of a system capable of moving in a Home, consisting of a motor control, proximity sensors to avoid obstacles and power system control, and for the part of &#8220;supervisor/management&#8221; of these devices do not want to impose constraints, but be able to use anything, it&#8217;s a PIC, a mbed, an Android smartphone, a small netbook or a mastodontic super servers connected through WiFi. Perhaps it would be better to speak of an experimental basis, rather than a real Robot, to be used to develop systems for the main control of all types. For the first version I planned to use mbed as a central system that will be dedicated to control all devices, even though I had some ideas to implement the functions of artificial vision for which I should use at least one netbook, but we see in detail the block diagram of project.</p>
<p style="text-align: center;"><a href="http://lh4.ggpht.com/-DkIJdP8BIak/Tzpx61_-FkI/AAAAAAAABf0/IZRjAgxevtQ/B4_Diagram.png?imgmax=640" rel="lightbox[2012-1-4-23-28-59]"><img class="pie-img aligncenter" style="margin-top: 10px; margin-bottom: 10px;" src="http://lh4.ggpht.com/-DkIJdP8BIak/Tzpx61_-FkI/AAAAAAAABf0/IZRjAgxevtQ/s144-c/B4_Diagram.png" alt="B4_Diagram.png" width="144" height="144" /></a></p>
<p><span id="more-452"></span><br />
We analyze the diagram from the block at the top left, the Battery Monitor, as I wrote in another <a href="http://www.it-robotix.net/en/2011/03/05/line-follower-project-start/">post</a>, the time is right for switch to using LiPo batteries without spending a fortune on our Robot, but it is better not damage them, and keep under control the level of charge, to do it I thought of using a PIC that could signal the charge status with an LED and remove power to the entire system if it falls below the minimum threshold, then saw, that there is a PIC why not allow the central system to control the level of charge? For this section I have a general outline and ideas on how to make it, but still have not made ​​a circuit to perform the first tests.<br />
Continuing to the right of the diagram, there is the second block of supply, it is a switching circuit for supplying Step Down, whose purpose is to reduce the voltage that will arrive on the stabilizers to 5V on the other boards. This is because the main power will be supplied from a battery to 14.4 V, which voltage will be applied directly to the H-Bridge to drive the motors which work at 12V, while for the stabilizers that have to reduce the 14.4 V of the battery to 5V, are forced to dissipate as much energy as heat, resulting in faster discharge of the battery. To optimize power consumption will use the Step Down, thanks also to the experience and support of <a href="http://www.guiott.com/Rino/dsNavCon/NewdsNavCon_PwrSupply.htm">Guido</a>, in this way the voltage which will arrive in input to the stabilizers will be of 7V with minimal energy losses in the form of heat.<br />
The essential point of the schema is the BUS 485, I chose this for the interconnection between the various boards, the reason which oriented me to this choice of solution compared to other types of bus, is due to the fact that lately they&#8217;re more Robottari friends using this for their projects, and it seemed like a good idea now to make something that could somehow be shared with other projects, in addition to allow the exchange of experiences can also use other circuit solutions with minimal effort.<br />
Moving on to the blocks in the lower part of the scheme, the sensor board as the name suggests, is one that will handle all telemetry and obstacle detection sensors. In order to accomplish something that could be useful to others I am trying to design it to make it as versatile as possible, although for reasons of cost I am forced to limit the use of sensors that I had in the drawers gathering dust. This is also the board that currently is in a more advanced stage of development, but I&#8217;ll talk more in detail in a later post.<br />
The motor control will be assigned to the Motor Control block, with a board made ​​by my friend <a href="http://www.xbot.it">Stefano</a>, which&#8217;ll cooperate for the development of software for PID control, this project follows the lines of the <a href="http://www.guiott.com/Rino/dsNavCon33/dsNavCon33.html">Guido’s project</a>. I forgot to mention that this card is another reason that pushed me toward the use of BUS485, as Stefano has designed and built so (fortunately).<br />
Finally, the control board of the Robot, as anticipated before, will be based on mbed, at least for the moment, equipped with a module WiFly for the transmission of telemetry data to a PC. On this part at the time, I have a few ideas but very confused, I do not think that will make things very complex as well as orchestrating the operation of various devices.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2012/02/16/b4-project-start/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Created the Google+ page of IT-Robotix</title>
		<link>http://www.it-robotix.net/en/2011/11/14/creata-la-pagina-google-di-it-robotix/</link>
		<comments>http://www.it-robotix.net/en/2011/11/14/creata-la-pagina-google-di-it-robotix/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 11:05:14 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[IT-Robotix]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=420</guid>
		<description><![CDATA[Click on the link below to add the Google+ page of IT-Robotix to your circle, and follow the updates of the projects. IT-Robotix on Google+]]></description>
			<content:encoded><![CDATA[<p>Click on the link below to add the Google+ page of IT-Robotix to your circle, and follow the updates of the projects.</p>
<div style="padding-left:250px"><a href="https://plus.google.com/113999583208796197322?prsrc=3" style="text-decoration: none; color: #333;">
<div style="display: inline-block; *display: inline;">
<div style="text-align: center;"><img src="https://ssl.gstatic.com/images/icons/gplus-64.png" width="64" height="64" style="border: 0;"/></div>
<div style="font: bold 13px/16px arial,sans-serif; text-align: center;">IT-Robotix</div>
<div style="font: 13px/16px arial,sans-serif;"> on Google+ </div>
</div>
<p></a></div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/11/14/creata-la-pagina-google-di-it-robotix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modified code for SRF02 now it works properly</title>
		<link>http://www.it-robotix.net/en/2011/11/02/412/</link>
		<comments>http://www.it-robotix.net/en/2011/11/02/412/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 22:26:19 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Componenti]]></category>
		<category><![CDATA[sensori]]></category>
		<category><![CDATA[SRF02]]></category>
		<category><![CDATA[ultrasuoni]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=412</guid>
		<description><![CDATA[I return from the previous post on the SRF02 sensor, as I had previously written the following sample code on the site found a strange behavior on the measurement, asking friends who had the same sensor, but tested with software written in different languages ​​had more behavior correct. I then performed some tests with mbed, [...]]]></description>
			<content:encoded><![CDATA[<p>I return from the previous post on the SRF02 sensor, as I had previously written the following sample code on the site found a strange behavior on the measurement, asking friends who had the same sensor, but tested with software written in different languages ​​had more behavior correct.<br />
I then performed some tests with mbed, to see if changing the device sensor work properly, and in fact the results were positive, confirming that the sensor was faulty.<span id="more-412"></span><br />
The next step was to modify the code to use the libraries of the C18 for I2C BUS, defining the functions for initializing the device and the sensor reading.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p412code3'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4123"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre></td><td class="code" id="p412code3"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &lt;i2c.h&gt;</span>
&nbsp;
<span style="color: #339933;">#define SRF02   0xE0            // Address of SRF02</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**************************************************************************
 * Initializes the device for operation in MSSP Master I2C
 *************************************************************************/</span>
<span style="color: #993333;">void</span> srf02_config<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    OpenI2C<span style="color: #009900;">&#40;</span>MASTER<span style="color: #339933;">,</span> SLEW_OFF<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    SSPADD <span style="color: #339933;">=</span> <span style="color: #208080;">0x63</span><span style="color: #339933;">;</span>              <span style="color: #666666; font-style: italic;">// 100khz BUS @ 40MHz PIC</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/**************************************************************************
 * Performs the measurement by the sensor
 *
 * Returns the measurement made in centimeters
 *************************************************************************/</span>
<span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> srf02_read<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #993333;">int</span> result<span style="color: #339933;">=</span><span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
    <span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> measure<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
    <span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> measurement<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    result <span style="color: #339933;">=</span> EEByteWrite<span style="color: #009900;">&#40;</span>SRF02<span style="color: #339933;">,</span> <span style="color: #208080;">0x00</span><span style="color: #339933;">,</span> <span style="color: #208080;">0x51</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Checking the outcome of the start of reading</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>result<span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Awaits the completion of measurement sensor</span>
        Delay10KTCYx<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">70</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Retrieve the measurement made ​​by sensor</span>
        result <span style="color: #339933;">=</span> EESequentialRead<span style="color: #009900;">&#40;</span>SRF02<span style="color: #339933;">,</span> <span style="color: #208080;">0x02</span><span style="color: #339933;">,</span> measurement<span style="color: #339933;">,</span> <span style="color: #0000dd;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Checking the outcome of the sensor reading</span>
        <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>result<span style="color: #339933;">==</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #666666; font-style: italic;">// Writes the value read from sensor</span>
            measure <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>measurement<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&lt;&lt;</span><span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            measure <span style="color: #339933;">+=</span> measurement<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> measure<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Below, instead of calling these new methods:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p412code4'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p4124"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p412code4"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    ...
    <span style="color: #202020;">srf02_config</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    lcd_clear<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">;;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        lcd_put_uint<span style="color: #009900;">&#40;</span>srf02_read<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Delay10KTCYx<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/11/02/412/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing an ultrasonic sensor SRF02</title>
		<link>http://www.it-robotix.net/en/2011/09/30/gestire-un-sensore-ad-ultrasuoni-srf02/</link>
		<comments>http://www.it-robotix.net/en/2011/09/30/gestire-un-sensore-ad-ultrasuoni-srf02/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 14:22:49 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Componenti]]></category>
		<category><![CDATA[sensori]]></category>
		<category><![CDATA[SRF02]]></category>
		<category><![CDATA[ultrasuoni]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=380</guid>
		<description><![CDATA[Finally it is time to get my hands on one of the ultrasonic sensors, which I keep in the drawers of the components, in particular I&#8217;m talking about the SRF02 sensor, an ultrasonic rangefinder that can make measurements between 16cm and 6m. This sensor can be controlled through a serial or I2C, the choice of [...]]]></description>
			<content:encoded><![CDATA[<p>Finally it is time to get my hands on one of the ultrasonic sensors, which I keep in the drawers of the components, in particular I&#8217;m talking about the SRF02 sensor, an ultrasonic rangefinder that can make measurements between 16cm and 6m.</p>
<p>This sensor can be controlled through a serial or I2C, the choice of mode of control is administered through a 5-pin, which is connected to ground if you want to use the serial port, or left unconnected if you want to use the control via I2C. In this article I will speak of my experience with sensor controlled by a PIC 18F2620 I2C, and as you can see the management of the sensor is identical to that of a common I2C EEPROM. The details of the sensor and use them can be found at this <a title="SRF02" href="http://www.robot-electronics.co.uk/htm/srf02techI2C.htm" target="_blank">link</a>.</p>
<p>We begin to analyze the circuit diagram that is vary simple.</p>
<p style="text-align: center;"><img class="pie-img aligncenter" src="http://lh5.ggpht.com/-yqRzS8hY5DA/ToDtvwN5XGI/AAAAAAAABec/ORxeIEQdgxY/srf02.png?imgmax=400" alt="srf02.png" width="400" height="225" /><img style="margin: 10px 10px 10px 10px;" alt="" /></p>
<p><span id="more-380"></span></p>
<p>As you can see, in addition to the basic circuitry for the PIC (crystal, capacitors and resistor on MCLR) the sensor is connected to pins RC3 and RC4, respectively SCL and SDA, are used by the PIC MSSP module for communicating with I2C slave devices. Both of these pins are held at high level with two pull-up resistors from 1.8 K ohms, as required by the specifications of the I2C BUS. I also added a display to the scheme, in order to display the values ​​returned by the sensor.</p>
<p>Now let&#8217;s see the code:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p380code6'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3806"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code" id="p380code6"><pre class="c" style="font-family:monospace;"><span style="color: #993333;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #993333;">void</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #993333;">unsigned</span> <span style="color: #993333;">char</span> counter<span style="color: #339933;">;</span>
<span style="color: #993333;">unsigned</span> <span style="color: #993333;">int</span> range<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> autotune<span style="color: #339933;">=</span><span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// PIC configuration</span>
    config_system<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">// Get 6 faster read of sensor for autotune</span>
    srf02_init<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Loop</span>
    <span style="color: #b1b100;">for</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">;;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// Send to sensor a request to start a measurement in cm</span>
        srf02_tx<span style="color: #009900;">&#40;</span>SRF08<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">81</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        Delay10KTCYx<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">70</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Read the six register of sensor</span>
        srf02_rx<span style="color: #009900;">&#40;</span>SRF08<span style="color: #339933;">,</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        lcd_clear<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Write the firmware version of sensor</span>
        lcd_put_uchar<span style="color: #009900;">&#40;</span>srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Write the value of unused regiter</span>
        lcd_put_uchar<span style="color: #009900;">&#40;</span>srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Write the value measured from the sensor</span>
        range <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	range <span style="color: #339933;">+=</span> srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        lcd_put_uint<span style="color: #009900;">&#40;</span>range<span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #666666; font-style: italic;">// Write the value of autotune</span>
        autotune <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">4</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&amp;</span>lt<span style="color: #339933;">;&amp;</span>lt<span style="color: #339933;">;</span><span style="color: #0000dd;">8</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	autotune <span style="color: #339933;">+=</span> srf02_buffer<span style="color: #009900;">&#91;</span><span style="color: #0000dd;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        lcd_put_uint<span style="color: #009900;">&#40;</span>autotune<span style="color: #339933;">,</span><span style="color: #0000dd;">0</span><span style="color: #339933;">,</span><span style="color: #0000dd;">14</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        Delay10KTCYx<span style="color: #009900;">&#40;</span><span style="color: #0000dd;">500</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>As you can see also the Code (the full one can be downloaded from this <a href="http://www.it-robotix.net/wp-content/uploads/2011/09/srf02_code.zip">link</a>) is very simple, line 15 calls the function that starts the measurement of the distance in centimeters from the sensor. Then a delay waiting for 70 milliseconds have elapsed, the time needed to receive the echo farther, then reads the sensor 6 registers, storing the values ​​in srf02_buffer. As indicated in the guide of the sensor each register contains specific information as you can easily understand from the comments in the code, the part that interests us most is that the lines 25 and 26, where it reads the measured distance between the sensor and the &#8216;object that is in front. The display, educational purposes only, the code displays all other values​​, and as you can see the whole cycle is repeated every half second. At line 9 srf02_init() function is called, this does nothing but make six measurements in rapid sequence, as indicated in the <a title="SRF02" href="http://www.robot-electronics.co.uk/htm/srf02techI2C.htm" target="_blank">specifications</a> of the first 5/6 measurements are used to make self sensor calibration.</p>
<p>At first time, following the example on pages of documentation, I was going to read only the two registers that contain the measure of the distance, doing it this way but I had some strange measures, starting from a minimum readings began to increase by ten row and then start over. The smallest size was, however, be much more precise than that I get all 6 reading registers. Not finding useful information on this strange behavior, however, I decided to take the method of reading of all registers as more stable, and therefore as a system to use. If you have different experiences I would be curious to learn more then feel free to post comments with your experiences.</p>
<p style="text-align: center;"><a href="http://lh6.ggpht.com/-gmQcCNLJMFE/ToOP6Y89NmI/AAAAAAAABfU/5t3AHfUgELk/IMG_9731.JPG?imgmax=640" rel="lightbox[2011-8-5-16-14-52]"><img class="pie-img" style="margin: 10px 10px 10px 10px;" src="http://lh6.ggpht.com/-gmQcCNLJMFE/ToOP6Y89NmI/AAAAAAAABfU/5t3AHfUgELk/s144-c/IMG_9731.JPG" alt="IMG_9731.JPG" width="144" height="144" /></a></p>
<p>Soon I will also try to use the model SRF10, SRF02 which is managed similarly to, but being equipped with a transmitter and receiver capsule U.S. can maintain a lower minimum measure amounts to 6cm.</p>
<p style="text-align: center;"><a href="http://www.it-robotix.net/wp-content/uploads/2011/09/srf02_code.zip">:: Download the complete code ::</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/09/30/gestire-un-sensore-ad-ultrasuoni-srf02/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coming soon &#8230;</title>
		<link>http://www.it-robotix.net/en/2011/09/26/coming-soon/</link>
		<comments>http://www.it-robotix.net/en/2011/09/26/coming-soon/#comments</comments>
		<pubDate>Mon, 26 Sep 2011 13:51:14 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Robot]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=372</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.it-robotix.net/wp-content/uploads/2011/09/B4.png"><img class="size-full wp-image-373 aligncenter" title="B4" src="http://www.it-robotix.net/wp-content/uploads/2011/09/B4.png" alt="B4" width="179" height="119" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/09/26/coming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Romecup 2011</title>
		<link>http://www.it-robotix.net/en/2011/03/10/romecup-2011/</link>
		<comments>http://www.it-robotix.net/en/2011/03/10/romecup-2011/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 21:46:22 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Explorer]]></category>
		<category><![CDATA[Robofesta]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[robocup]]></category>
		<category><![CDATA[romecup]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=351</guid>
		<description><![CDATA[From March 14 to 16 there will be the usual manifestation of RomeCup three days dedicated to Robotics, the first two days will be held at the ITIS Galileo Galilei in Rome, while the final day will be held in the hall of the Capitol Protomoteca. This is an event dedicated to the schools, but [...]]]></description>
			<content:encoded><![CDATA[<p>From March 14 to 16 there will be the usual manifestation of RomeCup three days dedicated to Robotics, the first two days will be held at the ITIS Galileo Galilei in Rome, while the final day will be held in the hall of the Capitol Protomoteca.</p>
<p style="text-align: center;"><img class="pie-img aligncenter" src="http://lh6.ggpht.com/_ndUeRg81MJ8/TXlHB3FxJvI/AAAAAAAABeE/DSVe3A5FCc8/romecup2011.jpg?imgmax=640" alt="romecup2011.jpg" width="294" height="171" /><img style="margin: 10px 10px 10px 10px;" alt="" /></p>
<p>This is an event dedicated to the schools, but there are also other initiatives in Robotic, also some mention of the many presentations on Arduino, held by a friend of Roboteck, the group also cited in the event program.</p>
<p>Among the events scheduled are:</p>
<ul>
<li>Explorer Junior</li>
<li>Explorer Senior</li>
<li>Robocup junior open league</li>
<li>Robocup junior light weight league</li>
<li>Robocup junior Dance primary</li>
<li>Robocup junior Dance secondary</li>
<li>Robocup junior Rescue primary</li>
<li>Robocup junior Rescue secondary</li>
</ul>
<p>If you are interested, you can go for more details on the official website of the event the link is as follows: <a href="http://www.romecup.org/" target="_blank">http://www.romecup.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/03/10/romecup-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line Follower project start</title>
		<link>http://www.it-robotix.net/en/2011/03/05/line-follower-project-start/</link>
		<comments>http://www.it-robotix.net/en/2011/03/05/line-follower-project-start/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 21:56:20 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[LineFollower]]></category>
		<category><![CDATA[Robot]]></category>
		<category><![CDATA[alimentazione]]></category>
		<category><![CDATA[LDO]]></category>
		<category><![CDATA[LiPo]]></category>
		<category><![CDATA[roboteck]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=337</guid>
		<description><![CDATA[The Line Follower project begins to take form not only in my mind, but on paper at least for the moment, my intention is to build a &#8220;prototype&#8221; that will allow me to assess from time to time until new parts arrive at a solution &#8220;final&#8221; to be able to offer a certain level of [...]]]></description>
			<content:encoded><![CDATA[<p>The Line Follower project begins to take form not only in my mind, but on paper at least for the moment, my intention is to build a &#8220;prototype&#8221; that will allow me to assess from time to time until new parts arrive at a solution &#8220;final&#8221; to be able to offer a certain level of performance. For this reason I will use in this project so dear to me the philosophy of modularity, although this time given the small share power and motor control section gets a little &#8216;difficult.<br />
The first analysis I did on the project was based on understanding what materials I&#8217;d be able to &#8220;recycle&#8221;, so the choice fell on two of the Solarbotics motors, which then are the same as I have already mounted on <a href="http://www.it-robotix.net/robot/fire/" target="_self">FIRE</a>. For motor control, the idea is to use a L293D, which already contains inside the recycles diodes, I immediately discarded the possibility of use L298 as too cumbersome, and these motors should not require run too highto exceed capacity of the 293.<span id="more-337"></span></p>
<p>Established the system of locomotion, think about how to power the motors and the logic of the Robot. Always an issue of space, the first idea was to use 4 AA batteries and a battery holder than with springs, for the chance to change them easily. Doing a little calculations, however, we immediately see that this solution, as it can not go, because if we look at 4 common AA batteries 1.5V we have a total of 6V that are a bit short for a logic that operates at 5V, also using a LDO stabilizer, just because you are discharging batteries slightly to have issues. In addition you must consider also the H-Bridge, because of the internal circuits, which are applicable to motor down the voltage of 2.5V, would power the engines with 6-2.5=3.5V and a voltage too low for slightly engine that arise from 6 volts to say lose a lot of engine speed, considering that on a LF robot speed is an important factor, this is not a valid choice. Of course the discourse worse thinking about using rechargeable batteries that are 1.2 V per cell.</p>
<p>So here is the first problem, the H-bridge need also because the engines will be controlled in PWM, I would like to avoid choosing something different to L293, at least for now, so it remains for me to raise the voltage. There are two possibilities, increase the number of batteries, which would mean more space and more weight, or add a elevator voltage circuit, which means increasing the complexity and cost of the robot.<br />
After we have reasoned slightly, ask for advice from friends Roboteck to have their opinion, which was almost unanimous to the use of Li-Po, it was actually a solution that I had never considered because of costs, that have changed over time, in fact for good NiMH batteries would cost about €4 so it will have to use six-element is the total €24, while watching one of the shops are of good modeling from 7.4V LiPo (2 cell 3.7V) 1800mAh (20C) at 20 €. Excluding the small price difference, what changes dramatically is the size and weight (80g difference).</p>
<p>On LiPo a clarification however to be made, batteries are slightly delicate, so they are managed wisely, you first need charger so special it&#8217;s better not to improvise because the LiPo could also explode, when they are used then you should not ever fall below a certain threshold voltage (3V per cell) after which the battery may also be damaged.<br />
Without all these premises, also dictated by a number of recommendations received, I moved on to design the schematic of the power supply that is what you see in the picture.</p>
<div><img class="pie-img aligncenter" src="http://lh3.ggpht.com/_ndUeRg81MJ8/TXKtdZrzNQI/AAAAAAAABdc/jpBvQdvXDSc/Alimentazione.png?imgmax=576" alt="Circuito di alimentazione per il nuovo Robot Line Follower" width="576" height="256" /><img style="margin: 10px 10px 10px 10px;" alt="" /><img style="margin: 10px 10px 10px 10px;" alt="" /></div>
<p>Starting from the left the two inputs X1 and X2 are the connector of the LiPo battery from 7.4 V, first there is a resistive divider whose purpose is to reduce the tensionwhich is pulled at the point indicated by VBAT and sent to a ADC input to be measured, the purpose is to control the charge state of the battery during operation of the robot and, if necessary in case the voltage drops below a certain threshold, the splitter is used to reduce the tension that comes to ADC, considering that a fully charged battery the voltage will be higher than the 8Volt. The engines will be powered directly from the battery to the logic I added an LDO regulator (IC1) with classical configuration of input and output capacitors. In the circuit I just add a diode (D1) before the regulator to prevent reverse polarity, some may have noticed, however, that the engines, or better to the H-bridge goes directly to the battery voltage without going through the diode, this need my choice to avoid additional voltage drop to the engines, and are willing to sacrifice everything else that H-bridge electronics, even if damage is almost impossible, since the battery connector is polarized, however.<br />
The next step will be to start putting the pieces together, ie to see the engines assembled on the support of vetronite that will also house the electrical power and motor control.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/03/05/line-follower-project-start/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Finally arrived mbed</title>
		<link>http://www.it-robotix.net/en/2011/02/08/finalmente-e-arrivato-mbed/</link>
		<comments>http://www.it-robotix.net/en/2011/02/08/finalmente-e-arrivato-mbed/#comments</comments>
		<pubDate>Tue, 08 Feb 2011 12:50:29 +0000</pubDate>
		<dc:creator>bobboteck</dc:creator>
				<category><![CDATA[Componenti]]></category>
		<category><![CDATA[mbed]]></category>

		<guid isPermaLink="false">http://www.it-robotix.net/?p=332</guid>
		<description><![CDATA[Finally has arrived the mbed, in the box I found the board, and USB cable to connect it to your PC, printed on a sheet the simple instructions to register on the site, a couple of copies of the pin-board and an adhesive, in other words everything is ready for use. When connecting mbed to [...]]]></description>
			<content:encoded><![CDATA[<p>Finally has arrived the mbed, in the box I found the board, and USB cable to connect it to your PC, printed on a sheet the simple instructions to register on the site, a couple of copies of the pin-board and an adhesive, in other words everything is ready for use.</p>
<p>When connecting mbed to your PC, you will see a new removable disk, which is the flash memory of mbed where we will download our software, of course, if we look at the properties it is a few KB (never seen one so small USB storage;-)) as also indicated in the instructions leaflet, opening this disk is inside an html file which is simply a redirect to the registration page on the site of mbed.<br />
<span id="more-332"></span>Little information to fill out and you register for immediate access to the authenticated site, I saw that one side is given a serial number which should be relative to your mbed, but I have not investigated whether or not there is a direct link . The authenticated section remembers the Social Network, we first get to their home from which you can access other pages, all to share projects, libraries, references to other social networks (FB, Twitter, LinkedIn), show how other favorites users, and other features that I have not had the opportunity to explore, we are certainly not to the levels of FB, but there are several useful features, although at first glance, something is missing, such as could be a feed of the evolution of projects that you are following.</p>
<p>The highlight however is the &#8220;Compiler&#8221;, by clicking on this link opens in a new window in your browser development environment, from here you can manage their own projects, but you can also search, and import into your workspace all projects / public libraries created by users, just to point out another feature of navigation, when you meet interesting projects are available to access the shortcuts section of the compiler with the imports already configured to load the project you were watching.<br />
The site still provides good documentation at this link there are explanations to start using the development environment: <a href="http://mbed.org/handbook/Creating-a-program" target="_blank">http://mbed.org/handbook/Creating-a-program</a>.</p>
<p>When you create a new project is generated once the code to perform the flashing of one of the 4 LEDs on the card, but just do a tour of the various projects to understand how to make simple changes and begin making the simple play of light with 4 LEDs, maybe going to import some projects already.<br />
In the short time I could dedicate yesterday I saw that there is also the possibility of using the USB connection, normally used to program the card, also for communication with the PC, just install a driver (the driver is only required for Windows ), and the connection will be seen as a serial, then using a terminal program (like HyperTerminal) and configure it as indicated on the site you may establish bidirectional communication with the PC.<br />
To test how it works, just open the window of the Compiler, create a new project and write code that follows:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p332code8'); return false;">View Code</a> C</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p3328"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code" id="p332code8"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include &quot;mbed.h&quot;</span>
DigitalOut myled<span style="color: #009900;">&#40;</span>LED1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #009900;">&#41;</span>
   <span style="color: #009900;">&#123;</span>
      myled <span style="color: #339933;">=</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">;</span>
      wait<span style="color: #009900;">&#40;</span><span style="color:#800080;">0.2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <a href="http://www.opengroup.org/onlinepubs/009695399/functions/printf.html"><span style="color: #000066;">printf</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Hello World!n&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      myled <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
      wait<span style="color: #009900;">&#40;</span><span style="color:#800080;">0.2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The standard output, but also the standard input is the serial port using printf then write directly on the terminal. Now just save the project and start compiling, after which the bowser start downloading a file &#8220;bin&#8221; with the name of our project. This file, which can be downloaded directly into the memory of mbed, our program is compiled, now just start the terminal program on your PC and then press the reset button on mbed, usually as a result we have the LED flashing, but will appear on the terminal &#8220;Hello World!&#8221; that will be repeated for each cycle of the code.</p>
<p>I must say, I was very impressed by the simplicity with which I managed to get this result, in other similar situations (PIC <-> PC) I spent much more time, and it required a much better knoledge of the object I was using, but in this case with an hour of &#8220;play&#8221; I came to this result.<br />
Certainly the topics tested are very simple, instead I was interested in using the USB as host and I got lost in the maze of various documents found on the site, but this is certainly a more complex issue that surely requires further study, because it is the first time that I try and I also lack the basics.<br />
I hope soon to have time to spend and begin to explore new things, I will keep you updated on the various experiences, but if in the meantime, you have a question or questions to be clarified, just ask, let&#8217;s see if I can help you <img src='http://www.it-robotix.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.it-robotix.net/en/2011/02/08/finalmente-e-arrivato-mbed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
