Jiri Pittner's Electronics Page

Jiri Pittner's Electronics Page - contents

To facilitate orientation in the electronic projects I published on this page, I give first a list of them and continue with some remarks later.

A simple pH-meter with USB interface based on LPC1343

Gentoo linux on Allwinner V3S / Lichee pi zero board

LPC1343/LPC1115 boards with infrared transmit/receive interface to control e.g. Midea air conditioners

An experimental open hardware and open source avionics (EFIS), possibly useful as a backup instrument in ultralight planes

EBUS interface using LPC1343 for control of a heating system

Porting C source code of AES and elliptic curves (ECC) ciphers to small microcontrollers

DC/DC convertors - simple stepdown, stepup, as well as isolated dual output one; how to control the output voltage of a DC/DC convertor from a microcontroller firmware

A simple tool to measure inductance and capacitance at DC bias

Inductor saturation tester employing a time-domain measurement

A simple and robust electronic ballast for fluorescent lamps

A simple ESR meter in bridge configuration with ATmega8

Geiger-Mueller counter (dosimeter/intensimeter) with AVR microcontroller

How to intercept the cell phone - SIM card communication and read out the Kc key for GSM traffic decryption

How to receive TETRA digital radio using USRP

Using LIMESDR with gnuradio under linux

Misc topics from RF electronics - program for matching network design; using USRP as a simple antenna analyzer

Medium power RF amplifier for use with software radios

A note on the manufacturer key attack on Keeloq cipher

Using Amazon Kindle-3G internet connection on a (Linux) PC and some generally applicable tips and tricks concerning IP traffic tunneling

Power regulator for a 1W Blue LED laser

Starting with the LPC1114 ARM Cortex-M0 and LPC1343 ARM Cortex-M3 chips : crosscompilation and flashing mini-howto (from a linux command line)

LPC1114 board with ENC28J60 ethernet interface

Remote control with ATMega168 and RFM119/CMT2119A, partial reverse engineering of CMT2119A register setup

LPC1343/LPC1115 boards with RFM22B transceiver and USB or ethernet interface

FT2232H board with pin headers usable also as AVR and LPC microcontroller programmer

Frequency changer (variable frequency motor drive) and true sine wave three phase changer - based on the LPC1114FN28 ARM Cortex-M0 chip (includes PCB in Kicad)

Wireless electromotoric code lock (based on LPC1114FN28 line) - open hardware and open source hobby construction (includes PCB in Kicad)

Wireless thermostat based on LPC1114FN28 - open hardware and open source hobby construction (includes PCB in Kicad)

Wireless thermostat based on AVR ATmega - open hardware and open source hobby construction (includes PCB in Kicad)

External thermometer sensors for the wireless thermostat - open hardware and open source hobby construction (includes PCB in Kicad)

Wireless weather station - open hardware and open source hobby construction (includes PCB in Kicad)

Home automation and alarm switchboard based on Raspberry Pi and ATmega128 - open hardware and open source hobby construction (includes PCB in Kicad)

A digital milliohmmeter (microohmmeter), microvoltmeter, and accurate ESR meter based on STM32F373 processor and AD8253 instrum entation amplifier

Some NOKIA N900 tips and tricks, voice guidance for navigation

Some tips and tricks for Samsung Galaxy S4 active (I9295) with Android 4.2.2 JellyBean

Infrared contactless thermometer (pyrometer) based on the MLX90614 sensor and ATmega32

Exploring RFID technology with Proxmark3

Controlling the Rigol DS1052E oscilloscope from a Linux computer via the usbtmc driver

Starting with the STM32F4 discovery kit, flashing STM32F37x with stlink, developing for STM32 under Linux

Tesla coil

Verilog CPLD/FPGA programming from the Linux command line (for Xilinx)

Fed up by the eavesdroping affairs? Secure your VoIP: encryption HOWTO using openvpn and asterisk

Digital wattmeter, power factor meter, and impedance meter, with a Bluetooth connection to a software datalogger and oscillosco pe display (Wattscope)

Capacitor-discharge micro spot-welder construction

Jiri Pittner's Electronics Page - comments

Since I do not have much time to spend on this page, not all projects have nicely drawn schematics and detailed construction instructions here. However, thanks to the open source KiCad design program and availability of cheap (but excellent quality) PCB prototyping in China (I can personally recommend LEAPPCB, service purchased via Aliexpress), the more recent projects include open hardware licensed schematics and PCB layout files. In any case, a few possibly interesting notes and some source code for devices based on STM32, NXP LPC and Atmel AVR microcontrollers can be found here.

