Measure RPM with Slotted Optical Switch

 Posted by:   Posted on:    No comments
Building an RPM counter is very easy with an optical switch and a way of counting pulses generated by the switch. A microcontroller, a frequency meter and even a logic analyzer can be used for this. Here, I will be using the cheapest and popular method: an Arduino. Optical switches are devices made of an emitter LED, usually infrared type and a receiver diode. Between the IR emitting LED and the receiver there is a slot. An opaque piece can pass through this slot and block IR beam. This will be detected by the receiver diode and its output will change state.

The piece that will block IR light will be a flange with a slot (a cutout area from the disc). When this passes through the switch's slot, the light reaches the receiver diode. Therefore, rotations are translated into a digital signal with a constant duty factor, dependant on flange configuration. The frequency of this signal needs to be measured and converted into RPM.

775 motor fitted with optical switch
775 motor fitted with optical switch

I2C Analog TV Modulator controlled by Arduino

 Posted by:   Posted on:    33 comments
Analog video is getting replaced by digital signals which provide better resolution and picture without noise or interference. But, analog video signal is easy to generate with simple hardware and then it can be FM modulated for broadcasting over a wire. I2C controlled RF modulators are common modules in obsolete VCRs and set top boxes. Most of them cover the entire UHF band and support multistandard sound carrier frequencies. Once taken out of its device, the modulator needs a microcontroller to set up its frequency and other parameters.

Using an Arduino board with LCD and keypad shield a full featured modulator can be built. Arduino can be used to generate video too, but a single board can't use I2C and generate video in the same sketch. You'll need different boards if that's what you want to do.

I used for this project a Samsung RMUP74055AD modulator with MBS74T1AEF controller. Some searching reveals the same IC is also used by Tena TNF0170U722 modulator. Some datasheets will come up too, if you search for them. Anyway, these modulators are 5V devices.

RMUP74055AD UHF RF modulator
RMUP74055AD UHF RF modulator

Arduino Thermometer with... TV Output

 Posted by:   Posted on:    9 comments

Analog video is getting replaced by digital signals which provide better resolution and picture without noise or interference. Although receivers for digital signals are cheap and popular, devices for generating such signals are expensive and intended for professional use only. On the other hand, analog video is easy to generate with simple hardware. You can even broadcast it over RF (on wire, not on air) with common modulators (standalone devices or modules from video game consoles, set top boxes, VCRs etc.).

An easy way to generate video signal is by using a microcontroller and some resistors. I'll use for this purpose an Arduino board (ATmega 328p) with the TVout library. The video signal is of low resolution and black&white. But it can be used to display data on a TV screen. If you no longer own a TV with analog video input, an USB capture card can be used. TVout library is interrupt based, therefore will interfere with some of other interrupt dependent microcontroller features.

Arduino Thermometer with... TV Output

Compute Heat Index with Arduino and DHT Sensor

 Posted by:   Posted on:    2 comments

The heat index is a parameter that takes into account temperature and relative humidity, to determine the apparent temperature or the human perceived equivalent temperature. Heat index was developed in 1978 by George Winterling and was adopted next year. It is also known as humiture, according to Wikipedia contributors.

To compute this index, you need to know current temperature and relative humidity. An easy way to find both is by using an Arduino development board with a DHT sensor (DHT11, DHT22). These sensors measure temperature and humidity and send it to the microcontroller using a digital protocol. Thus, there is no need for calibration. You can read the values directly from the sensor module. However, you should take into account that the accuracy of these sensors is not the best. DHT11 has an accuracy of +/-5% for humidity and +/-2 degrees Celsius for temperature. DHT22 (AM2302) is slightly better with an accuracy of +/-2% for humidity and +/-0.5 degrees Celsius for temperature. More than that, DHT22 has extended ranges for both temperature and humidity.

Compute Heat Index with Arduino and DHT Sensor

Audio Amplifier with Common Transistors

 Posted by:   Posted on:    1 comment

Here is the schematic of a small audio amplifier that will provide up to 300mW to an 8 ohm load and can be used in low power devices like battery powered radios. This circuit is an alternative to the LM386 IC. Due to the simplicity of the schematic, the circuit can be built also on breadboard, for those of you who want to experiment and learn how an amplifier works.

The design is straightforward. A common small signal NPN transistor (like BC547, 2N2222, 2N3904, S8050) drives a balanced power amplifier made of similar transistors. The output transistor pairs can be BC327 with BC337 or S8050 with S8550. They must handle peak currents of 300-400mA (this is why BC547/BC557 or 2N3904/2N3906 should not be used here). The amplifier can be powered from a 9V battery or from a 12V power source. The circuit draws a current of about 170mA. Quiescent current is less than 10mA.

Audio amplifier with common transistors build on breadboard
Audio amplifier build on breadboard