Search This Blog

Thursday, December 27, 2012

VU-Meter / Signal Meter using AN6884

AN6884 is a monolithic IC driving 5-LED and capable of logarithmic (dB)
bar graph display for input signal. Datasheet

Thursday, October 18, 2012

USB temp sensor: SMDs, bonding LM139 and more

 LM139 comparator (bonded: Chip On Board), ATiny 2313, sensor: LM74

SMDs assembled using Essemtec EXPERT-SA.

Monday, September 3, 2012

Joule thief powering an LM386 based audio amplifier!

This is a joule thief circuit with a schottky diode at the output. In the video I show that it can power an LM386 based audio amplifier connected to 50-80W speaker.
It has a poor regulation but can give about 130mA @ 5V

Saturday, August 25, 2012

Magnetic levitation using Arduino!

At first i tried to implement this idea using opAmps to control the position of the object and i spent few hours trying to make it work to no success. Then I though of using Arduino and the idea is simple.. variating the strength of the magnetic field according to the Analoge input of the optical sensor (you can use a hall sensor too).

Monday, August 20, 2012

Step-Down switching voltage regulator - LM2576HV (5V, 3A)

The LM2576HV - 0.5 is a 5V switching regulator capable of delivering 3A. 
It requires a DC input voltage between 7 and 60V to deliver a fixed 5V on the output.
In my setup (12V input) i tested it with 1.5 Ohm load and found the input current to be 1.8A and the output current 2.6A. I found it interesting because it can be used as an Efficient pre-regulator for linear regulators!

I also tried to configure it as adjustable voltage regulator (5 to 11.44 V) using the same 12V on the input but im not sure if its safe to use it this way because there is a different dedicated version of the LM2576  for use as an adjustable switching regulator.

Monday, August 13, 2012

Laser Tripwire circuit !

A replication of Afrotechmods laser tripwire circuit. Using a simple laser pointer, IRF244 MOSFET ( most NPN transistors would do the job), a couple of resistors and one LDR
The Voltage divider of the resistor and the LDR should match the MOSFET gate voltage. 
Check the tutorial of Afrotechmods for more details! 
(Please note that the value of the LDR given in the schematic is not correct!)

Monday, August 6, 2012

LM324 Sine-Wave oscillator! (Quadrature oscillator)

This is an operational Amplifier based Sine/Cosine wave oscillator.
A replication of a circuit shown on Afrotechmods Oscillator video:

The design on which the circuit is based (Quadrature oscillator)
Source: the design of OpAmp sine wave oscillators

Monday, July 30, 2012

Again .. DC/DC Boost converter!!

An alternative DC/DC converter circuit. Its not very efficient but works fine!

Wednesday, July 25, 2012

Arduino & LM393 Inductance-meter!

Lately I have been working allot with inductors, ex: DC/DC converters and had a problem not knowing the inductance of most coils I worked with so I decided to build an inductance meter using Arduino and LM393 Comparator. I found the AVR  LC meter with frequency measurement  project by Kerry D. Wong very helpful, it made me understand the concept behind the measurement . The schematic and Arduino code based on similar project by  ReiBot.orgThis meter is not very accurate compared with profesional ones but it does the job.
Update: A better Arduino sketch by ultimoistante:  code here

Using iCircuit App for iPhone

Using a buck converter (AX3003) in an inverting buck-boost topology!

In my previous post I showed an adjustable step-down configuration of AX3003 (SMD buck converter salvaged from old electronic equipment ) and i was wondering what would it take to turn it into a boost converter when I found this paper
It shows how to use a buck converter in an inverting buck-boost topology.
Important note: The paper calls for connecting the Vss pin of the buck device to Vout but if i keep the Vss pin floating (not connected) and connect the Feedback network to Vin instead of Vout, the output voltage goes over -50V !!! (serious boost)!

Monday, July 23, 2012

AX3003 150KHz PWM Buck DC/DC converter

SMD buck converter from AXELITE in TO252-5l package was salvaged from 
some old electronic equipment. Its capabel of taking up to 22V input and 
outputting adjustable voltage from 1.23V to 19.5V / Up to 3 Amps! 
It has 80% efficiency (12 to 5V (2A) ) and 75% (12 to 3.3V (2A) ) See datasheet 

