Showing posts with label electronic ic. Show all posts
Showing posts with label electronic ic. Show all posts

4/25/2013

LM358N - DEW Sensor


                                  LM358N

The following schematic shows a simple DEW sensor circuit diagram using LM258N IC. As the humidity around the circuit goes up, the resistance in the DEW sensor increases. When the resistance reaches a pre-specified level, the circuitry displays a warning message, and shuts down the external device



Under normal conditions, resistance of the dew sensor is low (1 kilo-ohm or so) and thus the voltage at its non-inverting terminal (pin 3) is low compared to that at its inverting input (pin 2) terminal. The corresponding output of the comparator (at pin 1) is accordingly low and thus nothing happens in the circuit. When humidity exceeds 80 per cent, the sensor resistance increases rapidly. As a result, the non-inverting pin becomes more positive than the inverting pin. This pushes up the output of IC1 to a high level. As a consequence, the LED inside the opto-coupler is energised. At the same time LED1 provides a visual indication. The opto-coupler can be suitably interfaced to any electronic device for switching purpose. Circuit comprising diode D2, resistors R5 and R6 and capacitor C1 forms a low-voltage, low-current power supply unit. This simple arrangement obviates the requirement for a bulky and expensive step-down transformer.






4N35 PC16552DV LM393M IR2110S LM386N-1 DS26C31TM UC3854DW
OPA2134ua OPA627AU MAX232ACSE MAX485CSA BAT54C

EPM240T100C5N PCF8574AT PCM1725U LM311N MAX1711EEG L2800-38
L6219 DG444DY



4/22/2013

Arduino and DS18B20 1-wire digital thermometer





Finally got this DS18B20 working. Actually three of them. And in two modes. Parasite power mode and main mode.
A 4.7K ohm resistor is the key.

Starting with the main mode, three wires are needed, as this sensor has three pins.
Data sheet is here : http://www.hqew.net/product-data/DS18B20

Connection is almost simple.
Pin 1 to Arduino ground
Pin 2 to Arduino digital input
Pin 3 to Arduino 5V
And a 4.7K resistor between pin 2 and pin 3

Works with three wires, as seen on the following illustration.



Parasite mode eliminates one wire.
Pin 1 to Arduino ground
Pin 2 to Arduino digital input
Pin 3 to Arduino ground (same as pin 1)
And a 4.7K resistor from pin 2 to 5V

Maybe following illustration helps.



Of course multiple DS18B20-s or different one wire devices can connected together like so:

Here comes the beauty of using digital thermometers. One pin on Arduino can be used for multiple devices, working together over one wire. Much like ethernet actually. Each device has its own unique address.
Second, a two wire cable can be used. Those are usually much easier to find than three wire cables. Also digital 1-wire thermometers work on longer cables. A simple test is cable-length-for-lm35-and-ds18b20.

Some words of caution:
No pins on DS18B20 should be left unconnected. Sometimes it works this way, sometimes it does not.
If using one should avoid mixing main mode and parasite mode thermometers on the same pin. Sometimes it works, sometimes it does not.

DS18B20 can also be installed outside. Some kind of protection is advisable.  I had one sensor outside, minimum temperature about -30° C, maximum about +35° C, protected like this. No problems so far.

Working with three DS18B20 thermometers for a year now – sometimes those thermometers do not get initialized correctly. Specially after power fluctuations. Hard reset helps in that case.



A1015         CP2102          DS18B20             AD620




3/22/2013

Multi-purpose dual power supply regulator board AMS1117



All embedded systems require electric power to operate. Most of the electronic components inside them, including the processors, can operate at a wide range of supply voltage. For example, the operating voltage range for the PIC16F1847 microcontroller is 2 to 5.5 V. But there are certain applications where you need a regulated constant voltage to avoid malfunctioning of the circuit or getting erroneous results. For instance, any application that involves analog-to-digital conversion (ADC) requires a fixed reference voltage to provide accurate digital count for input analog signal. If the reference voltage is not stable, the ADC output is meaningless. Here is my latest dual power supply regulator board that provides constant 3.3V and 5.0V outputs from an unregulated DC input (6.5-10V). It is small in size and can be easily enclosed inside the project box along with a project circuit board. It can also be used to power test circuits on breadboard. The board uses two AMS1117 series fixed voltage regulators and receives input power through a DC wall wart or an external 9V battery.


