Crossfade Bicolor LED with PS/2 Touchpad

 Author:   Posted on:    No comments
Some while ago, I found a Processing example that would crossfade an Arduino connected bicolor LED depending on mouse position over a window with a gradient. Since I had a touchpad from an old netbook, I decided to use a hardware approach: interface this to Arduino and use it to change LED color by swiping left or right. Horizontal swiping will change the duty factor of PWM signals that light the LED.

This is a simple project that can be built with other kind of input devices like potentiometer or joystick. But, my purpose was to get that touchpad working. I had to use a logic analyzer to determine its pinout. Luckily, since it uses PS/2 protocol, it sends some bytes without connection to a host device. The PS/2 protocol is well documented and pretty easy. ATmega microcontrollers used by Arduino boards don't have hardware support for this protocol, therefore it must be implemented in software. Some searching revealed a lot of libraries for PS/2 devices, but not all worked for me. This may be because the touchpad I used is pretty old and may not support all protocol features.

Crossfade Bicolor LED with PS/2 Touchpad

TSA5523 Tuner Modules from PC TV Cards

 Author:   Posted on:    No comments
Some of the previous posts show methods of generating analog video with microcontrollers and RF modulation of it using ready made modules. Analog video is no longer in use in most parts of the world. TV tuner cards for analog signals are no longer manufactured and old ones are difficult or impossible to install on newer computers because there are no drivers. Despite this, analog video capture devices are cheap and widely available. Most are USB dongles, with video and audio inputs, no tuner.

Since I had some old TV tuner cards that were no longer compatible with my PC or had poor performance, I decided to take the tuners out of them. To my surprise, different tuners from different manufacturers looked pretty much the same on the inside. All of them used the same integrated circuits. The tuners I found are actually complete receivers, with included demodulator. This means you can get analog audio and video straight from the module pins. There are also modules with FM support, with stereo decoder.

In the photo below, you can see two tuners. The top one has FM radio support. You can see that it's similar to the other, but the rightmost compartment has some additional filters for FM IF.

Tuners from TV cards
Tuners from TV cards

USB Power Supply for Breadboard

 Author:   Posted on:    No comments
Breadboards are very useful for quickly building electronic circuits. But these circuits require power. The popular breadboard power supply you will find on the market is powered from more than 8 V by an AC-DC adapter. They can provide both 5V and 3.3V from linear 1117 regulators. These regulators can supply a maximum of 800mA, but because they work in linear mode and the PCB is not well built for heat dissipation, the current you can draw from such a device is very limited.

While trying to interface a gas sensor and a TV card tuner to an Arduino, I found that I had troubles powering them. Each of the mentioned devices need about 200mA. Both Arduino and the breadboard power supply use linear voltage regulators to provide 5V. I tried to use the breadboard power supply, but the regulator became hot immediately. Being fed with 12V, the 1117 regulator needed to dissipate (12 - 5) x 0.2 = 1.4 W. That's a lot for its small package.

I needed a better power supply. And I want it for breadboard projects. USB seems to be a pretty good power source, being able to provide at least 500mA. So I designed my own power supply. Since is USB powered, I thought it would be a good idea to have an USB port where I could plug development boards, without needing another computer USB port.

USB Power Supply for Breadboard

Program Arduino Pro Mini with CH341A dongle

 Author:   Posted on:    No comments
Arduino Pro Mini is a development board based on ATmega168 or ATmega328 microcontroller. Unlike other members of the Arduino family, this board does not have an USB port for PC connection. To program it, you need an USB to serial TTL converter. There are many choices here, and the Arduino Pro Mini has a pinheader port that matches the pinout of FTDI USB serial breakout boards. ATmega MCU doesn't need all serial port pins. It requires serial data pins RxD and TxD and also DTR, which is connected to reset pin.

CH340 is another USB serial interface. It can be found at the core of the cheapest USB serial adapters, but these dongles are difficult to connect to Arduino because there is no power pin and no exposed DTR pin. The power pins on the CH340 USB breakout board are used with jumpers to select voltage levels (3.3V or 5V).

CH341A is a complex interface chip which adds parallel, I2C or SPI interface. It is used by memory programmers. However, by setting a jumper, it works as an usual USB to serial adapter. I will be using here a popular device based on CH341A, the black MiniProgrammer, to program an Arduino Pro Mini compatible board.
Program Arduino Pro Mini with CH341A dongle