Thursday, August 29, 2013

Photodiode Gamma Ray Detector

Gamma photons interacting with cheap photodiodes produce small current pulses which are easily amplified and allow detection of individual photon events. This offers the possibility of cheap, small and rugged radiation detectors of reasonable sensitivity. While not as sensitive as larger GM-tube detectors, this solid state device is still quite useful for determining if something is radioactive enough to be interesting/concerning.
The circuit is simple, but as currently implemented has one major problem; poor temperature stability. As it is DC coupled right through to the comparator moderate temperature changes cause the threshold level to drift enough that the noise floor starts causing false triggering, or the sensitivity to less energetic radiation drops. Similarly DC shifts associated with battery voltage drop is also a problem. This is easily remedied by AC coupling the comparator stage. The unit shown has an extra output transistor driving the counter module, this is not required for the basic qualitative detector - it is implemented in much the same way as the counter interface of the ion chamber alpha counter. There is great similarity between the two circuits really, and one might build a dual gamma/alpha counter in a quite small package. (Note that there is also some sensitivity to higher energy beta.)

Construction is fairly non-critical. The sensor assembly was built using a mixture of SMD and through-hole components, with the BPW34 photodiode placed over the PN4117A JFET body. The completed sensor head was then placed in a small brass tube, with a thin piece of brass shim-stock foil closing one end to exclude light and offer some EM shielding to the sensitive front-end electronics. The other end was closed with wadding and liquid electrical tape. The detector module has three wires emerging from it and can be integrated with different electronics.

Spectroscopy *may* be possible with this detector, pulses do vary in amplitude, and appear to cluster around several similar amplitudes for different sources. However, the physical semiconductor sensor is quite small and no doubt only a small fraction of the energy of higher energy gammas is collected by it. It likely makes a very poor spectroscope, resolution wise, but it may be sufficient to tell apart the usual suspects, U, Th, Ra, and Am.


The background count rate is approximately a count every two minutes. The noise floor is quite close to ~59 keV gammas of Americium. This is probably the practical limit of the detector in its current form. More overall sensitivity might be achieved with additional or larger sized photodiodes. It should be possible to build large arrays with multiple buffer FETs all driving the one amplifier and comparator or pixelated detectors which operate like a gamma camera with seperate pulse detectors forming a matrix.

USB Ultra Infrared Receiver

USB Ultra Infrared Receiver to remote control and power on/off the PC
Today, another interesting infrared receiver solder guide for the PC is finished.
Who like to control the PC or HTPC comfortable from the sofa, can solder different IR receiver types for commercially available universal remote controls.
There are some self building guides in the ocinside.de modding section for several years
and today a new special infrared receiver soldering guide for the PC is published.
After the extended guide for the infrared receiver with hardware side function to remotely switch the PC ON or OFF as full USB variant with the name "USB Ultra infrared receiver" or briefly "USB Ultra IR" a new version 2.0 is now available.
The new USB Ultra infrared receiver v2.0 was - contrary to the previous version - extended by some electronic components and offers thereby new functions and some improvements.
The USB Ultra IR v2.0 indicates now with a red LED the receipt of infrared signals.
A green LED indicates that a power on/off signal is received which was programmed before.
Furthermore a new TSOP receiver unit is used, which is more sensitive and more energy efficient.
Last but not least the USB wiring was optimized, so that the operation also with all newer PCs and current motherboards should be no problem, since the USB data lines are now reduced to 3.3V instead of 5V.
All other functions are explained exactly on the following pages, thus much pleasure with reading and soldering.


Where is the sense of an infrared receiver at the PC ...
If you like to use the PC to watch television or S-VCD, DVD, DivX files or if you like to build a
complete 
J-box II project with LCD display, etc. for the HiFi rack, you would also like to enjoy the comfort
to remote control all applications of this PC easily from the sofa.
So the first Luxus/Lowcost infrared receiver circuit was published in July 2002 on ocinside.de and the goal was
a remote controlled PC with a connection to the serial port.
The next development was the 
USB infrared receiver guide to control the PC with a conventional remote control unit,
but with an USB connection instead of using the serial port.
So, there're a few ways to manage this very comfortable - may be with the well-known Luxus IR, Lowcost IR,
USB IR, or with the new USB Ultra infrared receiver which is now also offered as a complete kit in the Fanshop.

