Skip to main content

Posts

Showing posts from 2014

Failure is always an option

As they say success comes through hard work. So I had these car FM transmitters laying around. I wanted to know, what made them tick. I ripped it wide open and started marking chip names down. With some logic I quickly determined the chip that was responsible for FM transmissions.

Name of the chip? – BK1085

So the implementation is simple enough. To my knowledge it’s just a one chip wonder. Audio comes in and it is modulated and spit out from the other side.

Datasheet is helpful. Every piece of information is available right there. The chip itself can be for example controlled over I2C. You can change the frequency, time out periods, mute etc.

So I started probing, first experiments went well. Then later I took the chip and placed it upside down, made some wrong connections and the magical smoke came out – blimey.

Then I took another FM transmitter and ripped that apart. It had the same chip but the package was different. So I soldered it out, made a little test/development board. Turned i…

FM-RDS

RDS or Radio Data System is a very interesting thing. All of us have come across this in some point in life. RDS is a cool implementation. RDS shows radio stations name, frequency, song etc. A lot of car radios support this feature. So when you see “RAADIO 4” on your radio, it arrived there over RDS. It piggyback rides on the FM station at 57 KHz. So I wanted to learn more about it.

This is a typical FM stations baseband spectrum.









Decoding RDS with some already made tools is somewhat simple. SDR Sharp has this feature built in. But rtl-sdr is not that sensitive receiving weak stations. So I started experimenting.

Firstly I hooked up my Panasonic car radio. It supports RDS. I listened to FM stations and it worked fairly well. Then for pure interest I connected the radio to my PC and fired up Spectrum Lab. And I was surprised it spit out the RDS data.

Then I thought what happens if I connect a Sony STR-232L to my PC. It’s a fairly old FM receiver. And yes, I was able to see RDS data. And I …

RTL_SDR Direct Sampling Mod

Listening to various radio signals is fun with vanilla rtl-sdr. The range is 22 MHz to 2200 MHz So that means there are pretty different things to listen to for a while. Couple of day’s back I wanted to listen medium and high frequency bands. Because radio waves in that spectrum travel a lot further than VHF and UHF signals. I know there are up converters that don’t cost very much and are easy to use. There are many other benefits using an up converter. But I wanted to do a direct sampling mod to one of my rtl-sdr. This so called “mod” is not very difficult. So I decided to try it out.

Source: 1 , 2 and 3

I should use a right ferrite for the job but I found this random one.



To the SDR I connected a 20M dipole.  So the rtl_sdr is not very good but the antenna makes somewhat up for it.



I’m using an old laptop as a server for the SDR. To add Direct Sampling mode in SDRSharp in TCP mode: LINK   And what do you know it works!

Temperature Twitter Bot

Twitter is an interesting thing. Share whatever you want, whenever you want. Twitter is cool and all but I don’t find much use for it until now.

I came across this project http://www.scottcutler.net/catpoop/catpoop.html as you can see pretty weird but the idea itself is cool - automated twitter posts.

I took my Raspberry Pi and installed necessary files.

For my project I wanted to tweet my temperature, humidity, and air pressure. The main magic is done by the RbPi. The Arduino is connected via USB cable, meaning we have serial connection. The python script on the RbPi reads the data from serial and then tweets it. And it is as simple as that.

I needed to install couple of extra packages for python: pyserial and Twython.

Couple of lines of python and done.

To get the necessary authorizations: LINK

My code
import sys
import serial
import os
import time
from twython import Twython
CONSUMER_KEY = 'SECRET'
CONSUMER_SECRET = 'SECRET'
ACCESS_KEY = 'SECRET'
ACCESS_SECRET = 'SECRET…

Arduino Weather Box

Couple of nights ago I decided to mess with my Arduino. All of my sensors and displays had arrived so I decided to build something. All basically sensors that show different climate properties so I named it Weather Box – Go figure!

With Arduino it is as simple as the alphabet. Connect everything and then remember where you connected your things and of course you need the necessary Arduino libraries so your Arduino can talk to your sensors.

Alpha build/testing.





So what I have is Arduino Nano V3.0, BMP180 (pressure and temperature), Nokia 5110 display module and famous DHT11 (humidity and temperature sensor.)

So the idea was to display all of that information on that Nokia display.



So then I had an idea to make this into something permanent. For example make a case for it, making it portable. I had this case from some old project. For me it looked too bulky and weird. So using only the bottom half I decided to make a case.



[gallery ids="247,246,254,253,248,249,250,251,252"]



Everythin…

Messing with 433MHz equipment

We all know and love wireless devices. For example wireless doorbells. They seem so cool yet mysterious. How do they work?

Wireless doorbells:

They come with a receiver and the transmitter that you stick near your front door. Simple! They are wireless, so they use ISM bands. Most commonly the 433 MHz range. So when you press your door bell button the bell rings. The transmitter sends data out and the doorbell responds via sound – Simple!

DECODING

This is the first time when I used GNU Radio. I knew that these doorbells probably send data out with AM/OOK modulation. That was confirmed later on.

I made a quick GNURadio program to decode and record necessary signals.

I connected the rtl-sdr, pressed execute and started smashing the doorbell button. And what do you know, it works.

This was the output.



You can clearly see the repeating patterns.

Later on I created a different flow graph so could record these signals.





And then viewing them with Audacity.



I used Audacity because it works better when tr…

Weather data website

