31 July 2011

Reading date/time from GSM network

Still playing with the serial GSM modem to send SMSes, I investigated a way to obtain a timestamp from the network. Just in case I want to record an event and place it on the time line.
It turns out that the GSM network does not (always?) carry date/time information and the extended GSM AT command set does not provide a way to read that information. So, a workaround is needed.

All received SMSes contain a timestamp, usually set by the originating network. This is an example:
+CMGL: 5,"REC UNREAD","4130",,"11/07/07,18:07:19+08"
message body
The timestamp is in the first line in the format yy/mm/dd,hh:mm:ss+tz . Well, don't ask me what +08 stands for, but 18:07 was local Summer time.

My trick is: find out if your operator has a service that auto-replies with an SMS to SMSes or calls to a special number. Italian operators have such a service to inform the subscriber of the amount of credit left. When you need a timestamp, let your device query the proper network service via SMS or call; wait for the SMS to come; read the datetime string. Don't forget to delete the SMS so that your SIM/MT memory fills up.

This procedure will not provide a precise timestamp down to 1" resolution, but it will put your application in the right ballpark, usually within a minute (which is more than enough for my remote thermometer!).

Of course an RTC chip can be added for as little as 2EUR/2USD, but you need a way to initialize it and board space too.

27 July 2011

Differential signal path in transceiver designs (article)

In July 2011 issue of AD's Analog Dialogue I spotted this article on RF design: Differential Interfaces Improve Performance in RF Transceiver Designs.

It is about designing an I/Q receiver and a transmitter using a differential signal path instead of the more common single-ended approach. With three practical examples including calculations, this article should help the design of a differential chain for HF/VHF HAM use.

Prove me wrong, but hasn't the NE602 got differential inputs and outputs?!

19 July 2011

DS18B20 self-heat

I have been playing with a DS18B20 1-wire temperature sensor, with its default factory configuration: 12-bit resolution, meaning about 0.75" conversion time. The control software forced the sensor into an almost 50% duty-cycle, so updating temperature reading every 2 seconds.

With this stress, I noticed that the bare sensor was reporting an increasing temperature in the first minute of operation: it got into a "warm-up" phase which caused a wrong reading of the actual temperature. Almost as high as +1°C.

Well, the device measures its own die temperature, so if it is stressed and left in open-air without a heatsink it probably does heat up. Power consumption according to the datasheet is 5V*9mA = 45mW. Room temperature was lightly above 25°C.

In order to better understand this useful tiny device I will try and report three approaches:
  • keep the 12-bit resolution and add a small heatsink
  • decrease resolution to 9-bit and keep the duty cycle
  • at 9-bit resolution keep the 2" loop

10 July 2011

Share serial port with guest VM in Virtualbox 4

This is probably the Nth page about this subject, so consider it a personal reminder.

How to allow direct access to the physical serial port to a virtual machine under Virtualbox (currently version 4.0.x) ? Edit VM's properties and flag as shown in the screenshot below:


[Info: "Dispositivo host" should translate into "Host device" in English.]

Settings shown above worked both for a MS and a Linux guest virtual machine.

Power up the VM and it will appear as COM1: under a MS OS or /dev/ttyS0 under your preferred Linux distro. For already installed Windows machines you'll have to fiddle with new hardware detection, and do a web search to find the most straightforward procedure.