Saturday, July 21, 2012

Running a 12V PC fan using a single AA battery (0.8-1.5V)

THe circuit is for learning purpose only and is far from being
 a practical DC converter... look at the input and output measurements..
very very not efficient :-)
* Replace the 1N4007 diode with a Schottky diode !
Vin = 0.8 - 1.5V, Vout = 65V (no load) /
Load : 12V / 0.15A PC Fan (Vload ≈3.6V, Iout ≈ 20mA)

After adding 2 Zener diodes (5.1V and 15V) and a toggle switch and putting it all 
in a nice tiny little box, here is the End-Product ;-)

Important notice: experimental circuit only!

Sunday, July 15, 2012

Very simple 5v to 65v DC boost converter!

The circuit is derived from the well known DC boost converter circuit using 2 transistors to switch the MOSFET (PNP and NPN). The RC (10nF and 1K) decides the frequency. Higher capacitance gives lower frequency and lower resistance gives higher frequency. The circuit works but im not sure if its the best way to build a DC boost converter. However its the simplest i could think of.

Using iCircuit App for iPhone (Shadi Soundation 2012)

Sunday, July 8, 2012

Internet of Things (IoT) workshop, 7.7.2012 MechArtLab, Zürich

The workshop covered techniques needed to interface internet-connected computers with the real world (sensors, actuators) for clients like Arduino, Netduino and BeagleBone. 
With Thomas Amberg (Software engineer and founder of Yaler) and Thomas Brühlmann (Writer of Arduino Praxiseinstieg)

Thursday, July 5, 2012

Flyback converter (12v to 60v - No Load) and ≈5.5A (max)

I tried to build a flyback converter (or what i think should be called a Flyback converter) using the KHB4D5N60F MOSFET but had a problem with current draw! So i decided to use a Power Transistor E13009 then it worked fine. I used the 74HC14 PWM circuit (previous post) to switch the transistor. The converter has a couple of flaws (the 12V input comes from a 90W power Supply),  .. one of them is the heat dissipation!! Although it can deliver allot of power it heats up fast (BBJ vs MOSFET stuff ... mmmm ) 

Input: 12V, Output: ~60V without load. About 5.5 Amps with 24V DC Motor
Transistor: E13009, Diode: UF3003, Transformer from an old SMPS ,PWM with 74HC14

Important notice: Circuit is not efficient and it was built for experimental reasons only.

Wednesday, July 4, 2012

PWM using CMOS 74HC14 !

The 10nF capacitor between the diodes and GND determines the frequency, higher capacitance means lower frequency. The 10K Pot sets the duty cycle of the pulse.

Schematic using iCircuit App for. iPhone
The original circuit is from, check it out for more info. 

Monday, July 2, 2012

Update1: DC boost converter: MOSFET switching method?

In my previous post i showed a modest 12v to ≈70V boost converter. I used the signal generator of my DSO Quad to switch the MOSFET and was about going the popular way of using a 555 timer chip in astable configuration to do the switching when I had the idea of using the famous astable multivibrator/oscillator circuit (pair of NPN transistors, 4 resistors, 2 capacitors).
I was concerned about the calculations of resistors and capacitors values to set the frequency and duty cycle, so i decided for 50% duty cycle which simplifies the calculation process. 

Schematic using iCircuit App. for iPhone

Normally you would determine the frequency using:  F = (1 / 0.693*(R2C1 + R3C2))
But in case of 50% duty cycle: F ≈ 0.721 / RC  (while R2 = R3 and C1 = C2)

I did choose 10K for R and 1nF for C so I have approximately 72 KHz 

The multivibrator circuit on breadboard

Important notice: everything here is experimental .. 
and such a DC converter and switching method are not a suitable for application!!

Sunday, July 1, 2012

12V to 70V DC to DC converter (Boost converter)

This is my first boost converter (12v to ~70v)  
using A MOSFET (KHB4D5N60F), self-built coil, a fast Diode (B10A45VI - by the way its the wrong diode, click here to see why) and a 47uF/400v capacitor 
Switching Freq. is about 50KHz, 50% DUT

