<?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>AutomazioneDomotica.it</title>
	<atom:link href="http://www.automazionedomotica.it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automazionedomotica.it</link>
	<description>Impianti di domotica per la casa e automazione degli edifici a basso costo.</description>
	<lastBuildDate>Mon, 14 May 2012 23:23:58 +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>Differenza Arduino 328 vs. Arduino Mega 2560</title>
		<link>http://www.automazionedomotica.it/hardware/differenza-arduino-328-v-arduino-mega-2560/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=differenza-arduino-328-v-arduino-mega-2560</link>
		<comments>http://www.automazionedomotica.it/hardware/differenza-arduino-328-v-arduino-mega-2560/#comments</comments>
		<pubDate>Sun, 05 Feb 2012 23:01:15 +0000</pubDate>
		<dc:creator>Giuseppe</dc:creator>
				<category><![CDATA[hardware]]></category>

		<guid isPermaLink="false">http://www.automazionedomotica.it/?p=148</guid>
		<description><![CDATA[Finalmente è arrivato in laboratorio il fratello maggiore della famiglia Arduino, cioè il super Arduino Mega 2560. Adesso possono iniziare i nuovi test per il progetto di domotica con arduino, aggiungendo più funzionalità e soprattutto con la possibilità di controllare molte più porte. Già a prima vista la differenza è abissale. Rispetto alla versione &#8220;base&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automazionedomotica.it/wp-content/uploads/2012/02/arduino_mega25601.jpg"><img class="alignleft size-full wp-image-150" style="margin: 0 10px 5px 0; border: 1px solid #bbbbbb; padding: 1px;" title="arduino mega2560" src="http://www.automazionedomotica.it/wp-content/uploads/2012/02/arduino_mega25601.jpg" alt="" width="150" height="150" /></a>Finalmente è arrivato in laboratorio il fratello maggiore della famiglia Arduino, cioè il super <strong>Arduino Mega 2560</strong>. Adesso possono iniziare i nuovi test per il progetto di domotica con arduino, aggiungendo più funzionalità e soprattutto con la possibilità di controllare molte più porte. Già a prima vista la differenza è abissale. Rispetto alla versione &#8220;base&#8221; (Arduino 328), sono infatti presenti ben 16 porte analogiche e <strong>56 porte digitali</strong> (si, hai letto bene, 56!). Altro aspetto importante, nell&#8217;<strong>arduino 2560</strong>, sono state rese disponibili un maggior numero di porte pwm (utilissime per il controllo di led rgb) e soprattutto altre 3 porte seriali grazie alle quali sarà quindi possibile usare la scheda di <strong>Arduino come gateway knx</strong>, modbus, o altri diversi protocolli seriali diffusi nella<span id="more-148"></span> domotica.</p>
<p>Fondamentale è la presenza di 4KB di ram (<strong>Arduino 328</strong> ha solo 1KB di ram) che permette di eseguire codici più lunghi e complessi. Unica accortezza da tenere presente è lo spostamento delle <strong>porte SPI</strong>, per cui, ad esempio, il <strong>ethernet shield</strong> non funzionerà se attaccato sopra arduino nel solito modo (stackable), bensì dovrà essere <strong>collegato a parte</strong> rispettando la corrispondenza dei <strong>pin miso, mosi, sck, ss</strong>.</p>
<p>Inizia quindi una nuova serie di test che aprono le porte a nuovi <strong>progetti per la domotica con Arduino</strong>. A questo punto il primo obiettivo è la <strong>migrazione da Arduino 328 ad Arduino 2560</strong>, per tutto ciò che è stato sviluppato fin ora.</p>
<p>Per praticità, riporto qui di seguito una descrizione dettagliata trovata in rete:</p>
<p>&nbsp;</p>
<h3>Description</h3>
<p>The Arduino Mega 2560 is a microcontroller board based on the ATmega2560 (<a href="http://www.atmel.com/dyn/resources/prod_documents/doc2549.PDF">datasheet</a>). It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega is compatible with most shields designed for the Arduino Duemilanove or Diecimila.</p>
<h3>Summary</h3>
<table border="0" cellpadding="0">
<tbody>
<tr>
<td>Microcontroller</td>
<td>ATmega2560</td>
</tr>
<tr>
<td>Operating Voltage</td>
<td>5V</td>
</tr>
<tr>
<td>Input Voltage (recommended)</td>
<td>7-12V</td>
</tr>
<tr>
<td>Input Voltage (limits)</td>
<td>6-20V</td>
</tr>
<tr>
<td>Digital I/O Pins</td>
<td>54 (of which 14 provide PWM output)</td>
</tr>
<tr>
<td>Analog Input Pins</td>
<td>16</td>
</tr>
<tr>
<td>DC Current per I/O Pin</td>
<td>40 mA</td>
</tr>
<tr>
<td>DC Current for 3.3V Pin</td>
<td>50 mA</td>
</tr>
<tr>
<td>Flash Memory</td>
<td>256 KB of which 8 KB used by bootloader</td>
</tr>
<tr>
<td>SRAM</td>
<td>8 KB</td>
</tr>
<tr>
<td>EEPROM</td>
<td>4 KB</td>
</tr>
<tr>
<td>Clock Speed</td>
<td>16 MHz</td>
</tr>
</tbody>
</table>
<h3>Memory</h3>
<p>The ATmega2560 has 256 KB of flash memory for storing code (of which 8 KB is used for the bootloader), 8 KB of SRAM and 4 KB of EEPROM.</p>
<h3>Input and Output</h3>
<p>Each of the 54 digital pins on the Mega can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:</p>
<ul>
<li><strong>Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX).</strong> Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.</li>
<li><strong>External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).</strong> These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the attachInterrupt() function for details.</li>
<li><strong>PWM: 0 to 13.</strong> Provide 8-bit PWM output with the analogWrite() function.</li>
<li><strong>SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).</strong> These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno, Duemilanove and Diecimila.</li>
<li><strong>LED: 13.</strong> There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it&#8217;s off.</li>
<li><strong>I<sup>2</sup>C: 20 (SDA) and 21 (SCL).</strong> Support I<sup>2</sup>C (TWI) communication using the Wire library (documentation on the Wiring website). Note that these pins are not in the same location as the I<sup>2</sup>C pins on the Duemilanove or Diecimila.</li>
</ul>
<p>The Mega2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.</p>
<p>There are a couple of other pins on the board:</p>
<ul>
<li><strong>AREF.</strong> Reference voltage for the analog inputs. Used with analogReference().</li>
<li><strong>Reset.</strong> Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.</li>
</ul>
<h3>Communication</h3>
<p>The Arduino Mega2560 has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega2560 provides four hardware UARTs for TTL (5V) serial communication. An ATmega8U2 on the board channels one of these over USB and provides a virtual com port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega8U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1). The ATmega2560 also supports I2C (TWI) and SPI communication.</p>
<h3>Physical Characteristics and Shield Compatibility</h3>
<p>The maximum length and width of the Mega2560 PCB are 4 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16&#8243;), not an even multiple of the 100 mil spacing of the other pins.</p>
<p>The Mega2560 is designed to be compatible with most shields designed for the Uno, Diecimila or Duemilanove. Digital pins 0 to 13 (and the adjacent AREF and GND pins), analog inputs 0 to 5, the power header, and ICSP header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available through the ICSP header on both the Mega2560 and Duemilanove / Diecimila. <em>Please note that I<sup>2</sup>C is not located on the same pins on the Mega (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.automazionedomotica.it/hardware/differenza-arduino-328-v-arduino-mega-2560/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progettazione bus seriale rs485 Arduino</title>
		<link>http://www.automazionedomotica.it/bus-di-comunicazione/progettazione-bus-seriale-rs485-arduino/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=progettazione-bus-seriale-rs485-arduino</link>
		<comments>http://www.automazionedomotica.it/bus-di-comunicazione/progettazione-bus-seriale-rs485-arduino/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 23:32:12 +0000</pubDate>
		<dc:creator>Giuseppe</dc:creator>
				<category><![CDATA[bus di comunicazione]]></category>

		<guid isPermaLink="false">http://www.automazionedomotica.it/?p=131</guid>
		<description><![CDATA[Bene, un pò di giorni di prove con il modBUS su arduino sono stati sufficienti per farmi cambiare filosofia sul rispetto ti tale protocollo. Gli standard sono una cosa bellissima, sono il primo a sostenerli, permettono il dialogo tra piattaforme diverse e forniscono suggerimenti per lo sviluppo. Quando però questi &#8220;suggerimenti&#8221; si traducono in overhead [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automazionedomotica.it/wp-content/uploads/2012/01/bits-bytes.jpg"><img class="alignleft  wp-image-132" style="margin: 0 10px 5px 0; border: 1px solid #bbbbbb; padding: 1px;" title="bits-bytes" src="http://www.automazionedomotica.it/wp-content/uploads/2012/01/bits-bytes.jpg" alt="trasmissione dati arduino" width="150" height="150" /></a>Bene, un pò di giorni di prove con il <strong>modBUS su arduino</strong> sono stati sufficienti per farmi cambiare filosofia sul rispetto ti tale protocollo. Gli standard sono una cosa bellissima, sono il primo a sostenerli, permettono il <strong>dialogo tra piattaforme diverse</strong> e forniscono suggerimenti per lo sviluppo. Quando però questi &#8220;suggerimenti&#8221; si traducono in <strong>overhead di sviluppo</strong> che supera il 20% del codice previsto all&#8217;inizio, allora lo standard comincia ad essermi antipatico, tanto più su una piattaforma come arduino dove le risorse sono molto limitate e faccio già fatica a farci stare dentro tutte le funzionalità che mi servono.</p>
<p>Con questa premessa, è presto spiegato il motivo per cui ho scelto di progettare un nuovo <strong>protocollo seriale per la domotica con arduino</strong>. Inizia quindi una nuova avventura con il <strong>bus485 di arduino</strong>. L&#8217;idea di base è quella di trasmettere pacchetti di dati (array di byte/char) i cui elementi assumono<span id="more-131"></span> significati precisi a seconda della posizione. Similmente al modBUS farò uso dei registri, ma con <strong>corrispondenza diretta tra registri e pin di arduino</strong>. La grande differenza invece, almeno rispetto al classico 8N1 molto diffuso per le porte seriali, sarà il <strong>pacchetto di dati</strong> trasmesso da arduino, che avrà <strong>dimensione variabile</strong> per essere più flessibile e risparmiare tempo nella trasmissione, lasciando quindi più libero il bus stesso per altre comunicazioni. Nulla esclude che si possano un domani arduino possa parlare altre &#8220;lingue&#8221; scrivendo dei semplici <strong>gateway per modBUS, canBUS</strong> o altri protocolli già diffusi.</p>
<p>In altre parole sarà un bus decisamente più semplice e specifico, un <strong>bus seriale per arduino e la domotica</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automazionedomotica.it/bus-di-comunicazione/progettazione-bus-seriale-rs485-arduino/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino: ethernet e seriale rs485 tra i nodi</title>
		<link>http://www.automazionedomotica.it/bus-di-comunicazione/arduinoconnessione-ethernet-seriale-rs485-nodi/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=arduinoconnessione-ethernet-seriale-rs485-nodi</link>
		<comments>http://www.automazionedomotica.it/bus-di-comunicazione/arduinoconnessione-ethernet-seriale-rs485-nodi/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 23:23:03 +0000</pubDate>
		<dc:creator>Giuseppe</dc:creator>
				<category><![CDATA[bus di comunicazione]]></category>
		<category><![CDATA[arduino bus seriale]]></category>
		<category><![CDATA[arduino ethernet]]></category>
		<category><![CDATA[bus rs485]]></category>
		<category><![CDATA[modbus arduino]]></category>
		<category><![CDATA[protocollo seriale]]></category>
		<category><![CDATA[rete di arduino]]></category>

		<guid isPermaLink="false">http://www.automazionedomotica.it/?p=112</guid>
		<description><![CDATA[Dopo varie analisi, lo standard di comunicazione che mi sembra avere la meglio è la lan ethernet, ma richiede come condizione che la scheda abbia sufficienti pin (ingressi/uscite) liberi da bastare per gestire ciascuna stanza (quindi atmega1280 o atmega2560), altrimenti diventa troppo oneroso il cablaggio. Il problema principale, oltre al peso della libreria ethernet, è [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automazionedomotica.it/wp-content/uploads/2012/01/Arduino-Uno-150x150.jpg"><img class=" wp-image-124 alignleft" style="margin: 0 10px 5px 0; border: 1px solid #bbbbbb; padding: 1px;" title="Arduino-Uno-150x150" src="http://www.automazionedomotica.it/wp-content/uploads/2012/01/Arduino-Uno-150x150.jpg" alt="arduino" width="150" height="150" /></a>Dopo varie analisi, lo standard di comunicazione che mi sembra avere la meglio è la <strong>lan ethernet</strong>, ma richiede come condizione che la scheda abbia sufficienti pin (ingressi/uscite) liberi da bastare per gestire ciascuna stanza (quindi <strong>atmega1280</strong> o <strong>atmega2560</strong>), altrimenti diventa <em>troppo oneroso il cablaggio</em>. Il problema principale, oltre al peso della libreria ethernet, è proprio che la scheda ethernet, per dialogare, si “mangia” diverse entrate/uscite preziose di arduino. Tuttavia grazie alla lan ethernet è facile comunicare con tutti i pc, tablet, cellulari, ecc… si possono scambiare facilmente dati in vari formati come xml, json, e non ultimo si può <strong>sviluppare una interfaccia web per il sistema domotico</strong> senza troppa fatica. Bisogna infine tenere presente che ogni volta che sia necessario sdoppiare il cavo, è necessario passare per un componente attivo (swicth), che quindi consuma corrente, se pur poca.</p>
<p><strong>I bus seriali</strong> invece mi lasciano un pò perplesso, sia per la <strong>difficoltà di essere full duplex</strong>, sia per il <strong>problema del multi-master</strong> (mi pare che il canbus risolva questa necessità) sia per<span id="more-112"></span> l’<em>implementazione del protocollo</em>. Ultimamente sto analizzando il <a title="protocollo modbus" href="http://it.wikipedia.org/wiki/Modbus" target="_blank"><strong>modbus</strong></a> che, viene usato da anni in modo stabile anche in processi industriali. I bus seriali, e mi riferisco in particolare al <strong>livello fisico della rs485</strong>, hanno tuttavia 2 grandi vantaggi: richiedono solo 2 linee di i/o, e <em>il cablaggio è molto semplice</em>, addirittura si può tagliare il cavo e attaccare altri nodi in parallelo in qualsiasi punto, dando origine a reti con una geometria molto varia, cosa che può veramente facilitare il cablaggio, specialmente per creare un <a title="impianto di domotica per la casa" href="http://it.wikipedia.org/wiki/Domotica" target="_blank"><strong>impianto di domotica</strong></a> in una casa già costruita</p>
<p>Ad ogni modo procedendo con lo sviluppo dei moduli aggiuntivi minori, sembra poter essere vantaggioro lo sviluppo di un <strong>bus dedicato</strong> e soprattutto semplificato, che non faccia uso di registri, ma abbia accesso diretto all’hardware riducendo quindi la latenza e il carico della cpu stessa di Arduino che non deve quindi fare polling per aggiornare costantemente i registri usati dal protocollo o controllare se sono cambiati e adeguare l’i/o fisico di conseguenza, perdendo quindi reattività… senza contare l&#8217;utilità di poter gestire il multimaster nel <strong>sistema domotico</strong>, e soprattutto la possibilità di <strong>diminuire il traffico sulla seriale rs485</strong>, che è bene lasciare libera il più possibile proprio in quanto <em>half-duplex</em> per la sua stessa natura fisica.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automazionedomotica.it/bus-di-comunicazione/arduinoconnessione-ethernet-seriale-rs485-nodi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apertura del sito</title>
		<link>http://www.automazionedomotica.it/automazione-domotica/apertura-del-sito/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apertura-del-sito</link>
		<comments>http://www.automazionedomotica.it/automazione-domotica/apertura-del-sito/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 16:13:08 +0000</pubDate>
		<dc:creator>Giuseppe</dc:creator>
				<category><![CDATA[automazione domotica]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[automazione]]></category>
		<category><![CDATA[bus di comunicazione]]></category>
		<category><![CDATA[domotica]]></category>
		<category><![CDATA[forum domotica]]></category>

		<guid isPermaLink="false">http://www.automazionedomotica.it/?p=72</guid>
		<description><![CDATA[Benvenuti! Dopo oltre 2 anni di esperimenti, discussioni con amici ed esperti del settore, migliaia di pdf e forum consultati, ecco il sito che raccoglierà tutta questa mole di informazioni, e soprattutto sarà una sorta di blog-laboratorio per lo sviluppo di un sistema di domotica economico, semplice e al tempo stesso completo, basato su Arduino. L&#8217;infrastruttura [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automazionedomotica.it/wp-content/uploads/2011/10/start_ferrari.jpg"><img class="alignleft size-full wp-image-139" style="margin: 0 10px 5px 0; border: 1px solid #bbbbbb; padding: 1px;" title="start_ferrari" src="http://www.automazionedomotica.it/wp-content/uploads/2011/10/start_ferrari.jpg" alt="avvio arduino" width="150" height="150" /></a>Benvenuti! Dopo oltre 2 anni di esperimenti, discussioni con amici ed esperti del settore, migliaia di pdf e forum consultati, ecco il sito che raccoglierà tutta questa mole di informazioni, e soprattutto sarà una sorta di blog-laboratorio per lo sviluppo di un <strong>sistema di domotica economico</strong>, semplice e al tempo stesso completo, basato su Arduino.</p>
<p>L&#8217;infrastruttura principale dell&#8217;impianto di domotica sarà costituita da una <strong>rete di nodi arduino</strong>, connessi tra loro via ethernet e <strong>bus seriali rs485</strong> a seconda delle esigenze, dei tipi e delle quantità di dati da trasferire.</p>
<p>Sicuramente ci sono altri siti che parlano di domotica con arduino, non stiamo inventando la ruota, in internet le informazioni sulla domotica sono pressochè infinite. Il nostro obiettivo è fare<span id="more-72"></span> un pò di ordine, raggruppare e sviluppare le idee che riteniamo utili con la finalità di un progetto di domotica, come scritto poc&#8217;anzi, semplice ed economico.</p>
<p>È a disposizione un <strong><a title="Forum" href="http://www.automazionedomotica.it/forum/">FORUM</a></strong> in cui scambiare idee e informazioni sulla domotica, arduino, bus di comunicazione, hardware vario, e quant&#8217;altro possa ruotare intorno all&#8217;argomento.</p>
<p>Grazie per la visita, a presto!</p>
<p>Lo staff.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.automazionedomotica.it/automazione-domotica/apertura-del-sito/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

