Next post: http://www.element14.com/community/groups/internet-of-things/blog/2014/08/24/sample-upload-to-plotly-success

 

Thanks to Element 14 for selecting me as a roadtester for the Backyard Challenge. Press release about the finalists:

 

10 projects are based on the new Texas Instruments chip CC3200 providing Internet connectivity over WiFi. Data can be graphed and analysed using Plotly.

Now Internet of Things (IoT) becomes more and more popular. It sounded like a joke around year 2000 that in future every light bulb in the park might have an IP address, but soon this vision may become true.

 

 

For a couple of last years my dream was to automate watering of a tomato greenhouse.

There is a nice tutorial how to make automated watering system here:

http://hydroponiceconomics.com/blog/hydroponic-systems/guide-self-watering-outdoor-container-garden

 

It is known that for cucumber growth is needed 30-32 degrees and for tomato growth is needed 28-30 degrees.

Lower temperatures decrease productivity. Every degree below the optimum decreased crops by 6%.

With a help of IoT monitoring of growth could be implemented.

 

 

14. Aug. Setting up Wi-Fi in the garden

 

I  have set up internet in the garden greenhouse using Android GSM phone with WiFi tethering creating an access point. In future TI CC3200 boards will connect to internet via it. The garden is 300 m away from home and  Mmay be Yagi or dish antennas could help to establish connection, but there are some trees in the way.

Here are time-lapse photos that Android phone uploads every 10 min to a webserver using MobileWebcam app:

Android MobileWebcam

Enter live greenhouse ==>siltumn.jpg


VIMEO Time-lapse over 1 month HD 25 FPS

https://vimeo.com/107553247


Youtube 25 FPS

https://www.youtube.com/watch?v=tR3jYQX2Xow




Samsung i5500 Android phone <100EUR provides HD quality photos. It should be possible to run OpenCV on the collected photos, extract and plot tomato size/growth rate, sun light conditions, air temperature from the inset, soil surface drying, water condensation, wind deformation on the greenhouse, door status. For wind speed one could use a windsock like seen in airports. Pretty many parameters to extract from images, Wow!


Android phone measures temperature by built in temperature sensor and temperature is imprinted on the picture.

 


Technical details how to build GSM mobile webcam I have summarized here previously:

GSM Android phone as HD outdoor webcam

Please write me if I you decide to build a similar camera and would like to have a free picture storage folder on webserver

http://85.254.232.222

 


15. Aug. Kit arrives without a booster pack


CC3200 kit was delivered next day directly to the home door. Thanks a lot!

FuelTank Booster pack has not arrived. It would be nice to have a booster pack has a LiPo that is rechargeable from USB.

The board could be powered from two AA (NiMH) batteries that sounds like the last century.

boost.jpg

It would be interesting to try CC3200 Camera Booster Pack Rev 3.0 with MT9D111 Camera Module when it is in production. Resolution would be probably VGA.

From TI forum: "The camera booster pack is being finalized for production and you should see that released early/mid 3Q this year. Stay tuned!"




16 Aug. Solar-driven energy-harvesting water pump

20140816_104913.jpg

In the weekend I have set up a solar-driven 12V water pump to bring water from the pond to a container at the greenhouse.

To be able to run the pump in cloudy days I use energy harvesting in a 1F supercapacitor. Technical details I have summarized previously

Energy Harvesting for Solar-driven Water Pump

During sunny conditions it pumps 10 liter bucket full in 4 minutes. (2 l/min = 120 l/h). Useable pumping height is up to 2 m.


I plan to use the TI CC3200 Wi-Fi board to measure

  • sunlight
  • count the running time of the pump
  • temperature air/soil/water
  • water level in pond and in tank to prevent overfilling and motor dry run.
  • soil moisture
  • air humidity
  • water flow sensor 1...30 l/min
  • camera boosterpack




17 Aug. IoT garden lamp proposal


A possible product to show on a Maker fair could be a modified solar garden lamp that one could "plant" in a suitable place(s).

 

lamp.png

IoT garden lamp could include

  • CC3200-LASUNCHXL, solar charging of AA rechargeable batteries
  • temperature air/soil
  • light (Si photodiode)
  • Ultraviolet UV index (SiC photodiode)
  • water condensation / rain
  • air humidity
  • air pressure
  • soil moisture
  • wind speed (vibration sensor or ptopeller)
  • PIR motion detector
  • LED lights
  • camera boosterpack (when becomes available) to photograph  cats and intruders.
  • dust/smog senor (optical made by SHARP)
  • CO2 sensor
  • ambient sound average level

 



 

19 Aug. Beehive

 

Today I am visiting my uncle who is a beekeeper. I told him about IoT possibility to measure beehive temperature, humidity and weight.

He told that major unsolved problem would be to predict bee swarming. In hot days about a half of bees from strong colonies leave their hive with the new queen.

It is a large loss for the beekeeper. In hot days is necessary for someone to sit there and observe bee activity.

 

May be I could make a bee counter exiting the hive using LED+photodetector like in robotics or TV remote control. Increased bee number from one hive could probably be an indication of swarming. For a test I placed an Android phone in front of hive exit. May be one could think of and algorythm for bee counting using image processing. Activity changes considerably, for example, when it started to rain, it a lot of bees were suddenly returning home within a few minutes.

bee.png

 

 

 

Aug. 20  CC3200-LAUNCHXL out of the box. Connecting to Internet - success

 