The regulator circuit uses two AMS1117 series fixed voltage regulators, AMS117 5.0 and AMS1117 3.3, to derive constant 5.0V and 3.3V outputs from an unregulated DC input voltage. The circuit diagram of the board is shown below.


3/15/2013

The PCBs IRF3205 Have Arrived


The PCBs have arrived back from Chiltern Circuits. There are 8 panels, each containing 28 printed circuit boards.
I’ve made a minor change to the circuit too. The IRFZ44N MOSFET has been replaced by an IRF3205. The new transistor has a lower ‘on resistance’ so a little less power is consumed within the device. The Z44N has an on resistance of 17 milliohms (0.017 ohms), but the 3205 is less than half that at just 8 milliohms (0.008 ohms).
The IRF3205 does have a correspondingly higher gate capacitance (about 3.2 nanofarads), so I’ve reduced the gate resistance from 10k ohms to 4k7. Tests confirm that this has little or no effect on the charge pump circuit – the gate voltage is still over 20 volts relative to ground.

3/11/2013

UC3842 CURRENTMODE PWM CONTROLLER

The  UC3842  is available in an 8-Pin mini-DIP the necessary features to implement off-line, fixed-frequency current-mode control schemes with a minimal external parts count. This technique results in improved line regulation, enhanced load response characteristics, and a simpler, easier to design control loop. Topological advantages include inherent pulse-by-pulse current limiting.




3/04/2013

H-Bridge Motor Driver Using Bipolar Transistors 2N2907A



The classic beginner’s DC motor driver circuit that appears in every electronics textbook is the bipolar transistor H-bridge.

An H-bridge is an arrangement of transistors that allows a circuit full control over a standard electric DC motor. That is, an H-bridge allows a microcontroller, logic chip, or remote control to electronically command the motor to go forward, reverse, brake, and coast.

For the purposes of this article, I’m focusing on a basic H-bridge that is a good choice for most robots (including BEAM robots) and portable gadgets. This H-bridge can operate from a power source as low as two nearly-exhausted 'AAA' batteries (2.2V) all the way up to a fresh 9V battery (9.6V).

In later pages, I'll compare the performance of three different part numbers of popular transistors (2N3904/2N3906 vs 2N2222A/2N2907A vs Zetex ZTX1049A/ZTX968) using a common robot motor from Solarbotics.

The H-bridge circuit (below) looks complicated at first glance, but it is really just four copies of a resistor + transistor + diode.


Schematic of a bipolar transistor hbridge circuit to drive a DC motor. Can you see the letter 'H'?
There are many different ways to draw the circuitry, but the above wiring diagram matches the model of most h-bridges.




Q1, Q3: These are NPN transistors. They connect the motor to ground (negative terminal of the battery).
Q2, Q4: These are PNP transistors. They connect the motor to +2.2V to +9.6V (positive terminal of the battery).
R1-R4: These resistors prevent too much current from passing through the base (labeled B) control pin of the transistor. The resistor value of 1 kilohm (1000 ohms) was chosen to provide enough current to fully turn on (saturate) the transistor. A higher resistance would waste less power, but might cause the motor to receive less power. A lower resistance would waste more power, but wouldn’t likely provide better performance for motors running on consumer batteries.
D1-D4: Diodes provide a safe path for the motor energy to be dispersed or returned to the battery when the motor is commanded to coast or stop. I notice many H-bridge circuits on the web lack these diodes. I suppose that’s safe enough for light loads at low voltages, but without diodes, a motor voltage spike can force its way through the unprotected transistors, damaging or destroying them.
M1: This is a direct-current (DC) motor. These are very common. You can find them in surplus stores online or in salvaged toys. The motor should have only two wires. Measure the resistance of the two motor wires using a multimeter. If the motor resistance is less than 5 ohms, then the transistor parts listed in this article are too weak to power the motor.