Difference between revisions of "EmonTx Arduino Shield"

From OpenEnergyMonitor Wiki
Jump to: navigation, search
(Port Map)
(JXakIjrz)
Line 1: Line 1:
=emonTx Arduino Shield=
+
I should pbrlaoby have used some paste, but couldn't be asked    I've checked the temperature of the engine block vs. that reported by the sensors, and it was within 1 degree, so good enough.The cuboids are low voltage/power signal relays, 5V which can be driven directly from the Arduino's pin outs. One of them is used to drive the remove switch functionality of the generator control unit (DeepSea 3110), i.e. to turn it on or off.The other relay is to turn the radiator fan on and off, but that relays is used to drive a second automotive relay which can handle the current. There's a third relay there, which is the solid state relay for switching the 80W extractor fan and of off, but I've not connected it yet.
'''An open-hardware wireless energy monitoring Arduino compatible (Duemilanove,Uno and Leonardo) shield.'''
+
 
+
{|
+
[[File:EmonTx Shield top3D.png|400 px|emonTx Shield Front]]
+
[[File:EmonTx_Shield_Back.png|300 px|emonTx Shield Back]]
+
 
+
|}
+
 
+
See non-invasive section of [http://openenergymonitor.org/emon/buildingblocks building blocks ] for theory behind CT energy monitoring.
+
==Overview==
+
*Apparent Power, Real Power*, Power Factor* and AC RMS voltage readings*
+
*4 x CT Current Sensor input
+
*AC 9V RMS voltage sensor input
+
*433/868Mhz RFM12B (HopeRF) wireless transceiver to transmit/receive data to other OpenEnergyMonitor and JeeNode modules
+
*On-board DS18B20 digital temperature sensor (not included as standard)
+
*Status LED
+
*Compatible with Duemilanove,Uno and Leonardo
+
*Compatible with OpenEnergyMonitor modules (emonGLCD, emonBase - NannodeRF etc.)
+
<nowiki>
+
* </nowiki> with [http://shop.openenergymonitor.com/components/ 9V AC adapter ]
+
 
+
==Design Files & Part List==
+
 
+
{| class="wikitable"
+
!Quantity
+
!Part
+
|-
+
|10x
+
|470K (yellow, violet, yellow, gold)
+
|-
+
|5 x
+
|10uF
+
|-
+
|4x
+
|33R 1% (orange, orange, black, gold, brown)
+
|-
+
|4x
+
|10K 1% (brown, black, black, red, brown)
+
|-
+
|4x
+
|4K7 (yellow, violet, red, yellow, gold)
+
|-
+
|4x
+
|3.5mm jack (Rapid: 20-0157)
+
|-
+
|1x
+
|0.1uF (100nF)
+
|-
+
|1x
+
|470R (yellow, violet, brown, gold)
+
|-
+
|1x
+
|100K 1% (brown, black, black yellow, brown)
+
|-
+
|1x
+
|2.1mm DC barrel
+
|-
+
|1x
+
|RFM12B 868/433Mhz (HopeRf)
+
|-
+
|1x
+
|82mm/165mm Ant
+
|-
+
|1x
+
|3mm LED
+
|-
+
|''1x''
+
|''DS18B20 temperature sensor (not included as standard)''
+
|-
+
|1x
+
|6 pin ISP header (female)
+
|-
+
|2x
+
|6 pin header*
+
|-
+
|2x
+
|8 pin header*
+
|-
+
|}
+
<nowiki>
+
* </nowiki>or 1 x 28 pin header
+
 
+
 
+
See OpenEnergyMonitor Shop for [http://shop.openenergymonitor.com/100a-max-clip-on-current-sensor-ct recommended CT] and [http://shop.openenergymonitor.com/components/ recommended plug-in AC-AC adapter]
+
 
+
See [http://openenergymonitor.org/emon/buildingblocks building blocks] for more information on CT's and AC-AC adapters.
+
 
+
'''The emonTx Shield schematic and board design in Eagle CAD format can be viewed and downloaded from the [http://solderpad.com/openenergymon/emontx-shield emonTx Shield SolderPad Git Repo]'''
+
 
+
==Build Guide==
+
Follow the component labels on the PCB using the part list above to identify the components and the completed build photo below to double check the correct placement:
+
 
+
 
+
[[File:EmonTxShiledV1.0_front_web.png|200 px|emonTx Shield Top]] [[File:EmonTxShiledV1.0_rear_web.png|200 px|emonTx Shield Top]]
+
 
+
[[File:EmonTx Shield top2D.png|300 px|emonTx Shield Top]]
+
 
+
 
+
===Hardware Setup Instructions===
+
 
+
 
+
 
+
On the top of the board there are two solder jumpers which '''need to be connected before emonTx Shield can operate'''. To make connection the middle solder pad should be connected with a blob of solder to either the left of right solder pad, depending on the connection required. The solder can be re-melted and adjusted at a later date if required.
+
+
 
+
[[File: EmonTxShield solderJumper.jpg|300px]]
+
 
+
 
+
====RFM12B Slave Select (SS) Solder Jumper Setting====
+
 
+
 
+
 
+
The left hand solder jumper determines which Arduino digital I/O is used for the RFM12B SS pin. Digital 10 is the default for the [http://github.com/jcw/jeelib JeeLib library]. '''For standard operation Connected the solder jumper to 10 by connecting the middle pad to the left pad shown in the [http://wiki.openenergymonitor.org/index.php?title=File:EmonTx_Shield_top2D.png this image]. '''
+
 
+
 
+
However if Digital 10 is required by another shield (e.g Arduino Ethernet) another free digital pin can be used for the RFM12B CS pin. There are two options available to do this. The first option requires more hardware modification, while the second requires more software modification. We recommend the first option:
+
 
+
# '''Option 1''':
+
#* Ensure the RFM12B CS pin solder jumper is not connected (middle pad not soldered to either left of right hand pads).
+
#* Solder a wire from the middle pad (there is a hold available for this, see image above) to either Digital 8 or 9.
+
#* Make sure you are using the latest [http://github.com/jcw/jeelib JeeLib library]
+
#* In your sketch add the line <code> rf12_set_cs(8) </code> or <code> rf12_set_cs(9) </code> depending on your chosen pin before rf12 initialise in void setup. 
+
#* The steps above work for both Arduino Uno (ATmega328) and Lenoardo (ATmega32u4)
+
 
+
#'''Option 2'''
+
#* Digital 5 can be used as the RFM12B CS pin by connecting the solder jumper up the other way.
+
#* Modifying the JeeLib library is required since Digital 5 is on a different port
+
#* For pin 5 to be used as the SS pin the line <code> rf12_set_cs(5) </code> must be added before rf12 initialise in void setup.
+
#* and the following lines must be added to RF12.cpp in the JeeLib library in the <code> void rf12_set_cs(uint8_t pin) </code>function:
+
 
+
 
+
If you're using an Arduino Uno (ATmega328) add the following to the <code>#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__)</code> section of <code>void rf12_set_cs(uint8_t pin)</code> function in RF12.cpp file:
+
<syntaxhighlight lang="cpp">
+
if (pin==5)
+
{
+
cs_pin = 5;        //PD5
+
#define SS_DDR      DDRD
+
#define SS_PORT    PORTD
+
}
+
</syntaxhighlight>
+
 
+
If you're using an Arduino Leonardo (ATmega32u4) add the following to the <code>#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__)</code> section of <code>void rf12_set_cs(uint8_t pin)</code> function in RF12.cpp file:
+
<syntaxhighlight lang="cpp">
+
if (pin==5)
+
{
+
cs_pin = 6;        //PC6
+
#define SS_DDR      DDRC
+
#define SS_PORT    PORTC
+
}
+
</syntaxhighlight>
+
 
+
====RFM12B Interrupt Solder Jumper Setting====
+
 
+
 
+
 
+
The right hand solder jumper sets the RFM12B interrupt pin. The setting of this jumper depends on which Arduino board the shield is connected. '''Connect the jumper to Digital 2 for Arduino Uno/Duemilanove or Digital 3 for Arduino Leonardo.''' These pins connect to the special hardware interrupt pin INT0.
+
 
+
 
+
For more information on RFM12B connection to Arduino see this [http://openenergymonitor.org/emon/buildingblocks/rfm12b-wireless this building block section]
+
 
+
I agree, but this is not the case, specially in third world cuortnies (like Argentina, which is where I'm from)You may be able to ask someone to buy it for you, but then again why are there local distributors if they aren't going to distribute these products at all? It defeats the purpose entirely.And I must say, so far I'm not impressed by their solutions.To me it all comes down to the real cost and availability of the product, other features are not exactly a priority most of the time.Then you would have to have a big community and support system, should I encounter a problem I want good software and people to help me out  This is true with AVR and PICs, I don't know about TI's product.Just my view.
+
 
+
==Example Arduino Sketches==
+
 
+
See emonTx Shield Folder in [https://github.com/openenergymonitor/emonTxFirmware emonTx Firmware examples GitHub Repo]
+
 
+
Follow instructions on the GitHub readme for required Arduino libraries
+

Revision as of 04:03, 18 February 2013

I should pbrlaoby have used some paste, but couldn't be asked I've checked the temperature of the engine block vs. that reported by the sensors, and it was within 1 degree, so good enough.The cuboids are low voltage/power signal relays, 5V which can be driven directly from the Arduino's pin outs. One of them is used to drive the remove switch functionality of the generator control unit (DeepSea 3110), i.e. to turn it on or off.The other relay is to turn the radiator fan on and off, but that relays is used to drive a second automotive relay which can handle the current. There's a third relay there, which is the solid state relay for switching the 80W extractor fan and of off, but I've not connected it yet.