Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Sasha W

Pages: 1
1
General Discussion / How to use BLE4.0 Shield
« on: August 27, 2016, 04:56:39 AM »

BLE4.0 Shield is an arduino shield which based on TICC2541. The AT instruction set integrated by BLE4.0 module is simple and effective to use, and greatly shorten your developing period. Based on the bluetooth standard specification, Bluetooth Low Energy (BLE) technology allows BLE4.0 to further reduce peak power to half, comparing with traditional Bluetooth devices. The single-mode chip of Blue tooth4.0 (BLE) enables to work for a long time (up to several months even years), powered by single button battery. Instead, traditional Bluetooth technology generally asks for at least two AA batteries, meanwhile at most works for several days or weeks. The main disadvantage of previous blue tooth version is extremely low startup speed. For example, Blue tooth 2.1 spends 4s to startup, but it’s only takes 3 ms for Blue tooth 4.0 to startup. If comparing Blue tooth 2.1 to a basic “feature phone”, then, Blue tooth 4.0 would be a “smart phone”.
Hardware set up
Arduino UNO x1

BLE4.0 Shield x1

Test code
mobile device with Blue tooth 4.0 x1
Code: [Select]
#include <SoftwareSerial.h>
 
#define RxD 2
#define TxD 3
SoftwareSerial mySerial(RxD,TxD);
 
void setup()
{
    pinMode(RxD, INPUT);
    pinMode(TxD, OUTPUT);
    mySerial.begin(9600);               // the ble4.0 baud rate 
    Serial.begin(9600);                 // the terminal baud rate   
}
 
void loop()
{
    if(Serial.available())
    {
       mySerial.print((char)Serial.read());
    } 
 
    if(mySerial.available())
    {
       Serial.print((char)mySerial.read());
    }   
}
(1) plug 0 shield in ArduinoUNO, and use a jumper cap to short circuit ( D2-BT_TX, D3-BT_RX), open ArduinoIDE and download test code:


(2) open serial debugging window at right side of Arduino(baud rate 9600), send “AT” (attention: AT on this module should not add carriage return), we can see the module back to “OK”, then set the module to subordinate module:

check client-server mode: AT+ROLE? back: OK+GET:0 (“0” represent server mode, “1” represent client mode)

modify to server mode”AT+ROLE0″ back: OK+Set:0

check module name: AT+ROLE? back: OK+NAME:BLE_Shield

edit module name: AT+NAMExxx back: OK+Set:xxx

(3) install “lightblue” on mobile device, open software and search for Bluetooth devices, then connect to device named “BLE_Shield” and transfer data:

 
*click “listen for notifications” button monitor ( turn to “stop listening” after click it), receive data. Meanwhile, send test type string at ARduinoIDE serial port, and the data can be received:


*click ” Write new value”, send test type strings, and then you can receive type strings at ArduinoIDE sent by mobile device:


SCH: BLE4.0 Shield

AT: BLE4.0 AT Command
LED D1 :

When bluetooth ready to connection, LED blicking; when module have been connected device, LED continue bright.

press S1 ( for about 1s):

(1) module remains in sleeping mode:

module will return to normal mode, if open AT+NOTI, serial port will receive OK+WAKE

(2) module remains in connect mode:

module will initiate the request to disconnect

(3) module remains in standby mode:

module will restore to factory default setting.

SWITCH:

choose the GPIO level of micro-controller which connects with BLE4.0 is 3.3v or 5v.

2
General Discussion / How to Use Professional Wireless Weather Station
« on: August 25, 2016, 07:58:05 AM »
Functions and descriptions:

   1. Perpetual calender: from 1st/January/2000 to 31st/December/2099;
   2.The hour display format can be set between 12 hour format or 24 hour format. The time zone can be setfrom-12 to +12 (user setting);
   3. Daylight saving time is adjusted automatically (The daylight saving time is adjusted on the basis of differenttime zone);
   4.The date display format can be set as: YYYY-MM-DD,MM-DD- YYYY,DD-MM-YYYY(user setting);
   5. The RCC time function can be set between DCF mode or WWVB mode; In RCC mode, press any key to quit;In British, DCF signal can be received entirely.
   6. Wireless 433 MHZ receiving. Available distance: 100 meters in outdoor open field. While receiving RF, pressany key to quit;
   7. Indoor/outdoor relative humidity (RH %) display. Display range: 20% to 99%. Resolution: 5%;
   8. Indoor/outdoor temperature display. Display units options: ℃/℉(user setting). Indoor temperature range:0℃ to +50℃; Outdoor temperature range: -40℃ to +60℃; Resolution (for both indoor/outdoor temperature):±1℃
   9. Wind-chill temperature display. Display units options: ℃/℉(user setting);
  10. Dew-point temperature display. Display units options: ℃/℉(user setting);
  11. Atmospheric pressure (absolute pressure and relative pressure) display. Display units options: Hpa, Inhg ormmhg (user setting). Pressure display range: from 750hpa to1100 hpa;
  12.  The trend of the atmospheric pressure can be displayed via histogram. The time format can be set between12H format or 24H format (user setting);
  13. Wind speed and wind direction display. Average wind speed and gusts display. The units can be set asm/s,km/h,mph,knots or bft ( user setting ). Wind speed range: 0 to 50 m/s; Wind direction range:E,S,W,N,SE,NE,SW,NW;
  14.  Rainfall can be displayed on the basis of hour, day, week, month or total. The unit can be set between mm orinch (user setting); Available total rainfall is 9999mm;
  15.  Sunny, cloudy, overcast, rainy, snowfall, rainstorm can be forecast and displayed via six corresponding icons.These icons indicate different weathers and weather tendency;
  16.  All maximum/minimum data can be recorded and displayed. In addition, the time of recorded data can bedisplayed as well;
  17. The weather alarm can be set separately, any value can be set. The alarm signal lasts 2 minutes;
  18.  LED backlight. Press any key, backlight will be activated and lasts 10 seconds;
  19.  Indoor/outdoor low voltage detection. Sign flash appears while low voltage;
  20.  ConsumHow to set up