In my childhood, when I became interested in electronics, home-brewing even of 8-bit personal computers was quite common, since in the communist block many devices were hardly available. Of course, even the shopping for electronics components used to be rather frustrating, since in each east European "socialist" country there was a single state-owned company producing all electronic parts from resistors to vacuum tubes. Typically, from a part list which you brought to the state-owned shop, one half of the components was not in stock and the critical components were not available for weeks or longer.

Now the situation is rather different (except for people in countries like Cuba and North Korea) and the question one may ask is "Does it today make sense to build any electronic devices at home at all?" It might seem that the answer is a clear "No", considering all the consumer electronics cheaply produced in China etc.

However, there are a few exceptions.

First of all, relying on any commercial security-related product (from which you do not have hardware schematics and software available) represents a security risk, since there might be vulnerabilities, which are known only to the "black hats", or even intentional "universal keys" or back-doors. A prominent example are keyless entry systems based on the Keeloq cipher (known under the marketing names "code hopping", "floating code" etc.), which were long claimed to be secure. Here you can find some tips how to replace commercial implementations of KeeLoq sensitive to the recently discovered "manufacturer key" vulnerability by home made ones resistant to the known exploit (including GPL source code for Atmel ATMega MCU).

Cryptography is also an essential component of the near field communication (NFC) and RFID technology, which became quite ubiquitous. An interesting device which I used for experimenting with this technology is Proxmark3.

By the way, for a design of your own security devices, you might find this port of AES and elliptic curves cipher to small MCUs useful.

Second, there are some kinds of devices that you might like to have for some purpose, which are not mass-produced in China and are consequently not cheap or simply available at all. For example, at home I have made a thermostat with wireless sensors, which can be controlled from a home Linux server either from a command line or via a www form (of course SSL and password protected), day-night switching of optimal temperature and weight of temperature sensors in different rooms is done via crontab.

Another device which can be useful for various hobbyists is a capacitive-discharge micro-spot-welder, with dual pulse timing controlled by Atmel MCU. Professional devices of this kind are pretty expensive, so here a home-brew construction with a free source code makes sense if you like e.g. to refurbish various battery packs yourself.

Similarly, a wattmeter with Bluetooth connection to PC acting as datalogger and oscilloscope display (I invented the name wattscope for it), which is able to measure real and apparent power and maximum current when starting electric motors is useful and not readily available at an affordable price.

A useful device for every repairman is an ESR meter to check electrolytic capacitors. Although there are several hobby constructions available on the net, I did not want just to blindle copy someone's else construction and so I have designed a simple ESR meter based on ATmega8, which is published here including firmware source code.

More recently, I have designed a more accurate ESR meter, combined with a milliohmmeter, based on the more modern STM32F37 processor and AD8253 instrumentation amplifier.

Yet another device which I built is a dosimeter (Geiger-Mueller counter), where again professional ones are expensive.

Yet another device which I built is a contactless infrared thermometer (pyrometer), which was just a one-weekend project since a nice I2C sensor is available.

Yet another device which I built is a weather station, which has been in operation since a few years at www.pittnerovi.com/meteo.

An interesting and very affordable "toy", which can be used as a basis of hobby projects is the STM32F4 Discovery kit, which provides much more powerful MCU than the 8-bit ones. I give here some remarks and source codes based on my hands-on experience with this kit.
Interestingly, a less powerful Cortex-M0 MCU is available even in the prototyping-friendly DIP package, as the NXP LPC1114FN38/102 part. It is very cheap (about 1/2 the price of ATmega8!) even in unit quantities and thus competitive to 8-bit MCUs for hobby projects. Developing for this processor is not difficult at all and here is a simple application of this MCU with all source files.

Third, it is a very good idea to teach interested children electronics (and science in general). I do not believe that the best electronic engineers of tomorrow will recruit from people who have first seen a soldering iron as freshmen or sophomores in a university lab (and analogously for other branches of science and technology). A nice motivation for children are effectful toys like the Tesla coil or a 1W blue laser, which are a bit too dangerous to be sold in toy shops and you have to build them yourself. Showing some effectful chemical experiments to children is also great and they really enjoy it (at least my boys do), since the moronic overregulation of "hazardous substances" by the EU has moved a lot of hands-on school chemistry from labs to boring interactive blackboards.

Last, but not least, hacking electronics is fun! (In particular, since I work as a theoretician, I enjoy time to time to build something with my own hands).

For any non-trivial work with electronics, an oscilloscope is a must, without a scope the engineer is simply blind ;-). Fortunately, in the last years digital oscilloscopes with reasonable parameters have become affordable for hobbyists. I have myself purchased the popular Rigol DS1052. It's a good device for the low price, however, some software hacking (usbtmc driver) was necessary to be able to control it by a computer running Linux, which is a prerequisite to use it for example for side channel cryptanalysis.

