Category Archives: OpenWRT

Visualizing room temperature pattern with IoT

On my desk there is an IoT device that measures temperature and log data to the Internet. It is a hobby project build with Texas Instruments MSP430 series MCU, with an IR temperature sensor TMP006 (Infrared Thermopile Contactless Temperature Sensor) also from TI.

tmp006-fan2

The temperature data are published via an OpenWRT TP-Link router to Exosite which is running a partnership program with TI on IoT services.

tmp006-fan3

Last night I noticed something I never noticed before – a clear pattern of a less fluctuating period (around 19:00 to 21:00).

TMP006-fan

Possible cause: I turned off the fan to go dine out. When I’m back the fan is back on, added to the environmental factor that my body temperature and the turbulence from the fan lead to the fluctuation – just wild guess, it’s weekend 🙂

Advertisements

R on BeagleBoard with LCD and Android UI

After the successful installation of R in BeagleBoard XM, it is natural to come up with a concept of a calculator running R. The ingredients are simple: a small form factor BeagleBoard, a LCD screen, a simple keypad. R can run on Android but as a keypad passionate, no touch screen is better than the feel of real key punch.

As a proof of concept and also a weekend project, the R on the BeagleBoard is “bridged” across an Apache web server (also on the BB), to be accessed by an Android app which act as input device for R commands. Result returned from R is then forwarded to an 16×2 LCD screen from a previous IoT prototype with TI MSP430 MCU and a TP Link portable router with OpenWRT.

Rportable1

A little delay, but works.

The Android app is done in MIT App Inventor. It is a very nice graphical, easy to use, completely web based application to build Android app. No typing of code is required.

Rportable3

Improvised semi-automatic timer to record long running Nspire calculations

In recent calculator overclocking tournaments, some programs took over more than a few minutes to finish. In extreme cases, programs run over an hour. The size of data set of these long running calculations are not realistic in most cases for hand held calculators, but for the sake of overclocking comparison, they are attempted to obtain the time required.

Instead of just watching and waiting the calculator prompt to return and stop the stopwatch, a makeshift timing device is developed with an aim to automatically record the benchmark calculation run time on the TI Nspire. The device is simple and make use of the following components:

This device works in the following way:

  • The back-light of the Nspire will be on for the whole period running the benchmark calculation.
  • When the program is finished, the back-light will turn off after a predefined period, which is a user configurable setting.
  • An LED will act as an light sensing diode, and is placed on top of the Nspire screen. The voltage will be measured by the LaunchPad, and send periodically through the 703N router to Exosite.
  • From repeated testing the difference in voltage when the back-light is on and off are determined. This make it possible to set an alarm on Exosite with that known threshold.
  • The time to start the calculation is recorded manually. After starting, the task of taking the finish time will be taken care of by the Exosite alarm timestamp, as triggered by the drop in voltage detected from the turning off of the back-light.

lighttimer4

Best result of the LED threshold is obtained when working in the evening and lights are turned off. Although the time taken is not as accurate as taken manually by stopwatch due to the delay between measuring of consecutive LED voltage (set as around 4 seconds to avoid flooding Exosite), it should be good enough for long running calculations that span a quarter to more than an hour. Better methods for timing may exists (e.g. internal timers on the Nspire itself) but this improvised one with simple devices and a free cloud service worked quite well, for the best part is automation so that I no longer have to look out from time to time to check if the calculation is finished.

Barrier Breaker

Finally got a chance to upgrade the little TP-Link WR703N to Barrier Breaker which was released last October.

Standard fresh upgrade from a stock 703N at http://192.168.1.1/ with basic authentication admin/admin.
openwrtbb1

Welcome screen displayed soon after flashing.
openwrtbb2

The recipe for Barrier Breaker:
openwrtbb3

66% storage remaining. Hmm.. extroot might not work for this release.
openwrtbb4

Upgraded interface.
openwrtbb5

Overall nothing exciting for this release so far. Look forward to Chaos Calmer.