My first blog post was about reading data from weather sensors. I used the rtl_433 package. I did not have a conclusion. I got it to work. I did not capture any rtl_433 compatible sensors near me. I had an idea to run a webserver that’s displays a temperature captured with a SDR.

I reinstalled my homemade antenna. It’s a dipole antenna for CB frequencies. It’s and pretty wide range antenna so it captures all kinds of frequencies pretty well. Had some fun with it. I was scanning through the 430~ region and noticed that this antenna picks those frequencies pretty well. I remembered all the rtl_433 fun and tried it again.

Installed the rtl_433. It did not take long when it started decoding supported weather probes. At first I picked up only one but we’ll get back on that later.



As you can see it also sends other fun data.

When I launched my command “rtl_433 –p 35 2>rtl433test.txt”

The “–p 35” flag deals with the frequency correction because rtl-sdrs are not perfect. I used  kalibrate-rtl t…

WRT54GL SD card mod.

I have had lots of fun with the WRT54G series routers. I have installed custom firmware on every single of them. I have had at least five of these routers only 3 work at this point in time. The others have died in all kinds of ways – water, stupidity, etc.

So last summer I stumbled across this: http://www.dd-wrt.com/wiki/index.php/Linksys_WRT54G-TM_SD/MMC_mod

I thought it is the coolest thing ever. Let’s do this!

I did not have a spare SD card so I had to improvise. I dug up some old boxes and found an old floppy connector. It matched the SD card perfectly, making it the perfect adapter. And now the easy part: It was documented pretty well, so I only had to follow couple of steps. Mainly soldering the right SD card pins to the right GPIO leads.

Everything went well. Got it working. It ran a super tiny web server, because you know everything is cooler with a web server. When visiting the website it displayed the routers temperature, load and etc. It ran couple of html widgets. It doesn’t w…

Atari Punk Console

I just had to test out the Fritzinger magic. I only had 555 chips laying around, so with little bit of fun with google, I found this :









Some information:  http://en.wikipedia.org/wiki/Atari_Punk_Console

Basically it is a super simple project. I needed something to test the Fritzing out. So I created this:





And thanks to that, it auto created this(I had to fix couple of things):





And then of course it is etching time!

I use the laser printer method









Iron(III)chloride in action!

















Done!







You might ask why those IC’s are on the wrong side of the PCB. Answer - I rushed and forgot to mirror the print. You learn something every day! But I managed to get it working.

[audio mp3="http://kukk.tk/blog/wp-content/uploads/2014/03/Untitled.mp3"][/audio]

It is powered by USB - 5v.

Bought a server.

Today was an interesting day. At the end of the day I purchased a server. It is called PRIMERGY RX220 and it is made by Fujitsu-Siemens. It has two Opteron 265’s at 1.8 GHz and 1 GB of ram. It is not the fastest server in the world in fact it is quite old it is 8 years old. But for my intensions I think it is powerful enough. The only thing that bothers me is that it supports max only 500 GB hard drives. I haven’t checked any bios updates, so maybe they have updated it. Hopefully it runs Windows Server 2012 R2 well enough because I got a free key from Dreamspark. If it doesn’t run well I probably install Ubuntu server or something lightweight like that. The main idea right now is to run it as webserver for this website – I think. I know that Elion’s update speed is like 1 Mbps but it beats my current hosting. If my dual wan thingy works maybe even maybe 2 Mbps but that is a stretch. Also idea - run it as file server.
It hasn’t arrived yet via mail, so I don’t even know if it works, so…

Raspberry Pi FM trasmitter

So I was browsing reddit and came across THIS.
It was so cool, I had to try this out. So I took my Raspberry Pi and hooked it up. When it booted up I was able to run the following commands over SSH.

mkdir radio
cd raadio
wget http://omattos.com/pifm.tar.gz
tar –xvf pifm.tar.gz

And that’s it. Now you need to connect a wire to Pi’s 4 GPIO pin. I just connected a random wire. For maximum performance use 20cm wire or dedicated antenna.
To test it out I typed:
sudo ./pifm sound.wav 100
Tuned my radio to 100 MHz and tadaa – Star Wars theme was rolling in.
When the file ends or you cancel it, it stops but the modulation stays on. To get rid of it you need to restart your Pi or run this script I made.
stop For example save it as "stop.py". And run it.
sudo python stop.py
And it should stop.
As you can see the 100 stands for the frequency. For more flags read THIS. Now it even supports stereo.
You can replace the "sound.wav" with other music file. PiFm currently only supports 16 bit 22050…

Reading data from 433Mhz temperature probes.

As the title stated, I had a idea to capture data from those magical things! These thing wirelessly send data between the sensor and the station.





I had one of these probes laying around and I thought I should at least try to capture something from it. I did not have the base station only the probe.

Sounds cool on paper! The first thing I tried to do was actually capture a sample.  I booted into my Ubuntu and launched Gqrx. With my SDR I was able to tune into the 433 MHz region. Those probes usually work around that frequency.

So I captured this around 433.900Mhz AM

This is what that region looks like:



So then I started searching and I found this: https://github.com/merbanan/rtl_433

Went to my linux machine and typed into the terminal (the readme commands did not work for me) :http://pastebin.com/embed_iframe.php?i=0YQ8jDjg

So when that was done I figured how to use that thing.

Everything is super simple when that part is done. So I was able to run this:

rtl_433 –a  - this outputs all it's …