Tagged with picoos

LPCXpresso IDE & Pico]OS

LPCXpresso is a low-cost development platform for NXP’s Arm-based microcontrollers. In addition to hardware boards it includes a quite nice eclipse-based IDE, which seems to use gcc as compiler. I really haven’t bothered very much about it myself until another hobbyist asked me about tips for running Pico]OS -based applications in that environment for his LPC1769 board.

I myself have been using Eclipse CDT (3.8 currently) and Yagarto (arm gcc toolchain for windows environment). I don’t have a LPC1769 board myself, but instead I have an Olimex LPC-1343 board I have used to test cortex-m port of Pico]OS. Both are cortex-m3 boards so they should be suitable for testing basic architecture functionality. (more…)

Wireless KWh meter

After creating wireless compost monitor I was wondering what else could be done with the same card. I then saw a commercial about a gadget which displays house electricity usage in real time. The idea of the device is to help saving of energy. The gadget had a small box that apparently monitors how frequently the led on KWH-meter blinks (on our meter, it blinks once per 1 Wh) and sends that information to indoor visual display unit, which converts it into kilowatts.

kwh_schematic

Schematic for KWH meter monitor

The commercial gadget looks really nice, but of course I had to make my own. The MOD-CCRF card is just perfect for system like this. I just added a phototransistor with pull-up resistor to keep on eye on the blinking led. After checking that my “eye” was really able to see the blinking led I added some code to existing wireless monitor application to calculate house electrical power from blink count. The monitor unit sends the data then to same wireless access point as the compost unit for saving results in database.

kwh

Monitoring unit attached to KWH meter. Box contains the MOD-CCRF card with phototransitor circuit and two AA sized batteries.

Our KWH meter is in a small ‘closet’ which has a transparent plastic door. By attaching velcro strips to the door and back of the monitor box I was able to position the unit exactly over the blinking led.

I also created a simple chart to monitor results (last trend at bottom of page).

sensor-kwh-20130205.zip

Wireless compost monitoring

Biolan composting unit in our backyard.

Every family produces some waste that is suitable for composting. Our family uses a Biolan fast composting unit to convert that stuff eventually to soil. This is very easy to do during summertime, but in winter when the temperature drops below -15 °C it becomes a much harder job. Too many times have I found myself witnessing the unit in condition where inside temperature is near zero or even below it. After that it is very hard to get it working again before warm spring days come to fix the situation.

To provide some tools to avoid this I figured that it might be a good idea to put a temperature monitoring device into the composting unit. Ideally this would be a small device with radio, batteries and temperature sensor in waterproof box that I could throw into unit. Based on these requirements, Texas Instruments MSP430 CPU seemed like an obvious choice.

I really didn’t have much knowledge about MSP430 before this project so I ordered ez430-RF2500 development kit, which contains two MSP430F2270 boards with 2.4Ghz radio and internal temperature sensor. I used these boards to develop a port of Pico]OS for MSP430 and to test Simpliciti (a Texas Instruments radio stack). Creating Pico]OS port for the cpu was remarkably easy as the architecture is not at all too complex. Simpliciti stack required some work, because I had chosen a free mspgcc (Gnu GCC port for this cpu) as my compiler. Luckily there were some patches floating around in the net for this. (more…)

Temperature monitoring

This is actually on an old project I wrote back in 2006 using uIP v0.9. It uses a DS1820 sensor to measure my storage room temperature and send it in UDP packet to my database server. Database server then has software to alert me if temperature gets too low during winter.

Project has now been rewritten to use my picoos-net library, which allowed me to add a simple web server to system quite easily. I still use original hardware, which is either Olimex LPC-E2129 or Embedded Artists Ethernet Quickstart board (this is not available any more I think). To simplify testing, it is also possible to compile project for native unix program.

Main task of system sets up networking and initializes OneWire bus. After that it periodically scans the bus for sensors, reads temperatures from those and sends a UDP packet to database server. Main loop calculates also hourly average from temperatures and maintains history of those averaged values for one day. (more…)

uIP, Pico]OS and telnet servers

I started working with computers when only user interface was commonly command prompt. Maybe because of that I like my devices to have one, although I don’t object having graphical user interfaces or web pages in any way. They are nice, but command prompt is cool. (more…)