That is new at the USB Ultra infrared receiver 2.0 ...
Well, but what can the USB Ultra IR receiver contrary to conventional infrared receivers ?
Very simple - on the one hand it receives the signals to send it to the PC Software (like Girder, WinLIRC, etc),
but on the other hand it can also compare infrared signals to power off or power on the PC.
So it's possible to remotely power on the PC (ATX Power Button, WoL, etc.), watch a film or hear some music and
hardware side power off the PC.
The PC can thus be completely controlled with a usual remote control unit (38 kHz RC-5) e.g. of the television,
or another HiFi component and/or all universal remote control units.
And since the latest version 2.0 this is additionally shown with two light emitting diodes.
Take some pretzel sticks or chips, loll on the sofa and watch TV, hear music, etc. :-)

These units are necessary ...


1x Vishay TSOP 31238 (38 kHz infrared receiver)
1x Atmel ATtiny45-20PU (this IC have to be programmed like in the Fanshop !)
1x Atmel ATtiny13V-10PU (this IC have to be programmed like in the Fanshop !)
2x 8-pin IC-Socket
1x optoelectronic coupler CNY17-2
1x 12MHz quartz
2x Zener diodes 3.6V
1x red low-current LED
1x green low-current LED
1x 4.7µF / 16 volt capacitor (Elko or Tantal) vertical construction
1x 100nF capacitor (ceramik, layer or multilayer) vertical construction
2x 22pF ceramik capacitors vertical construction
3x 1.5 K 
resistors (0,25 watt)
2x 68 Ohm 
resistors (0,25 watt)
1x 390 Ohm 
resistor (0,25 watt)
1x 2-pole strip for the jumper
1x Jumper
1x Printed circuit board (PCB); approx. 6.8 x 3.2 cm with 25 x 12 holes is sufficient
1x USB A-Plug
1x approx. 1 meter shielded data cable with at least 4 pins
(alternatively a finished USB cabel with A-plug like in the fanshop kit can be used)
1x 2-pole cable approx. 1,5 meter 

The function and the circuit diagram of the USB Ultra IR receiver v2.0

 

The USB Ultra IR receiver v2.0 functions ...

First I would like to explain here briefly, what the USB Ultra IR v2.0 receiver makes at all.

When the TSOP31238 receives a RC5 coded infrared signal, it gets on the one hand directly to pin 7 of the
programmable ATtiny45-20PU Atmel IC.

This Atmel IC, is clocked in the circuit with a 12 MHz quartz and provides a communication between the Infrared receiver and the PC, so that this signal can being processed by infrared receiver programs like Girder.

The 1.5 K resistor is as Pullup resistor between the negative data line and the 5 V power supply
of the USB connetor to stabilize the logical signal.

The two 3V6 Zener diodes with the 68 ohm resistors limit the voltage at both USB data lines Data+ and DATA-,
so that they finally only get approx. 3.3 V instead of 5 V from the Atmel IC.

Further a red low-current (power saving) control LED is soldered with a 1.5K resistor between DATA (Pin3) and +5 V VCC (Pin2) of the TSOP infrared sensor.

The signal goes however not only to the PC, but also to the second ATtiny13V-10PU Atmel IC,
which have to be programmed with a special firmware before and has the following function:

- If the Jumper J3 is put in, the AVR IC save the valid RC5 code of an infrared remote control in the integrated
EEPROM to compare it.
The desired key on the remote control for switching on and switching off the PC is thus programmed.
As soon as a valid RC5 signal of the remote control arrives, a green low current LED with a 1.5K resistance and the opto coupler with a 390 ohm resistor is supplied with power.

