GND - Fab-Lab Europe

Transcription

GND - Fab-Lab Europe
EVALUATION BOARD/KIT/MODULE (EVM) ADDITIONAL TERMS / DISCLAIMER
Fab-Lab.eu provides the enclosed Evaluation Board/Kit/Module (EVM) under the following conditions: The user
assumes all responsibility and liability for proper and safe handling of the goods. Further, the user indemnifies
Fab-Lab.eu from all claims arising from the handling or use of the goods. Should this evaluation board/kit not
meet the specifications indicated in the User’s Guide, the board/kit may be returned within 30 days from the date
of delivery for a full refund without any modification made. THE FOREGOING LIMITED WARRANTY IS THE
EXCLUSIVE WARRANTY MADE BY SELLER TO BUYER AND IS IN LIEU OF ALL OTHER WARRANTIES, EXPRESSED,
IMPLIED, OR STATUTORY, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
PURPOSE. EXCEPT TO THE EXTENT OF THE INDEMNITY SET FORTH ABOVE, NEITHER PARTY SHALL BE LIABLE TO
THE OTHER FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Safety Information and Safety Instructions
The Platinchen aka “BlueIOT” is intended for use as a development, demonstration, evaluation, education
platform for hardware or software in a laboratory environment. The kit is not intended for general consumer use. It
generates, uses and can radiate radio frequency energy. It has not been tested for compliance with the limits
applicable under any standard. Operation of the equipment may cause interference with radio communications, in
which case the user at his own expense will be required to take whatever measures may be required to correct
this interference. Fab-Lab.eu recommends that the kit only be used in a shielded room. Attaching additional wiring
to this product or modifying the product operation from the factory default may affect its performance and cause
interference with other apparatus in the immediate vicinity. If such interference is detected, suitable mitigating
measures should be taken.
The Platinchen aka “BlueIOT” kit contain electrostatic discharge (ESD) sensitive devices. Electrostatic charges
readily accumulate on the human body and any equipment, which can cause a discharge without detection.
Permanent damage may occur on devices subjected to high-energy discharges. Proper ESD precautions are
recommended to avoid performance degradation or loss of functionality. Store unused Platinchen aka “BlueIOT”
kit in the protective shipping package. Platinchen aka “BlueIOT” might be discontinued without notice. Contact
your nearest recycler to discard the kit.
ESD Protection and Handling Boards
ESD can damage boards and associated components. Fab-Lab.eu recommends that the user perform
procedures only at an ESD workstation. If an ESD workstation is not available, use appropriate ESD protection by
wearing an antistatic wrist strap attached to a grounded metal object. Platinchen aka “BlueIOT” boards are
sensitive to ESD. Hold the board only by its edges. After removing the board from its box, place it on a grounded,
static-free surface. Use a conductive foam pad if available. Do not slide the board over any surface.
Battery Care and Use and Battery Disposal
§
§
§
Use the correct size and type of battery specified in this guide.
Make sure that you insert the battery into your device properly, with the + (plus) and – (minus) terminals
aligned correctly. Do not short the battery. Do not subject the battery to high temperatures or high
humidity. Do not recharge a battery.
Caution! Dispose the battery properly and keep out of reach of children. If swallowed, immediately
contact a physician
Batteries can be safely disposed of with normal household waste. Never dispose of batteries in fire because they
can explode. It is important not to dispose of large amounts of batteries in a group. Used batteries are often not
completely “dead.” Grouping used batteries together can bring these “live” batteries into contact with one another,
creating safety risks.
Trademarks:
The Bluetooth trademark is owned by the Bluetooth SIG Inc., USA and is licensed to Bluegiga Technologies. All
other trademarks listed herein are owned by their respective owners.
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
Welcome to blueIOT an experimental platform for wearable and Internet of
Things. The blueIOT board is made by Maker for Maker – it will provide an easy
start in combining the power of Arduino™ and Bluetooth™ Smart aka BLE.
Before you start:
Nevertheless BLE might be new to you – we recommend checking for BLE tutorials on our
webpage, books or any other source giving you an inside into BLE first. Having BLE
Explorer Apps on you Smartphone might be a good advice before starting!
Check that you have an FTDI with 3.3V handy!
It is an educational platform provided as is it is - with know issues as software and hardware
development is still on going.
Board Details
blueIOT is made in ist core out of two main components: ATmega328P MCU from ATMEL
and the BLE112 Bluetooth™ Smart Module from bluegiga. The design follows ultra-lowpower efficiency: all not must have components (LDO, etc) have been removed to avoid any
unwanted power drain. This gives you in the best configuration a managed sleep of just a
few uA! So please take care out our safety instructions and recommendations!
Use only one power source at a time: 3.3V FTDI OR COIN CELL CR2032 OR 2xAA (1.5V)
OR 2xAAA (1.5V) – Remove any battery if your FTDI will provide the supply voltage!
Must stay in these range of power supply: Min: 2.0V MAX: 3.3V, over voltage will kill the
board. Make sure that you connect the battery properly, with the + (plus) and – (minus)
terminals aligned correctly, reverse voltage will kill the board
Brown Out: BLE module will run down to 2.0V before resetting, ATmega328P is set to run
down to 1.8V BODLEVEL (fuses Extended:FE, High:DA, Low:FF)
RevC: Contains Transmitter Module FCC ID: QOQBLE112
RevD: Contains Transmitter Module FCC ID: QOQBLE113
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
PIN
3V
GND
D2, D5, D8, D10
PAD TYPE
Supply voltage
GND
Digital I/O (max Supply voltage)
A0, A4, A5
Analog Input (max Supply
voltage)
Factory only
Reset
Serial (max Supply voltage)
21, 22
RST
RxD, TxD, DTR
DESCRIPTION
Supply voltage 2V - 3.3V
GND
Configurable I/O port, see Arduino
if you do have the version with
micro SD card slot – D8 is used for
CS, don’t use for external
Configurable I/O port, see Arduino
Factory only P2_1, P2_2
Active low reset
FTDI 3.3V or serial UART
PinOut$9$blueIOT$
P2_2$
P2_1$
RST$
3V$
MISO$
SCK$
MOSI$
D10$
D8$
DTR$
A0$
A4$
A5$
RxD$
GND$
D2$
TxD$
D5$
+3V$
Coin$Cell$
CR2032$
GND$
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
Getting Started
Setting up the Arduino DIE, download Arduino IDE >= 1.0.5 and follow in installation guide.
Copy the Arduino Libraries provided with the blueIOT SDK to your Arduino/Library Folder!
Wiring up the 3.3V FTDI (we recommend the 3.3V FTDI from Sparkfun):
1. Select the right Board, blueIOT is compatible with Arduino Pro or Pro Mini (3.3V, 8Mhz) w/
ATmega328, please make sure you only select this board!
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
2. Select the COM: port your FTDI is connected to – ATTENTION: make sure you are using
an 3.3V FTDI only – otherwise blueIOT will be killed as of over voltage. Any Coin Cell or
battery MUST be removed while using FTDI power.
The blueIOT kit comes with a pre-loaded Arduino sketch “blueIOT_read_LED5”, sending „5“
via the write BLE service (see example screenshots) will switch the LED on!
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
#include
#include
#include
#include
<Wire.h>
<LowPower.h>
<SPI.h>
<SoftwareSerial.h>
SoftwareSerial blueIOT(6, 9);
void setup(){
Serial.begin(9600);
delay(1000);
blueIOT.begin(9600);
// BLE Module wakeup - HIGH prevents module to go to sleep mode
pinMode(3, OUTPUT);
digitalWrite(3, HIGH);
// TEST LED on PIN5
pinMode(5, OUTPUT);
blueIOT.write(20); // BLE buffer size
delay(1000);
}
void loop(){
if (blueIOT.available()){
char c = blueIOT.read();
Serial.write(c);
if (c == '5') {
digitalWrite(5, HIGH);
}
else {
digitalWrite(5, LOW);
}
}
}
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
Using „BLExplr“ from M. Kroll in Apple iOS
Connected to UART Characteristic sending a Write String „5“ – LED ON
Connected to UART Characteristic sending a Write String „0“ – LED OFF
The samle UUID as shown above can be used to receive sensor data send from
blueIOT!
LED is ON? – conragtulations you have used your first BLE service!
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
Theory of Operation
See SDK for code sample
The distance you can bridge with the blueIOT is in the range of 0-10m depending on
environment, this is due to the current small design with extra shielding, can be improved
giving the ceramic antenna more space in future designs. We have seen this current design
is doing a good job in Lab environment and any project that is in view of a receiver.
Programming and BLE Profile
The current implementation of the UART profile allows easily sending and receiving data
from/by the Arduino. The typical payload for each data transmitting is 20 Byte long.
#include <SoftwareSerial.h>
SoftwareSerial blueIOT(6, 9); // don’t change
...
blueIOT.begin(9600); // don’t change
...
blueIOT.write(20); // set length of BLE buffer
blueIOT.write(buffer);
...
// read
if (blueIOT.available()){
Serial.write(blueIOT.read());
}
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
blueIOT SDK
The SDK provides you with code samples – start with blueIOT_read and blueIOT_write
examples to get the BLE communication running – if you are solid is this – which should be
straight forward – you can try building a motion activated fitness tracker with the ADXL362.
Important: copy the libraries content to you Arduino/Library folder, check for Arduino IDE
instructions if you are not familiar with this step.
Activation OTA mode of blueIOT
The blueIOT comes with a very helpful over the air update for BLE profiles, this feature is
only for advanced users knowing what they do – as wrong operation might lead to deleting of
any profile stored on the module. If such a status occurs only factory reset or having an CC
Debugger (TI) and BLE development environment can help.
You do need now a program, which support OTA for BLE113 – our recommendation is the
„BLExplr“ written by Dr. M. Kroll available on Apple iOS. The OTA mode can only be reset
while running actually an OTA update. So if you don’t have the recommended APP nor
OTA files don’t use this feature.
Part of the SDK is the factory OTA: blueIOT_REVD_101.ota
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
Programming and Debugging BLE Device
Schematic of blueIOT in Revision C:
Note: BLE112 in RevC, BLE113 in RevD
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
blueIOT$und$FTDI$3V!!$
P2_2$
P2_1$
RST$
3V$
MISO$
SCK$
MOSI$
D10$
D8$
DTR$
A0$
A4$
A5$
RxD$
GND$
D2$
TxD$
D5$
blueIOT$und$ADXL362$
P2_2$
P2_1$
RST$
3V$
MISO$
SCK$
MOSI$
D10$
D8$
DTR$
A0$
A4$
A5$
RxD$
GND$
D2$
TxD$
D5$
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D
blueIOT$und$BMP180$
P2_2$
P2_1$
RST$
3V$
MISO$
SCK$
MOSI$
D10$
D8$
DTR$
A0$
A4$
A5$
RxD$
GND$
D2$
TxD$
D5$
Additional Learning Resources
1. Datasheets
blueIOT is widely compatible to the Arduino Mini Pro 3.3V / MHz:
http://arduino.cc/en/pmwiki.php?n=Main/ArduinoBoardProMini
Specifications of the used Bluetooth™ Smart module you can find here:
https://www.bluetooth.org/tpg/RefNotes/BLE112_Datasheet1.pdf
Adverture in Low Power Land:
https://www.sparkfun.com/tutorials/309
ADXL362 + Arduino: Using Interrupts to Implement Motion-Activated Sleep
https://ez.analog.com/docs/DOC-2261
https://ez.analog.com/docs/DOC-2222
2. Bluetooth Learning Resources
The Bluetooth Developer Portal provides material by the Special Interest Group (SIG) for
learning various aspects of the Bluetooth Low Energy protocol and systems.
3. Technical Support
Please conact mail@Fab-Lab.eu for technical support only after you have checked generic
information on Arduino and BLE programming first – THANKS.
www.Fab-Lab.eu, 2014-2015, Version 2.0, blueIOT Revision D