4/09/2014

XBee remote temperature sensor

There were some questions over time on how the remote sensors on my XBee network are actually wired up and I discovered that I only showed the sensor as is and never explained the wiring. So now this is done with this post and a breadboard picture made with Fritzing:

Remote temperature sensor with XBee

Hardware
The actual remote sensor has the components just soldered to a stripboard (which works for years now outdoors without any problems). For voltage regulation I use the low quiescent current LDO from Microchip MCP1700-3302E (3.3V, TO-92 style, ~1µA quiescent current consumption). There are 1µF ceramic capacitors both on the raw voltage input and the regulated output (just followed the typical application advice on the datasheet).
The temperature sensor TMP36 is wired to Ground, the Vout is connected to pin 20 of the XBee (AD0/ DIO0/ commissioning button) and Vin is wired to pin 13 (ON/ SLEEP).

The trick with consuming power for the temperature sensor only when the XBee is awake is to wire it to pin 13 (ON/ SLEEP) which is only powered when the XBee is awake.The sensor takes about 50µA when powered and is fast enough to get a temperature measurement while the XBee is not sleeping and takes samples from the AD0-Input (pin 20 XBee).

Temperature sensor on stripboard
My sensors are all powered with three AA cells for now and there is enough room from about 4.8 volts when full and fresh to 3.3 volts when it hits the regulated voltage. The sensor even works below that because I think the supply just gets pulled through the voltage regulator when at or below the regulated voltage.
The circuit draws only about 2.3µA when the XBee sleeps and about 40mA when awake but only for a very short amout of time. So the batteries last about are year or longer.


Software
 There is not much software involved beside configuring the logic on the XBee. Those are my settings:

SENDER: (REMOTE SENSOR )
END DEVICE
ATID 2001 (PAN ID)
ATDH 0
ATDL 0
ATD0 2     pin 0 in analog mode with TMP36
ATIR 3E8  sample rate 1000 millisecs (hex 3E8)
ATSM 4     sleep mode cyclic sleep mode
ATSN B     number of sleep periods (hex B = 12 decimal)

ATSP 7D0  sleep period (hex 7D0 = 2000 ms * 10 = 20 seconds)
ATST 7D0  time before sleep 2 seconds (hex 7D0 = 2000 ms)

Output on a custom made display-box for the kitchen with bus schedule
So the sensor is configured to sleep for four minutes (roughly, the oscillator in the XBee circuit seems to be either imprecise or temperature sensitive) then waking up for two seconds, powering the temperature sensor, sampling two times and then go to sleep again. That's all it does. Voila!

There is still room to improve the project. For example one could add an energy harvesting module to the circuit so that no batteries are used to power the device. Another nice feature would be to take a measurement of the actual battery voltage, which could be done with a simple high resistance voltage divider on one of the analog inputs. It might also be clever not to wire the temperature sensor to pin 20 which is also the comissioning button just in case your XBee is reluctant to wake up.

3/13/2014

Malaysia Airlines MH370 whereabouts and the technical part of it

The mystery of the whereabouts of Malaysia Airlines flight MH370 continues and all my thoughts go to the family members having relatives on board of the disappeared Boeing 777-200.

But there is also technical part of the whole story and regardless of the outcome it's worth having a look at the different systems which are involved electronically.
There are four main systems which provide communication between an airplane and the ground. The oldest one, which helped the british army to identify their german counterparts, is the

 

Primary Radar

High frequent impulses are sent out by a (ground) station into the air and if they are deflected they echo back to the receiver at the (ground) station. The time the signal runs can be calculated and from that the distance and direction of the "object" is derived.
Primary radar signals have to be interpreted so it's sometimes not easy to judge if the "object" is a plane or a flock of birds. There are also limits due to the range of the radar waves and other factors like weather.
Some producer of flying (military) objects - stealth planes - even use their outer shape to avoid any de- or reflection of the radar waves.
To support the findings of the passive primary radar most of the planes, helicopters etc. send out an active transponder signal which is termed

 

Secondary Radar