- When the Jumper is then taken off, the small 8-bits AVR RISC processor compares all incoming signals
with the stored signal of the EEPROM and if the two signals are equal, the opto coupler is supplied with power.

Unfortunately the ATTINY13V-10PU Atmel IC cannot be programmed any longer as simply as the AT90S2323 IC
in the
 USB infrared receiver guidance, since Atmel changed some special Fuse bits which prevents a programming
of the firmware with conventional ISP prommer (ISP = in system prommer).
For this reason I program the firmware with a more complex Atmel programmer directly on the ICs and
offer them programmed as kit in the
 Fanshop.
Here I set also all fuse bits that this Atmel IC needs no external quartz or resonator.

 

The opto-coupler and the solution to switch the PC on and off ...

After careful consideration and numerous tests I decided to pass the switching signal of the Atmel IC
over a 390 ohms resistor to an opto coupler, which has the task, to connect its 2-pole output (pin 4 & pin 5),
as soon as the input pins (pin 1 & pin 2) got the switching voltage.
This output could be connected e.g. with a WoL (Wake on Lan) connector, where we can also get the 5 Volt power.
However, then one would not have the ingenious advantage to additionally switch its PC off.

For this reason I decided for better solution, where the output of the opto coupler is connected directly
with the PC power Button parallel to the power Button connection of the motherboard.
The circuit get its necessary 5 V power supply over an USB cable, because current ATX Mainboards supplies the
USB port also with power when the PC is switched off if this is activated by a Jumper (+5VSB) or in the BIOS.
If this is not the case, or the PC has no necessary PowerOn feature, it's possible to get the 5 Volt power
over a small external 5 Volt regulated power supply unit.
To separate the 5 V USB power supply you could cut, for example, the VCC connection from Pin8 of the ATTINY45 to Pin8 of the ATTINY13V or connect the complete circuit simply to an active USB Hub with external power supply to supply the circuit continuously with power.
Alternatively it would be possible to get it from the ATX power supply connector directly. However a wrong wiring
would forgive no errors, therefore I would not like to continue here with a detailed explanation.
A PC ATX PSU pinout can be found in our
 Forum - e.g. in this PC power supply pinout topic.

It's easy to check if the USB port gets power when the PC is switched off, with an optical Mouse at the USB port.
Because the lighting of the optical scanning continues in this case if the PC is switched off.
Of course it's also possible to measure the voltage of the USB port.
And who would like to vary a little bit, can use the WoL connection of the Mainboard.

 

Here is the circuit for the USB Ultra IR v2.0 guide ...



 

Here is the connection diagram of the old USB Ultra IR v1.1.

Additionally I have also build another variant for the operation of the power AND the reset button.
Here is a link to the
 special POWER and RESET circuit.
If you would like to build this, you can order e.g. the USB Ultra IR v2.0 kit in combination with the normal
Ultra IR kit and develop hereby the special reset & power circuit.

The soldering guide for the USB Ultra IR receiver

 

Enough theory, lets go to the practice ...

Here is a picture of the PCB layout with all construction units for easy soldering.
Just watch it comfortably while your soldering iron (15-25 watt) is heating-up.


Here is the old USB Ultra IR v1.1 solder guide.

 

The correct position of the construction units ...

First we begin to plug in the construction units as explained on the 25 x 12 holes of the printed circuit board (PCB).
Bent the pins under the PCB a little bit, but please DO NOT shorten the pins, yet !!!
It is important that the small notches of the two IC sockets and the notch of the opto coupler with 6 pins
are showing upward.
The new Tiny45 IC got one small point instead of the notch to show the right direction.
It is also necessary to pay attention to the polarity of both zener diodes (Z-diodes) and both Light Emitting Diodes,
whereby the black ring of the Z-diodes have to show up to the direction of the IC notches.
The polarity of LEDs is shown on a picture later on.
 
