Wednesday, 24 June 2015

A microPLC..

In a moment of recent madness I said I would design a very very small programmable-logic-controller (PLC) for someone, including writing the language interpreter / byte code generator for it....

When will I learn!!!!

Hopefully the final product will run on something like the ATTINY84 or similar.

Defining the syntax rules

Portions of dodgy C

The byte code decompiler listing what the compiler produced.

Monday, 15 June 2015

Mini eBay monitor

Last week I ordered a 7" HDMI/VGA/Composite monitor from an 'Australian' seller 'Globedealmark' for about $64 including postage. It comes as a bare PCB and LCD module with no documentation so they expect you to mount it in a case etc yourself.
Screen, controller and user controls
The board requires 12V DC at about 1amp. I first tried it on an old Windows 7 laptop using the VGA interface and a screen resolution of 1366x768 scaled automatically to the monitors native 800x480 pixels. It looks very good!
VGA input from laptop at 1366x768
Then I fired up the pcDuino Nano3 ARM board and tried that via HDMI. This time I set the resolution to match the display and the result is very nice.
Native 800x480 via HDMI
This is the combination I intend to use, mounted in a briefcase along with some SDR hardware. Altogether a good buy I think!
800x480
I forgot to mention that the display supports a reversed composite input for a car reversing camera etc too. Very hand all round.





Saturday, 6 June 2015

Airprobe-rtlsdr DC spike

HackRF with DC spike

I've been experimenting with the Airprobe-rtlsdr utility which is designed to demodulate non frequency hopping gsm signals and stream the demodulated data to Wireshark. Then in Wireshark you can use the built-in GSM decoding functions to extract cell tower identification etc. You CAN NOT decode the SMS or voice content so stop getting all excited!! That requires a whole lot more effort which would take you from the slightly illegal to the totally busted zone quick smart. Anyway when using the HackRF or it's clone the HackRF-Blue you face the usual large DC spike issue at 0Hz. This stops the demodulator from working so what I have done is add the GNU Radio DC blocker block to Airprobe-RTLSDR and now it (theoretically of course) decodes just fine.
Modifications to airprobe-rtlsdr.py

The modifications to the airprobe-rtlsdr.py file are shown in the above screen shot. I commented out the old code (three lines starting with #) and added the four new lines which insert the dc blocker into the signal chain. You also need to instantiate the dc blocker which is what is happening at the top of the image. Another thing not shown is that you must include the filter code from GNU radio so you need to add an import statement at the start of the code which says:
from gnuradio import filter

HackRF with DC spike removed