Good starting point is the user guide and Wiki. Followed the quick start guide. Plugged-in CC3200 board to USB power. A new Wi-Fi AP appeared "mysimplelink-2B29F8"

Connected from a PC to it and browsed 192.168.1.1. Tried out the 4 demos. It worked great out of the box!


BYCICLE ALARM idea

The vibration demo, I think, could be for bycicle security. I store my bycicle in a hallway. It is locked to a pipe, but nevertheless, last year bycicle got stolen during the night.

 

Simplelink Wi-Fi app from Google Play was not listed as installable on my phone that is Android 2 phone, probably Android 4 is needed.

 

As It was not documented in the demo, I tried to guess what to do without using an Android phone, just from a PC.

In setup/WiFi Connectivity Profiles Settings/Add profile/ I specified the WiFi AP to which the board should connect

SSID: LU_ASI     Type: WPA2     password: **********     Actually the password was not just 0-9,A-F but all letters worked fine for me.


To switch the board to client mode removed jumper from P58&VCC. Access point "mysimplelink-2B29F8" dissapeared.

I ran IP-Scanner program and also looked at Wi-Fi router connections. A new device appeared as 192.168.0.100 and I could connect to it from a PC browser.

Board shows Current Status: Online.  Now the links to datasheets are working.

Success!

 

In future for Internet connection troubleshooting it would be great if AP and client modes would run simultaneously, allowing to run the CC3200 board similarily to a Wi-Fi a router. Now it is not possible as one has to physically switch jumper for changing between AP/client modes.





21 Aug    Building the Project0 for CC3200 "Blinky"


Very helpful is Programmers guide.

Design files

Installed software following getting stared guide. Got stuck when compiling, see error message below.  Googled forum, found that WinAVR and CygWin should be removed from the Windows PATH variable. Did not help in my case. It is a feeling that we roadtesters are liike pioneers, because there are practically no examples how to use the boards by amateurs, just the offical datasheets from TI.  

----------------------------------------------------

0 [main] sh 7748 open_stackdumpfile: Dumping stack trace to sh.exe.stackdump

C:/Users/Hydrogen/AppData/Local/Temp/make75856-1.sh: line 1:  7748 Segmentation fault      (core dumped) c:/ti/ccsv6/tools/compiler/arm_51~1.7/bin/armar -qa c:/users/hydrogen/appdata/local/temp/tic407~1/rtsv7m4_t_le_eabi.lib *.obj

gmake.exe[1]: *** [library] Error 139

>> ERROR: mklib: gmake error during rtsv7M4_T_le_eabi.lib build

warning #10207-D: automatic RTS selection:  resolving index library "libc.a" to "c:\ti\ccsv6\tools\compiler\arm_5.1.7\lib\rtsv7M4_T_le_eabi.lib", but "c:\ti\ccsv6\tools\compiler\arm_5.1.7\lib\rtsv7M4_T_le_eabi.lib" was not found

warning #10062-D: entry-point symbol "_c_int00" undefined

undefined   first referenced

  symbol         in file

__STACK_END ./startup_ccs.objerror #10234-D: unresolved symbols remain

warning #10202-D: no suitable entry-point found; setting to 0

>> Compilation failure

error #10010: errors encountered during linking; "blinky.out" not built

gmake: *** [blinky.out] Error 1

gmake: Target `all' not remade because of errors

--------------------------------------------------

 

On another freshly installed Windows7 64 bit PC got CSS running without the error message above. Upon installation I selected to install all features. Afterwards installed the CC3200 package from file and CC3200_RTOS from Install packages.

 

Blinky example and GPIO example with pushbuttons controling LEDs worked.

Need to press "green bug" button. Then code is uploaded, but halted at first line. Then "play button". Problem on my PC is that I can not stop debugigng. Need to unplugUSB.

But only until the board was powered or reset pressed. After disconnecting 5 V the new programm was gone.

This is because linker writes to SRAM and probably need to use Uniflash utility for permanent storage.

Example to get time from timeserver did not work. It does not contain code for Wi-Fi.

Example for Wi-Fi Client need to look at serial COM port output using Putty serial.

Wanted to mention that  can see UART output using Putty serial terminal at 115200 speed.

Best useful example is GetWeather. It connects to a weather server and returns city temperature. It is well commented and useful to build up IoT application.

 

 

25. Aug Out Of the Box Example

 

As logical next step was to try to debug Out of the Box example OOB. It worked.


I could not find where is html code of the example. It appeared that it is put in a html directory under example directory.

I edited html code. Rebuilt project, and started to debug. Http pages had not changed.

It appeared that need to install and use Uniflash to flash html code to a flash chip. CC3200 stores webpage code in a flash chip.

 

Now modified example changed appearance.

ti.png

I am now trying to understand how data are passed to the html code and back.

 

 

Preparing parts for the watering system

 

For Water height measurement in a 200l barrel I have made a special stick. Inside a sealed plastic water pipe tubing is a resitor divider made of 10k resistors separated by 5 cm. Resistor chain is shorted to GND using reed relays activated by a floating magnet.

Optical and capacitive methods would not be good as water gets algea growing in it and covering all surfaces.

Sparkfun eTape liquid level sensor would be good to use but I learned too late about it.

watering pipes.pngwater metering stick.png meter.png

 

 

 

I have prepared water distribution pipes to each tomato plant and plan to deploy the system during next vegetation season.