Furthermore you must absolutely pai attention to the correct polarity of the small yellow 4.7 µF tantal capacitor,
where the positive pin must show likewise upward like the IC notches!
 
(beneath the 16 is a small plus (+) symbol to indicate the polarity of the construction unit).
With the other construction units there is no polarity, so that only the correct position is important there.
Here again a picture with the different tantal capacitor designs and the polarity:


Here is a picture of the Z-Diodes / Zener Diodes polarity:


And here is a picture of the light emitting diodes polarity, whereby the shorter pin with the larger connecting surface and the reflector within the light emitting diode is the cathode/GND/ground/-/VSS.
The longer pin with the smaller connecting surface within the light emitting diode is the anode/+/VCC:


Once again a photo with the right positions whereby we place the LEDs later:


 

When all construction units except the LEDs are fixed attached, it continues with the lower surface.
The 22pF capacitors of the quartz are not absolutely necessary but they are the load capacity for the quartz and should be soldered to a quartz.
 
I've published another mirror-inverted picture so that one does not have to turn always the PCB for the
detection of the right construction unit.

 

Here's the mirror-inverted view ! for better orientation on the lower surface ...


rot = red, weiss = white, grün = green, schwarz = black, Zum Mainboard = to the mainboard power switch
spiegelverkehrt = mirrored

 

Correct bending and pinch off the pins ...

On the basis of the photo one should bend now simply all pins of the construction units and pinch off the pins,
whereby one again should make sure 100% that all construction units are on the correct position and
as above explained also paid attention to the correct polarity.
If you make an error in this step, it's later rather difficult to out-iron - spend some time to bend all pins
as shown and cut all pins in the correct length! with a long-nosed pliers and a small wire cutting pliers.

 

Thus the lower surface looks like after the bending all pins:


 

And in such a way looks the lower surface after cutting the pins:


 

Now solder only the shown parts ...

First we solder only all pins on the lower surface of the PCB as represented on the following Picture.
Please do not solder everything, yet, but first times only each pin of the parts, since we still need the cables.
Also absolutely consider here the free spaces, where no connection may be.


 

Now we solder still another small bridge (from one before cutted pin) to the right side.
Simply bend one side approx. 2mm, put the wire, cut the correct length on the other side and then solder,
so the bridge can not slip when soldering.


Now another solder bridge is added in the center of the two ICs.
Here we can also use simply a piece from the material cutted before.


 

Solder the red low current LED and the green low current LED ...

Now it is time for the two light emitting diodes, which must be polarized absolutely correctly,
so that they can light up afterwards.
The red LED is placed directly to the TSOP, whereby the shorter pin (-) points to the TSOP IR receiver.
The green LED is put in near the Atmel ATTINY13V IC, whereby the longer pin (+) is soldered to the resistor
and the shorter pin (-) to the small GND solder bridge, which we soldered on a while ago.

I consciously soldered the two LEDs now, because who ordered the new small IR receiver box from the Fanshop,
of course would like to see the LEDs nevertheless. And this is only possible if the LED pins are left very long,
so that the LEDs can be seen afterwards on the top side of the box.
One should put the LED pins so far into the PCB, until the longer pin is seen approximately 8mm at the PCB bottom.

Who does not use the IR box, can solder both LEDs directly on the PCB.
And who would like to place the PCB inside of a PC or
 HTPC, can use a 2-pol cable in order to attach the LEDs for example in a drive front bezel or in a Casesticker.

On the next picture you can see the four new soldered connections - two of the red LED in the left above the TSOP and two of the green LED right down near the lower IC socket.


 

 

Prepare the cables ...

If you like to relax a little bit, it's time to prepare the cables.


 

All cables are stripped approx. 3-4 cm, the outside shield is separated cleanly and then all individual wires
have to be stripped and tin-plated.
It makes sense to tin all wires to get the tin later easier and faster on the wires.
Simply hold the soldering iron to the stripped wire and hold some tin to the other side solder.
Repeat this with all wires.