How to set up

1.Open the box

2.Refer to the manual and install the components.

3.Power on (install 3 x AA 1.5V) the indoor receiver first, and then install the batteries (2 x AA 1.5 V) in the outdoor transmitter, Pls DON’T have any button operations during this period, and keep WAITING for 10 minutesin order to let the indoor receiver has enough time to complete the signal matching. The data of the transmitter will update every 48 seconds. The screen of the receiver will show as below picture:

4.Setting parameters according to the manual. And you can start to enjoy the pleasure of this weahter station.

Link:  http://linksprite.com/wiki/index.php5?title=WS1030_Wireless_Weather_Station_with_Solar_Sensor

3
The programmer we are going to use in this tutorial is the AVRISP, which can be purchased at cutedigi. We wire an Arduino Uno to a ZIF socket with Atmega320 removed.

First, we need to download the Atmel Studio from here.

Second, install the Arduino IDE. The Arduino IDE can be downloaded from this location. The version we installed is Arduino 1.6. The bootloader is located in the following directory:

\Arduino\hardware\arduino\avr\bootloaders\optiboot

One pitfall we found is that the AVRISP’s COM port cannot be larger than COM8. Please make sure we configure the COM port of AVRISP to be somewhere between COM1 and COM8.

4

I needed to take temperature vs. time measurements for a piece of research equipment in order to determine how much time in advance someone should start prepping before they actually intend to use the equipment. In this case, prepping involves cooling down a metal thermal mass using liquid nitrogen in order to trap moisture in the surrounding air space via condensation.

I could have gone out and bought a more expensive temperature sensing product that may have done what I needed. However, given the simplicity of a thermocouple, combined with the specific list of requirements I had for my particular case, the more cost effective (and more fun) option was to build one myself that would meet my needs. For example, here are some of the requirements that made an inexpensive store-bought thermocouple unsuitable, and also further drove up the price of the more expensive special use options. The space I was measuring in was compact (about the size of a fist) and sealed by a gate valve during cooling, so we couldn’t just probe it while holding a read-out display. Therefore a second requirement was that the system had to be self contained by recording its measurement history so that it could be retrieved later. And third, liquid nitrogen temperatures (boiling point = -196C) are far beyond the range of cheap TMP sensors found in many temperature sensing electronics, so they could not be used.

The main benefits of the Data Logging Temperature Probe:

– Temperature measurements from -200C to +1300C with the same device (Note: The probe can get this hot, the electronics cannot)

– Incorporates NIST coefficients and calculations to compensate for non linear voltage response at extreme temperatures (near the measurement limits)

– Compact footprint, measuring under 2″ square and about 3/4″ thick, not including the probe and battery

– Measurement recording interval as fine as 1 second ( < 1 second for advanced users who wish to tweak the code)

– Capable of displaying measurements on a computer in realtime while recording them to the SD card simultaneously

– For a given data collection period, the total duration of data collection and the total number of data points scale with battery and SD card size.
Step 1: Gather Materials


A) Essential Materials I (you will probably need to buy):

– Adafruit Metro Mini 328 – 5V 16MHz

– Thermocouple Amplifier MAX31855 breakout board

– MicroSD card breakout board+

– K-Type Thermocouple – Any K-type thermocouple will work, the one I used is from MSC. You will need to remove the yellow plug housing with a screwdriver

B) Essential Materials II (you will need, but may already own):

– 18-22 Gauge Hookup Wire, Several Colors – Solid core wire recommended, but stranded wire like I used will do the job

– Thin Tin/Lead Solder with Flux Core

– Soldering Iron – This one even comes with some useful tools like a de-soldering pump and some solder to get you started

– 9V Battery Clip and a 9V Battery

– Prototyping Printed Circuit Board aka Perfboard

– MicroSD Card

C) Useful Materials (though not necessary to make this Instructable)

– Wire Cutter/Stripper

– Helping Hands w/ Magnifying Glass

– Solder Removal Copper Wick

– X-Acto Knife and Blades OR Rotary Cutting Tool w/ Abrasive Cutting Disk – For trimming perfboard to size

– Voltmeter w/ Continuity Testing

– Rosin Paste Flux

Pages: 1
SMF spam blocked by CleanTalk