In video: I used a small NPN transistor to switch the MOSFET because the pulse from my handy function generator did not provide enough current to do so.
Loads: 24V DC motor and 12V (20W) Halogen bulb! connected once in series and then in parallel. The converter can handle about 4A current

Schematic using iCircuit  - This circuit is experimental  only and not suitable for application-

Monday, June 18, 2012

DIY voltmeter using ATmega328 and 4 digits 7 segment display

Arduino Code: (Voltmeter Part)

float ATT_Volt=0;
float Voltage=0;
float R1=47000; // measure using a voltmeter to get accurate value
float R2=4660; // measure using a voltmeter to get accurate value
int Value=0;
ATT_Volt=(Value*5.0)/1204;   // 5.0 V of Vcc
Voltage=ATT_Volt/(R2/(R1+R2));  // Display Voltage using 7 segment, LCD or serial terminal

Concept by: Arduinoprojects101

Saturday, June 16, 2012

Function generator based on XR2206 IC

XR2206 is a cheap function generator IC capable of producing sine, square, triangle, 
ramp and pulse waveforms. 

Monday, June 11, 2012

Time, Date, Temperature and Humidity with Arduino mini!

Arduino mini, 74HC595, 16x2 LCD, RTC DS1307, DHT11 Temp/Hum. Sensor and 7805CV voltage regulator. 
Libraries: DHT, Wire, RTClib and ShiftLCD

Sunday, May 27, 2012

Sunday, May 20, 2012

R-2R DAC / Arduino signal generator + DIY Oscilloscope

Arduino and R-2R DAC working as a signal generator. Check this link for detailed info. I went a different way with the coding inorder to add a delay function between individual pulses and not cycles so i could influence the frequency. The code is big and it took sometime to write but it worth it not only for the delay but for the resolution too. Here you can download my Arduino sketch (R_2R_DAC). The DIY Arduino GLCD Oscilloscope by
Important note: I use the digital pins (3-10) and the sketch works only for these pins because i initialized them using DDRD and DDRB


Thursday, May 17, 2012

Friday, May 11, 2012

Zener Diode voltage regulator (Basic Circuit) !

This well known circuit requires one Zener diode. The circuit works as the input voltage increases the current through the Zener increases but the voltage drop remains the same and as a result the voltage drop across the resistance increase (IR.R) in this amount (Vin -Vz)

Using iCircuit App for iPhone

Its important to pay attention to the power rating of the Zener and the Resistor, matching them to the current that need to be delivered to the load.
ex: If the output Load (R-Load) needs 100mA of current then the power rating of the Zener should be 1W at least (100mA x 10V). Similarly with the resistor (R) the power rating should at least equal the voltage drop across the resistor times the current output (5 x 100mA) which gives us 500mW.

Wednesday, May 9, 2012

Temperature monitor and remote control (Server)!

ENC28J60 Ethernet module (3V3 and 250 mA), Arduino MINI, Nokia 5510 Display, Dalas DS19B2 Temperature sensor (connect a pull-up resistor between pin2 (DQ) and pin3(VDD)), LM317L Voltage regulator to obtain 3V3 for the Ethernet module. Note that the ENC28J60 is 5V tolerant but i prefere to go by the book and not destroy it. The LM317L is able to give max of 300mA. (Arduino MINI does not have a 3V3 PIN but UNO and other boards do)

You can easily Download the Arduino Sketch (Temp_CTRL.pde) 
The sketch is based on the examples provided with etherShield and OneWire libraries, 
so feel free to modify the code and post results.

Friday, April 27, 2012

Modified D-Class 555 Audio Amplifier circuit!

The amplifier operates in a way similar to pulse-width modulation. The 555 modulates the Audio input with  a frequency higher than the speaker response capability so the modulating frequency  is dropped (the coil in the speaker acts as a HF filter) and the input signal is being played by the speaker
Note1: Adding a 100n cap between pin 1 and 2 will dramatically increase the volume, distortion and heat up the chip very fast. Also (from original circuit) adding a capacitor across the speaker terminals will increase the volume and distort the output but without heating the chip.
Note2: To add a volume control, replace the 100K connected between the Transistor base and ground with 100K Pot.
Note3: The transistor used in this circuit is BC547, the IC is NE555 and the actual DC supply is 12V.

 Using iCircuit App for iPhone