Here is a small picture sequence how to strip it correctly ...


 

Put the cables into the right PCB hole ...

The small cable, which I could not unfortunately avoid in the layout, one can get oneself simply,
cutting the USB cable or the 2-pole cable a few centimeter and taking one wire of it.
Strip the wire approx. 2-3 mm, twine and tin-plate it as written before.

Now we put the cables with the explained colors in the correct place into the PCB.

The four wires of the USB cable are soldered this way:
The red (VCC) cable is soldered to the middle TSOP pin, the 1.5 K resistor and the one side of the 100n capacitor.
The black cable (GND) is soldered to the Jumper and the other side of the 100n capacitor.
The white (or yellow) cable (DATA-) is soldered with the 68ohm resistor to pin 5 of the ATTiny45 IC and the
green (or blue) cable (DATA+) is soldered with the other 68ohm resistor to pin 6 of the ATTiny45 IC.


 

Sometimes USB cables have different colors.
Here is a table with some possible USB cable colors (just in case your cable is NOT red, black, white and green):


 

The last soldering act, where the remaining connections are soldered ...

Now we solder as explained the remaining solder joints, whereby we must absolutely pay attention to
all free spaces (e.g. the two pins of the tantal capacitor may not soldered together).
If you still like to solder a little bit, you're free to solder the GND shield of the USB cable with a short wire
to a GND solder point of the circuit, but it's not necessary with same GND.


We solder the 2-pole, approx. 150 cm long cable (in the picture brown and white) to the pins 4 and 5
of the opto coupler, which is connected later to the power Button of the PC.

 

 

Here is a picture of the soldered lower surface ...


 

Insert both ICs in the right direction ...

Now insert the ICs with the IC notch (or the point) to the IC Socket notch (in the following picture to the right),
whereby the ATTiny45-20 is alongside the quartz and the ATtiny13V-10PU is next to the Jumper.
Afterwards we can put on the Jumper for the first programming ...


 

That's it, we've build USB Ultra IR-receiver 2.0 ... :-)


Now control again all soldered connections and again the correct polarity.
It is now rather late to discover failures, but better late than never and one can never control often enough.
The power supply unit and the USB port is secured, but it's really important to prevent all failures.
Of course I'm not responsible for any damages.
But if you've problems with late noticed solder failures, I'll give my best to help you by E-Mail.

 

First start-up of the USB Ultra IR receiver v2.0

 

Now we come finally to the most beautiful point of the whole work ...


 

The wiring at the PC ...

Who soldered and controlled everything several times, can now turn to the first operation of the USB Ultra IR v2.
Switch off the PC (on the back of the PC with the main power switch!) and take off the left PC case side panel.
Now we put the USB plug into a free USB socket and screw out a mounting bracket of a free slot.
There we lead the approx. 150 cm long cable with the stripped, tinned, brown and white cable through.

Now we have several ways to connect these two poles of the opto coupler parallel to the power button,
whereby I would like to specify a few …

- The simplest method would be to be put the two poles from top into the socket of the power Button cable and
fix the cable e.g. with some tape or a cable strap.

- Or we take off the 2-pole plug from the power button, put then from downside the two very thin wires
of the cable into the socket and put that together to the Mainboard.

- Or we solder the two cable ends to the 2-pole plug of chassis power button.

- Or we solder the two cable ends directly to the front power button.

- Or we solder this to 2 special pins of the ATX power supply connector, but this is a little bit dangerous if
you take the wrong pins by mistake.

- Or we connect it with a WOL (WakeOnLAN) connection as described on the second page,
whereby I would not prefer this variant due to the missing switching off function.

However, it is your choice, but the cable should be well attached.
For the first test one can fasten this provisionally and solder the cable correctly later.
It may be that one must turn the polarity of the cable once, because the opto coupler connects only in one direction.
Try out before soldering once provisionally.

 

Store the desired key of the remote control ...