Where the word "radar" stands for an active transmission of a signal coming from aboard a flying object. Well known as "transponders" the device sends an active signal which can be of different quality. The earliest systems gave an identifier or answer code (aka "Squawk code") so that the signal of the primary radar and the received signal of the transponder could be matched.
Today a system known as "ADS-B"  - Automatic Dependent Surveillance - Broadcast - is used in many (commercial) airplanes. Once the systems on the plane are on, ADS-B is also automatically activated. Already on ground the system gets automatically interrogated by ground (radar) stations so that the signals can be matched. But those newer systems not only give an identifier, but also lots of other data like speed, altitude, heading and more. The Boeing 777-200 MH370 is equipped with those systems. The range also depends both on the (height/ distance) of the airplane and the quality of the receiving (ground) station.
The frequency of ADS-B is 1090MHz.


Voice Radio Transmissions

Even if many of the processes in aviation are automatically done there is still a lot of live voice communication between pilots an (ground) stations. This is done mostly on VHF (Very high frequency). The normal air radio frequencies are between 108 and 137 MHz. Military often uses other (higher) frequencies.
As with all high frequencies the transfer of messages underlies technical constrains like range, weather, power of the sender, height, and receiver sensitivity. So in some parts of the world there still have to be used less sophisticated radio signals to get contact to the ground.

 

ACARS - Aircraft Communications Addressing and Reporting System

Another active system is known as ACARS  - Aircraft Communications Addressing and Reporting System. It does what the name implies - it actively, automatically, un-interrogated sends data live to the ground or up to a satellite. Data can be of any quality - from simple status messages to extensive data reports from systems on the plane. Allmost all commercial aircrafts send those data to their headquarters relayed by radio stations around the world.
As allegedly done and reported by the Wall Street Journal the MH370 sent (engine) data for hours into the flight. Depending this is true it is still the question of what quality the data was.
-UPDATE Malaysian officials have told there were no ACARS radio transmission after losing contact to MH370. Last ACARS transmissions were at 01:07AM local time -
The radio transmissions are done in some of the air band frequencies so they underlie the some constraints as mentioned above.

There are other means of identifying flying objects like satellites which are capable of visual or radio tracking, flying radar/ radio stations like AWACS-planes (Airborne Warning And Control System) and other and more secret ways to identfy objects in the airspace.
But those are special ways and normally not involved with commercial aviation.

2/17/2014

New Project: DIY 3D-Filament Extruder

Filament extruding machine

I'm a lot into 3D-printing the last months so it was quite silent with news in the blog. Staring at plastic building up in layers so thin you can barely see them is very fascinating as it builds up a new dimension one is not used to see. But the plastic material called "filament" for 3D-printers is neither very cheap nor you have a great choice of colors or materials (yet).


Layer as fine as 10 micrometer printed with my Ormerod 3D-printer
So my very new project is building a DIY 3D-filament extruder. Yes, there are already projects like Filabot and Filastruder out there, but I could not find real DIY projects among them.

It happened that I worked as a holiday job at a plastic recycling factory almost thirty years ago, that did exactly what I'm planning to do now - extruding filament from pellet like material. It's a personal challenge to return to this.

It's not only a challenge to build such a machine but also to get it producing high quality materials that print either very thin layers (see photo) or different materials with certain characteristics, that can be easily reproduced in every aspect like quality, diameter etc.

So stay tuned for the developments here.

DIY  Project "Print your laser"

I'm also working on printing the 3D-parts for Markus' (same name but not me ;) ) awesome print your laser project, with other people at our Makerspace Attraktor in Hamburg. Markus wants to build a DIY CO2 laser from parts readily available and of course as cheap as possible. At the moment we are testing the end caps for the plasma tube and getting them as airtight as possible.

It's fascinating how 3D-prinitng opens a whole new way to design and produce things like twisted tubes buried into parts which would be impossible to make with conventional and relatively affordable tools like a lathe or CNC milling machine. Of course it's possible to do things like this for quite some time as there a professional and very expensive ways to do this - but DIY-wise and making with low budget is the real new way getting things done.

But it still needs to design the stuff with CAD-programs (lots of open source like OpenSCAD available), prepare it for 3D-printing (like slicing the 3D-models), getting the right materials and troubleshoot the prints for their very application. 3D-printing for everyone is still a bit out there.