Monday, April 16, 2012

Single coil Oscillator (using 10mH inductor)!

The Circuit will give a satisfying bright light with 3W LED

Using iCircuit App

Sunday, April 15, 2012

LM187 5T 20W Audio Power Amp / Dual Supply setup!

Monolithic power amplifier with a wide supply range (16V - 60V). It delivers 20W into 4 ohm or 8 ohm speaker. Using +/- 30v it delivers over 30W to 8 ohm speaker.

Some important Datasheet Notes:
Note 1: Twist Supply lead and supply ground very tightly.
Note 2: Twist speaker lead and ground very tightly.
Note 3: R1C1 band limits input signals.
Note 4: All components must be spaced very closely to IC.

Thursday, April 5, 2012

Versatile, small power LM386-based Audio Amplifier

 LM386 Audio Amplifier with Gain = 20 

When capacitor is placed between pin 1-8, it will bring the gain up to 200.

LM386 Audio Amplifier with Gain = 200

Tuesday, April 3, 2012

Aluminum-Graphite Battery with a Joule Thief

A second home made battery made of tissue paper socked in salt water solution placed between Aluminum foil and a Graphite rod from a pencil generates 1.45 V and a Joule Thief circuit to boost the voltage.

Monday, April 2, 2012

Copper-Zinc Battery with a Joule Thief

Copper rod and Galvanized nail in water and vinegar giving 0.64 Volt and lighting LED using a Joule Thief.
"The first battery was created in 1799 by Alessandro Volta .  Today batteries provide the power for an amazing variety of devices, everything from flashlights to  robots, computers, satellites and cars. Inventors and researchers continue to improve the battery, designing batteries that last longer and that are more friendly to our environment."

ThinkPad X30 IIS based Web Server and "" DNS host!

I did set up a Windows (IIS) web server on my old IBM ThinkPad X30 machine and using the DNS host service from I can access the web server over the internet using an URL instead of my dynamic  IP address. offers a client for Windows, Mac and UNIX that checks the WAN dynamic IP address and updates the DNS service with the new dynamic IP! let you create multiple DNS hosts for dedicated services like Http, ftp, .. etc and using their client software i mentioned before you can choose which host (service) you want to activate and also link to the server machine or other machine on the network.

Thursday, March 29, 2012

Light and Laser communication !

Transmitting sound using LED or a cheap laser pointer and receiving it using a photovoltaic cell and a small amplified speaker! The Audio signal modulates the power feeding the laser pointer and so it does change its brightness corresponding to the change in the amplitude of the audio signal. A solar cell converts the variations in light back to electrical signal and outputs it to the small amplified speaker ! 

Monday, March 26, 2012

Composite Video Output (NTSC or PAL) using Arduino and TV-OUT Library!

Composite Video Output (NTSC or PAL) using Arduino and TV-OUT Library!