Now we come to the first test of the circuit.
Attach the jumper to the USB Ultra IR and power on the power supply unit on the back of the PC and
start the PC for example in the BIOS, since we need still no operating system.
Now we press the desired remote control key once for the learning the Power ON/OFF function.
If everything is correctly soldered and the remote control unit works with the RC5
* standard,
the PC should now Power off.
Thus the signal is already written in the memory of the Atmel IC and we can now take off the Jumper.
By the way the signal remains in the Atmel IC, if the IC is longer time without power supply, because the data
is stored in the EEPROM.
The key can be changed at any time, simply repeat the above steps with the attached Jumper.

* Note: RC5 is a very common infrared coding standard of the company Philips and is also used with many
other remote control units (e.g. Loewe, Grundig, Marantz, etc.).
However there are also some remote controls, which works with other standards, like e.g. Sony (SIRCS),
which cannot be recognized thus of the Atmel IC firmware.
In this case simply use a conventional universal remote control, set it to a few Philips devices (e.g. TV)
or try one after the other, until the PC reacts to the signal and power off / on.
Alternatively most universal remote control units offers also a so-called browsing function,
with which one can find very simply a suitable RC5 device (e.g. by pressing one button several times, etc.)

If the learning does not run in the first attempt (try the 2-pole cable to the Mainoard in both directions),
it's possible that the used remote control does not work with the RC5 standard mentioned before.
Therefore please absolutely try it with a universal remote control, before an extensive error tracing.
The Jumper can remain continuous attached for all tests until you've stored the desired code,
because the opto coupler switches (and the green LED light up) also in the learning mode.
BTW.: The red control LED shows all infrared signals - also if it's no RC5 konform code.

 

Well then switch the PC on (of course with the remote control) and install the software ...

The software is explained extensively in the previous USB receiver guide.

Here is the driver installation guide for the USB IR-receivers and all necessary downloads.

And here is the installation guide for girder with all download links and suitable plugins for girder.

Alternatively for Windows I can suggest the IR-Receiver Software HIP (Human Interface Programmer) or the SoftwareEventGhost, which can be used with an IgorPlug USB Plugin - the file name is IgorPlug.dll - after the IgorPlug download and after the Igorplug driver installation.

For Linux friends are of course also several remote control software solutions available, for example
LIRC (select igorplugusb config in the lirc_dev lirc_igorplugusb kernel module), or
VDR solutions with LibUSB, which were already successful tested from our visitors with the USB IR receivers.


Just one further operating system suggestion before you can begin with your own USB Ultra IR ...
In the system control of Microsoft Windows are some nice energie control settings, what windows should do when
you press the power button.
There you should select "shutdown" or "hibernation mode" when you press the power button or remote control button, thus Windows will close all programs properly before the PC power off.

Portable USB Charger


Although this may look ghetto, it does the job, is cheep to make, and is a fun project for someone that wants to learn a bit about electronics. Also, if the looks bother you, there are always ways to pretty things up.

“The project name says it all. It is a device that will charge things like Ipods, PDAs, that accepts charge from a USB port. It runs off a 9-V battery, and through the simple circuit, out comes a regulated 5-V perfect for a USB port.”
Step 1: Buy Parts
LM/MC 7805 +5VDC Voltage Regulator
Type-A Female USB Port
100 UF Electrolytic Capacitor
0.1 UF Capacitor
150/160 ohm Resistor
9V Battery clip
2V 20mA LED color of your choice
Unprinted circuit board
ON/OFF switch if you want

Step 2: The Circuit Board
Do exactly as I drew in the diagram.
Use a continueity tester or multi-meter to make sure the parts separated by the black mark in the picture DO NOT conduct. Then drill holes to put the components mark in the correct order and observe polarity for the 100 uF cap.

Step 3: USB Port

Step 4: The Finishing Touch

Lastly put the 9-V battery clip onto the circuit board, and you got your self a portable USB Charger.

Cellphone Operated Land Rover