Of course, not everything can be built at home :-). So I like really well designed professional hardware too, particularly when it runs free software. A prominent example is the Raspberry Pi, which has become extremely popular recently, for a good reason. In my view it is an ideal starting point for a hobbyists approach to home automation, or intelligent household or however the marketing people would call it :-).
Another example is the phone Nokia N900, which I considered one year after its introduction still to be the best phone available (sorry Apple fans :-)). At the beginning of 2013 I still did not feel a need to upgrade to another phone just to get a faster CPU. I will wait for the LTE network to become available in our country before buying a new phone.
Since N900 is basically powered by GNU/Linux (except the proprietary Nokia's Maemo GUI) and free of tivoization locks (at the application processor level), it is possible to use it in new ways not anticipated by the manufacturer, see here.

When talking about phones, cellular networks are quite fascinating and recently hardware (USRP) and free software (gnuradio, airprobe, openbts etc.) has emerged which allows security researchers and hobbyists to experiment in this field, previously restricted to a relatively small group of R&D engineers in a few companies. I have also employed USRP as a simple antenna analyzer to construct antennas for the GSM bands.

I decided to present here another topic, which is not strictly about electronics, but more about IT and computers. Here you can find a brief HOWTO use openvpn, asterisk, and voip clients to encrypt your phone calls. There are a few descriptions of this approach already on the net, but it still might be useful.

Another such topic is tunneling of IP (ssh, openvpn etc.) traffic through firewalls and proxies allowing only HTTP to pass through. It can be used to obtain a full-blown internet connection via Amazon Kindle-3G (in countries where third-party web pages can be accessed from the kindle builtin browser). A mini-howto is here.

An extremely interesting topic on the border between hardware and software field is the digital hardware design using hardware description languages (Verilog, VHDL). The FPGAs and CPLDs are nowadays quite accessible to hobbyists and design tools are freely available. Although I am by no means an expert on this field, I decided to write a short
HOWTO about installing Xilinx webpack and JTAG drivers on Linux running Xilinx tools from the command line which might be useful for other newcomers to the field.

If you like to contact me concerning the constructions / software published here, use the address jiri at pittnerovi dot com.

Finally, I could not resist the urge to write a few politically oriented words, since I am increasingly becoming disgusted by the way, how politicians (both local and at government level) and big companies misuse the modern technology against the citizens, in result leading us really towards an Orwellian society. It is not only the eavesdropping on phones and emails in name of fight against terrorism (which is to some extent understandable), but also the attempts to introduce wide internet censorship or even search of personal devices when crossing borders in name of profits of film and music industry (SOPA, PIPA, ACTA, CISPA).
On a local level, the ubiquitous security cameras, together with advances of face recognition software, are really a total orwellization. I do remember the communist regime in our country and and the imagination what a totalitarian regime (of communist, islamist or other type) could do with the modern technology is really a nightmare. The cameras are also often employed by cities to "enforce traffic violations", typically speed measurements at places where the speed limitation is unnecessary, to maximize profits for city budgets. This has become a new hidden tax and a good business for manufacturers of these devices. Cameras used for electronic toll collection are another eyes of the big brother...
We cannot escape the cameras today, but another story is the voluntary giving up of privacy. To some extent it is almost unavoidable, for example unless you completely give up on using cell phone, the provider has to know where you are (only roughly, not as accurately as GPS position). I must admit that I am using a cell phone and will continue to do so unless some law forces the providers to STORE the localization data all the time. Presently they store only the number of a cell tower involved in the communication when sms, call, or data communication happens and make more accurate position fix only when you call emergency numbers. Unfortunately, most people are willing to trade a surprisingly large portion of their privacy for a feeling of more safety or a bit of user comfort. This also explains why they give their private data voluntarily on social networks etc. A striking example is the buzzword "cloud computing", where they store their private documents at some company and lose thus any control of what might happen with their data, who has access to it etc. Companies like Apple and Google really try hard to entice the users into their clouds. But users of Megaupload learned the "advantages" of cloud storage recently the hard way.
I personally will start using clouds, when the recently discovered homomorphic encryption becomes practicable.
To summarize, I think that we should press on the polititians and let them know that privacy and free internet is important for us - there are many ways, for example online petitions agains CISPA etc., support of the Electronic Frontier Foundation and "pirate" political parties, and, more practically, support the TOR project.

Not to become too serious, let me finish with a little joke: Do you know, how to recognize a truly hardcore computer geek? Just ask him, what is the best computer game in the world. If the answer is "GCC", you have got him.

My main page and contact e-mail

TOP of family pages