For creating Grayscale bitmaps: Use Paint (Windows
Convert the bitmap to C Array code using Image2Code (Windows)
Schematic, Library and Wiki:

Friday, March 16, 2012

DIY Home Automation-Twitter remote-controll for home appliances !

Controlling home appliances using Twitter for Computer or for Mobile (iPhone and other internet capable mobile devices)!
Twitter message turning ON/OFF 4 different home appliances!
Arduino UNO - EthernetShield - LCD - Relay

Download Arduino sketch from here!

Ancient Egypt in the History museum of Bern!

The Historical Museum of Bern is the second largest historical museum in Switzerland. It was built in 1894 by the Neuchâtel architect André Lambert. As it was first conceived as the Swiss National Museum (the city of Zurich was chosen to host it later) the architect took as model various historic castles from the fifteenth and sixteenth century.
The museum contains collections related to the history of Berne from prehistory to the present and other permanent exhibitions from Asia and Egypt. It is a heritage site of national significance. Wikipedia
Historisches Museum Bern

Binary vs Decimal usin SN7447 and 7-Segment Display

Tuesday, March 13, 2012

Diode Logic - OR logic gate!

Demonstrating the behavior of OR logic gate using 2 diodes and one pulldown resistor!

The output C or Z of logical function OR for inputs A and B is true if at least one of the inputs is true!
in the circuit True means 5v and False mean 0v. In the circuit the unconnected wire is at 0v!

For more information and circuits visit: Diode Logic Gates

Saturday, March 10, 2012

Programming the ATmega48A !

Using STK48+ and AVR pocket programmer (ISP) / AVRdude

After installing AVRdude
Under Windows:  --Run cmd then type:
avrdude -c usbtiny -pm48 -u -U flash:w:xxxxxx.hex

Friday, March 9, 2012

Jupiter seen through my Celestron 60AZ

About 628,743,036 million km from Earth.
Jupiter is the fifth planet from the Sun and the largest planet within the Solar System. It is a gas giant with mass one-thousandth that of the Sun but is two and a half times the mass of all the other planets in our Solar System combined. Jupiter is primarily composed of hydrogen with a quarter of its mass being helium; it may also have a rocky core of heavier elements. Because of its rapid rotation, Jupiter's shape is that of an oblate spheroid (it possesses a slight but noticeable bulge around the equator). The outer atmosphere is visibly segregated into several bands at different latitudes, resulting in turbulence and storms along their interacting boundaries. A prominent result is the Great Red Spot, a giant storm that is known to have existed since at least the 17th century when it was first seen by telescope. wiki

Thursday, March 8, 2012

Remote Desktop using Arduino, Twitter and USB virtual keyboard!

Using Twitter, Arduino, EthernetShield and Virtual USB keyboard to remote control all functions of a Computer!
Arduino twitter Library:
For more Information about USB virtual Keyboard

Monday, March 5, 2012

Maison d'Ailleurs in Yverdon-les-Bains !

Maison d'Ailleurs / بيت من مكان آخر

هو متحف فريد من نوعه يختص بالخيال العلمي ويوتوبيا والرحلات الاستثنائية.

Maison d'Ailleurs in Yverdon-les-Bains ist ein weltweit einzigartiges Museum für Science-Fiction, Utopien und aussergewöhnliche Reisen.

Maison d'Ailleurs in Yverdon-les-Bains is a unique museum of science fiction, utopia and extraordinary journeys

 May 2011, Taken at Yverdon-les-Bains, Switzerland

Sunday, March 4, 2012

The Moon as seen through my Celestron 60AZ telescope!

"PowerSeeker 60 features high-quality, all-glass lenses and mirrors. The lenses feature high-transmission optic coatings that provide optimum light allowance and enhance image brightness and clarity. The scope also includes one 20mm (35x) and one 4mm (175x) eyepiece, as well as a 3x Barlow lens that triples viewing power."

The beauty of the swiss nature !!

Saturday, February 25, 2012

Thursday, February 9, 2012

Using TouchOSC to control Arduino!

"TouchOSC is a modular OSC and MIDI control surface for iPhone / iPod Touch / iPad. 
It supports sending and receiving Open Sound Control messages over a Wi-Fi network using the UDP protocol and supports both CoreMIDI and theLine 6 MIDI Mobilizer interfaces for sending and receiving MIDI messages."

for more information visit 

h e x l e r . n e t

Monday, January 16, 2012

Arduino-based CO Gas Sensor + Processing Graph !

 Designed to measure CO levels over time and also sound an alarm if needed!
There are four types of sensors available and they vary in cost, accuracy and speed of response:
 Electrochemical, Semiconductor, Digital and Portable

Thin wires of the semiconductor tin dioxide on an insulating ceramic base provide a sensor monitored by an integrated circuit. This sensing element needs to be heated to approximately 400 deg C in order to operate. Oxygen increases resistance of the tin dioxide, but carbon monoxide reduces resistance therefore by measurement of the resistance of the sensing element means a monitor can be made to trigger an alarm. The power demands of this sensor means that these devices can only be mains powered although a pulsed sensor is now available that has a limited lifetime (months) as a battery powered detector. Device usually lasts on the average of 5–10 years.