Conventionally, wireless-controlled robots use RF circuits, which have the drawbacks of limited working range, limited frequency range and limited control. Use of a mobile phone for robotic control can overcome these limitations. It provides the advantages of robust control, working range as large as the coverage area of the service provider,no interference with other controllers and up to twelve controls.
Although the appearance and capabilities of robots vary vastly, all robots share the features of a mechanical, movable structure under some form of control. The control of robot involves three distinct phases: perception, processing and action. Generally, the preceptors are sensors mounted on the robot, processing is done by the on-board microcontroller or processor, and the task (action) is performed using motors or with some other actuators.

Project overview:
In this project, the robot is controlled by a mobile phone that makes a call to the mobile phone attached to the robot. In the course of a call, if any button is pressed, a tone corresponding to the button pressed is heard at the other end of the call. This tone is called ‘dual-tone multiple-frequency’ (DTMF) tone. The robot perceives this DTMF tone with the help of the phone stacked in the robot.



The received tone is processed by the ATmega16 microcontroller with the help of DTMF decoder MT8870. The decoder decodes the DTMF tone into its equivalent binary digit and this binary number is sent to the microcontroller. The microcontroller is preprogrammed to take a decision for any given input and outputs its decision to motor drivers in order to drive the motors for forward or backward motion or a turn.


The mobile that makes a call to the mobile phone stacked in the robot acts as a remote. So this simple robotic project does not require the construction of receiver and transmitter units.


DTMF signaling is used for telephone signaling over the line in the voice- frequency band to the call switching center. The version of DTMF used for telephone tone dialing is known as ‘Touch-Tone.’


DTMF assigns a specific frequency (consisting of two separate tones) to each key so that it can easily be identified by the electronic circuit. The signal generated by the DTMF encoder is a direct algebraic summation, in real time, of the amplitudes of two sine (cosine) waves of different frequencies, i.e., pressing ‘5’ will send a tone made by adding 1336 Hz and 770 Hz to the other end of the line. The tones and assignments in a DTMF system are shown in Table I.


Circuit description:
Fig. 1 shows the block diagram of the microcontroller-based mobile phone operated land rover. The important components of this rover are a DTMF decoder, microcontroller and motor driver.


An MT8870 series DTMF decoder is used here. All types of the MT8870 series use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. The built-in dial tone rejection circuit eliminates the need for pre-filtering. When the input signal given at pin 2 (IN-) in single-ended input configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF tone is transferred to Q1 (pin 11) through Q4 (pin 14) outputs.


Table II shows the DTMF data output table of MT8870. Q1 through Q4 outputs of the DTMF decoder (IC1) are connected to port pins PA0 through PA3 of ATmega16 microcontroller (IC2) after inversion by N1 through N4, respectively.


The ATmega16 is a low-power, 8-bit, CMOS microcontroller based on the AVR enhanced RISC architecture. It provides the following features: 16 kB of in-system programmable Flash program memory with read-while-write capabilities, 512 bytes of EEPROM, 1kB SRAM, 32 general-purpose input/output (I/O) lines and 32 general-purpose working registers. All the 32 registers are directly connected to the arithmetic logic unit, allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code-efficient.

Outputs from port pins PD0 through PD3 and PD7 of the microcontroller are fed to inputs IN1 through IN4 and enable pins (EN1 and EN2) of motor driver L293D, respectively, to drive two geared DC motors. Switch S1 is used for manual reset. The microcontroller output is not sufficient to drive the DC motors, so current drivers are required for motor rotation.

The L293D is a quad, high-current, half-H driver designed to provide bidirectional drive currents of up to 600 mA at voltages from 4.5V to 36V. It makes it easier to drive the DC motors. The L293D consists of four drivers. Pins IN1 through IN4 and OUT1 through OUT4 are input and output pins,  respectively, of driver 1 through driver 4. Drivers 1 and 2, and drivers 3 and 4 are enabled by enable pin 1 (EN1) and pin 9 (EN2), respectively. When enable input EN1 (pin 1) is high, drivers 1 and 2 are enabled and the outputs corresponding to their inputs are active. Similarly, enable input EN2 (pin 9) enables drivers 3 and 4.