In the video (timelapse) above you can see a small part of the end cap for the laser tube printed on my new Ormerod 3D-printer from RepRapPro.




8/08/2013

How-to convert a cheap IKEA Samla box into a Maker-box

Cheap box for makerstuff converted into lockable case


IKEA samla box
I really like those cheap IKEA Samla boxes. They are very well suited for a lot of stuff especially when you move makerstuff to the makerspace or friends. Available in different sizes and stackable (you can stack different sizes on top of each other) and a separate lid you can also store stuff at home.

But one thing what was always annoying me is that you can't fix the lid to the box or even more could lock the box. So I designed three cheap ways to make the box lockable and secure.

Old PC screws, wire an rawlplugs
Velcro to join lid and case together
One way is to take some old spare PC screws and wires, drill holes into the lid and case and join the wire and the rawlplug with a screw. You then can secure the lid to the box by pushing the rawlplugs through the lid and box. In order not to loose the plugs you can secure them with wire and a screw.


Suitcase lock
Much simpler but a little bit more costly is to use some velcro. A velcro tap on the lid and on the box connected by a strip of velcro secures the lid to the case but this solution is less rugged.




If you have to secure the box against unwanted access, just drill a hole in one side big enough to apply a cheap little suitcase lock. The other side is secured by a keychain ring. Et voilá. Stuff secured.

8/06/2013

Power supply for remote sensors

Presentation: How to supply power to microcontrollers/ (remote) sensors with low dropout (LDO) voltage regulators and batteries


"Classic" 7805 Voltage regulator
On August 5 I had a short presentation at the Makerspace Attraktor in Hamburg on how to supply independent power to devices like standalone microcontrollers or (remote) sensors.

 The talk gave some comparison about different low dropout voltage regulators which are by design very well suited for battery powered devices. Decision finding on what parts are most suited and design considerations for independent sensors were explained detailing a remote temperature sensor project I'm working on for about two years now.

XBee temperature sensor


You can find the presentation (in english) here

If you want to stay in touch with new projects or blog entries you can follow me on twitter

7/30/2013

Arduino and Android control speed and direction of RC Surfer

Accelerometer sensor controls throttle and rudder


My RC surfer project (see last Blog entry) evolves into much more work than thought and the last addition is the control of the dc motor speed and the rudder with the Android phone.

Using the accelerometer sensor x- and y-axis values which are sent via bluetooth to the Arduino board I can in-/ decrease the speed of the motor by turning the phone up and down. To control the rudder I have to flip the phone to the left or to the right.

The reaction time with the first code on Android/ Arduino was kind of slow. I had to optimize the code and now it reacts almost in real time. Only the voltage value which is displayed on the phone is jumping when there is (too) much load on the system. I might have to add some isolation to the Arduino power supply to avoid too much noise when the motors draws much current.

The next thing I will do is to design a PCB which fits into the free space of the RC surfer in the forward compartment. So it's EAGLE time!

7/22/2013

Temperature sensor current consumption

1 year with batteries - temperature sensor project

Temperature sensor with alkaline batteries
Just a quick update on my XBee/ LCD/ temperature sensor project which I originally started in 2011 (last blog entry: XBee temperature sensor project ). I  had to replace the already used battery cells which I put into the sensor about one year ago (August 31 2012) because I got some timeouts on my receiver. The
voltage came down to 3.34 volts and this is a point where the low dropout regulator (MCP1700) keeps quit working sometimes even when the load is only about 25 mA every four minutes when the XBee (end device, sleeping) sends the temperature data to the coordinator.

Voltage development temperature sensor
The three battery cells had a voltage of around 4.1 volts when I started using them for the sensor, so they were already down from their original voltage/ capacity which is around 1.5 volts per cell for unused batteries.
Why did I use used battery cells and not new ones? Because they were lying around and I was wondering how long some spare, already used cells would last during time and different weather conditions. And they lasted almost one year!

The temperature sensor is located outside and we had temperatures of around -15 to +30°C during the year. The chart you see is far from scientificly accurate but gives you a raw picture of the voltage curve for those cells (GP super alkaline).

Next I will replace the batteries with some rechargeable batteries. There are some nice energy harvester ICs on the market - maybe this will be the next power supply for my sensors. Stay tuned.