Software description:
The software is written in ‘C’ language and compiled using CodeVision AVR ‘C’ compiler. The source program is converted into hex code by the compiler. Burn this hex code into ATmega16 AVR microcontroller.


The source program is well commented and easy to understand. First include the register name defined specifically for ATmega16 and also declare the variable. Set port A as the input and port D as the output. The program will run forever by using ‘while’ loop. Under ‘while’ loop, read port A and test the received input using ‘switch’ statement. The corresponding data will output at port D after testing of the received data.


Working:
In order to control the robot, you need to make a call to the cell phone attached to the robot (through head phone) from any phone, which sends DTMF tunes on pressing the numeric buttons. The cell phone in the robot is kept in ‘auto answer’ mode. (If the mobile does not have the auto answering facility, receive the call by ‘OK’ key on the rover-connected mobile and then made it in hands-free mode.) So after a ring, the cellphone accepts the call.


Now you may press any button on your mobile to perform actions as listed in Table III. The DTMF tones thus produced are received by the cellphone in the robot. These tones are fed to the circuit by the headset of the cellphone. The MT8870 decodes the received tone and sends the equivalent binary number to the microcontroller. According to the program in the microcontroller, the robot starts moving.


When you press key ‘2’ (binary equivalent 00000010) on your mobile phone, the microcontroller outputs ‘10001001’ binary equivalent. Port pins PD0, PD3 and PD7 are high. The high output at PD7 of the microcontroller drives the motor driver (L293D). Port pins PD0 and PD3 drive motors M1 and M2 in forward direction (as per Table III). Similarly, motors M1 and M2 move for left turn, right turn, backward motion and stop condition as per Table III.


Construction:
When constructing any robot, one major mechanical constraint is the number of motors being used. You can have either a two-wheel drive or a four-wheel drive. Though four-wheel drive is more complex than two-wheel drive, it provides more torque and good control. Two-wheel drive, on the other hand, is very easy to construct.

Top view of a four-wheel-driven land rover is shown in Fig. 3. The chassis used in this model is a 10×18cm2 sheet made up of parax. Motors are fixed to the bottom of this sheet and the circuit is affixed firmly on top of the sheet. A cellphone is also mounted on the sheet as shown in the picture.

In the four-wheel drive system, the two motors on a side are controlled in parallel. So a single L293D driver IC can drive the rover. For this robot, beads affixed with glue act as support wheels.

Tip and Ring: 
Most of the readers cant pass this term 'Tip' and 'Ring'; so for your convenience lets try to solve this. First of all identify the tip and ring with the help of the figure, given below, then use the DMM and apply the short circuit test to know the unknown wires. 
For short circuit test select the 'buzzer' sign in the DMM then connect the one lead tip and the other with the hand frees cut wires one by one, when you hear the beep you got it! that is you wire, the tip wire. Similarly, now connect the DMM lead to ring the other with the rest of the wires and do the same. Cut the hand frees wire before the mike. I hope it ll work for you guys.     

 Download: Code files


Schematic:




Component Required:

IC1 -                    MT8870 DTMF decoder
IC2 -                    ATmega16 AVR microcontroller
IC3 -                    L293D motor driver
IC4 -                    74LS04 NOT gate
D1 -                     1N4007 rectifier diode
R1, R2 -                100-kilo-ohm
R3 -                     330-kilo-ohm
R4-R8 -                10-kilo-ohm
C1 -                     0.47μF ceramic disk
C2, C3, C5, C6 -    22pF ceramic disk
C4 -                     0.1μF ceramic disk
XTAL1 -                3.57MHz crystal
XTAL2 -                12MHz crystal
S1 -                     Push-to-on switch
M1, M2 -               6V, 50-rpm geared DC motor
Batt. -                  6V, 4.5Ah battery

IP Address Checker