Over-Speed Indicator

This circuit is designed for indicating over-speed and direction of rotation of the motor used in mini hand tools, water pump motors, toys and other appliances. A 12V DC motor (M1) is coupled to the rotating part of the appliance with a suitable fixing arrangement.  When the motor rotates, it develops a voltage. This over-speed indicator is built around operational amplifier CA3140 (IC1). Set the reference voltage (depending on the desired speed) by adjusting preset VR1 at pin 2 of IC1. When the voltage developed at pin 3 of IC1 is higher than the reference voltage at  pin  2,  output  pin  6  of  comparator IC1  goes  high  to  sound  piezobuzzer PZ1 and light up LED3.The rotation indicator circuit is  built  around  AND  gate  74LS08 (IC2).  Pin 2 of gate N1 goes high when the motor rotates in forward direction, while pin 1 of gate N1 is pulled high via resistor R2.  When  both  pins  1 and  2  are  high,  output pin  3  of  gate  N1  goes high to light up LED1. Similarly, pin 5 of gate N2 goes high when the motor rotates in reverse direction. When both pins 4 and 5 are high, output pin 6 of gate N2 goes high to light up LED2.

over-speed indicator

Reference
Electronics For You.

SS7 Basic Concept

Overview

Common Channel Signaling System No. 7 (i.e., SS7 or C7) is a global standard for telecommunications defined by the International Telecommunication Union (ITU)

Telecommunication Standardization Sector (ITU-T). The standard defines the procedures and protocol by which network elements in the public switched telephone network (PSTN) exchange information over a digital signaling network to effect wireless (cellular) and wireline call setup, routing and control. The ITU definition of SS7 allows for national variants such as the American National Standards Institute (ANSI) and Bell Communications Research (Telcordia Technologies) standards used in North America and the European Telecommunications Standards Institute (ETSI) standard used in Europe.

The SS7 network and protocol are used for:

•  basic call setup, management, and tear down

• wireless services such as personal communications services (PCS), wireless roaming, and mobile subscriber authentication

•  local number portability (LNP)

•  toll-free (800/888) and toll (900) wireline services

•  enhanced call features such as call forwarding, calling party name/number display, and three-way calling

•  efficient and secure worldwide telecommunications

Signaling Links

SS7 messages are exchanged between network elements over 56 or 64 kilobit per second (kbps) bi-directional channels called signaling links. Signaling occurs out-of-band on dedicated channels rather than in-band on voice channels. Compared to in-band signaling, out-of-band signaling provides:

•  faster call setup times (compared to in-band signaling using multi-frequency (MF) signaling tones)

•  more efficient use of voice circuits

•  support for Intelligent Network (IN) services which require signaling to network elements without voice trunks (e.g., database systems)

•  improved control over fraudulent network usage

SSPs are switches that originate, terminate, or tandem calls. An SSP sends signaling messages to other SSPs to setup, manage, and release voice circuits required to complete a call. An SSP may also send a query message to a centralized database (an SCP) to determine how to route a call (e.g., a toll-free 1-800/888 call in North America). An SCP sends a response to the originating SSP containing the routing number(s) associated with the dialed number. An alternate routing number may be used by the SSP if the primary number is busy or the call is unanswered within a specified time. Actual call features vary from network to network and from service to service.

Network traffic between signaling points may be routed via a packet switch called an STP. An STP routes each incoming message to an outgoing signaling link based on routing information contained in the SS7 message. Because it acts as a network hub, an STP provides improved utilization of the SS7 network by eliminating the need for direct links between signaling points. An STP may perform global title translation, a procedure by which the destination signaling point is determined from digits present in the signaling message (e.g., the dialed 800 number, calling card number, or mobile subscriber identification number). An STP can also act as a “firewall” to screen SS7 messages exchanged with other networks.

Because the SS7 network is critical to call processing, SCPs and STPs are usually deployed in mated pair configurations in separate physical locations to ensure network-wide service in the event of an isolated failure. Links between signaling points are also provisioned in pairs. Traffic is shared across all links in the linkset. If one of the links fails, the signaling traffic is rerouted over another link in the linkset. The SS7 protocol provides both error correction and retransmission capabilities to allow continued service in the event of signaling point or link failures.

SS7 Signaling Link Types

Signaling links are logically organized by link type (“A” through “F”) according to their use in the SS7 signaling network.

A Link:  An “A” (access) link connects a signaling end point (e.g., an SCP or SSP) to an STP. Only messages originating from or destined to the signaling end point are transmitted on an “A” link.

B Link:  A “B” (bridge) link connects an STP to another STP. Typically, a quad of “B” links interconnect peer (or primary) STPs (e.g., the STPs from one network to the STPs of another network). The distinction between a “B” link and a “D” link is rather arbitrary. For this reason, such links may be referred to as “B/D” links.

C Link: A “C” (cross) link connects STPs performing identical functions into a mated pair. A “C” link is used only when an STP has no other route available to a destination signaling point due to link failure(s). Note that SCPs may also be deployed in pairs to improve reliability; unlike STPs, however, mated SCPs are not interconnected by signaling links.

D Link:  A “D” (diagonal) link connects a secondary (e.g., local or regional) STP pair to a primary (e.g., inter-network gateway) STP pair in a quad-link configuration. Secondary STPs within the same network are connected via a quad of “D” links. The distinction between a “B” link and a “D” link is rather arbitrary For this reason such links may be referred to as “B/D” links.

E Link:  An “E” (extended) link connects an SSP to an alternate STP. “E” links provide an alternate signaling path if an SSP’s “home” STP cannot be reached via an “A” link. “E” links are not usually provisioned unless the benefit of a marginally higher degree of reliability justifies the added expense.

F Link:  An “F” (fully associated) link connects two signaling end points (i.e., SSPs and SCPs). “F” links are not usually used in networks with STPs. In networks without STPs, “F” links directly connect signaling points.

SS7 Protocol Stack

The hardware and software functions of the SS7 protocol are divided into functional abstractions called “levels”. These levels map loosely to the Open Systems Interconnect (OSI) 7-layer model defined by the International Standards Organization (ISO).

Message Transfer Part

The Message Transfer Part (MTP) is divided into three levels. The lowest level, MTP Level 1, is equivalent to the OSI Physical Layer. MTP Level 1 defines the physical, electrical, and functional characteristics of the digital signaling link. Physical interfaces defined include E-1 (2048 kb/s; 32 64 kb/s channels), DS-1 (1544 kb/s; 24 64kb/s channels), V.35 (64 kb/s), DS-0 (64 kb/s), and DS-0A (56 kb/s).

MTP Level 2 ensures accurate end-to-end transmission of a message across a signaling link. Level 2 implements flow control, message sequence validation, and error checking. When an error occurs on a signaling link, the message (or set of messages) is retransmitted. MTP Level 2 is equivalent to the OSI Data Link Layer.

MTP Level 3 provides message routing between signaling points in the SS7 network. MTP Level 3 re-routes traffic away from failed links and signaling points and controls traffic when congestion occurs. MTP Level 3 is equivalent to the OSI Network Layer.

ISDN User Part (ISUP)

The ISDN User Part (ISUP) defines the protocol used to set-up, manage, and release trunk circuits that carry voice and data between terminating line exchanges (e.g., between a calling party and a called party). ISUP is used for both ISDN and non-ISDN calls. However, calls that originate and terminate at the same switch do not use ISUP signaling.

Telephone User Part (TUP) 

In some parts of the world (e.g., China, Brazil), the Telephone User Part (TUP) is used to support basic call setup and tear-down. TUP handles analog circuits only. In many countries, ISUP has replaced TUP for call management.

Signaling Connection Control Part (SCCP)

SCCP provides connectionless and connection-oriented network services and global title translation (GTT) capabilities above MTP Level 3. A global title is an address (e.g., a dialed 800 number, calling card number, or mobile subscriber identification number) that is translated by SCCP into a destination point code and subsystem number. A subsystem number uniquely identifies an application at the destination signaling point. SCCP is used as the transport layer for TCAP-based services. Transaction Capabilities Applications Part (TCAP)

TCAP supports the exchange of non-circuit related data between applications across the SS7 network using the SCCP connectionless service. Queries and responses sent between SSPs and SCPs are carried in TCAP messages. For example, an SSP sends a TCAP query to determine the routing number associated with a dialed 800/888 number and to check the personal identification number (PIN) of a calling card user. In mobile networks (IS-41 and GSM), TCAP carries Mobile Application Part (MAP) messages sent between mobile switches and databases to support user authentication, equipment identification, and roaming.

Operations, Maintenance and Administration Part (OMAP) and ASE

OMAP and ASE are areas for future definition. Presently, OMAP services may be used to verify network routing databases and to diagnose link problems.

Reference:

Information collected from http://www.pt.com

Other SS7 Information

For general information about SS7, refer to Bell Atlantic’s Signaling System 7 tutorial on the International Engineering Consortium Web ProForum web site (http://www.webproforum.com/).

For detailed information about SS7, contact:

•  International Telecommunication Union (ITU) – http://www.itu.int/

•  American National Standards Institute (ANSI) – http://www.ansi.org/

•  Telcordia Technologies (formerly Bellcore) – http://www.telcordia.com/

•  European Telecommunications Standards Institute (ETSI) – http://www.etsi.org/

Simple Buck LED Driver with PWM Input

Poorman’s Buck is a simple, constant-current high power LED driver capable of driving 350mA to 1A of output current. It is compact (footprint is 1 x 1.5 inches) and easy to build, yet very versatile.

Input power supply voltage can be anywhere between 5 to 20V (must be higher than the connected LED’s forward voltage drop). Up to 5 LEDs can be connected in series, and by parallel connecting the series connected LEDs, up to 18W total of LEDs can be driven (with 20V power supply).

Output current is configurable; 350mA, 700mA, or 1A using included parts. In board potentiometer can lower the output current down to about 9% level – which can be used as a dimmer. Full dimming control can also be done via the PWM input, making Poorman’s Buck a perfect building block for Arduino or other microcontroller projects.

Refference: http://www.instructables.com/id/Poormans-Buck/

Buck led circuit

  • Inductor “switch mode” (buck) converter for high energy efficiency.
  • Wide supply voltage range of 5 to 20V. Great with batteries as well as AC adaptors.
  • Cycle-by-cycle, true constant current circuit
  • Configurable output current up to 1A
  • Up to 15W maximum output power. (at supply voltage 20V with five 3W LEDs connected)
  • Current control potentiometer (trims the output current down to about 9%)
  • Current control can be used as a built-in dimmer
  • Output short-circuit protection
  • PWM control input – controllable via external microcontroller including Arduino.
  • Compact design – only 1 x 1.5 x 0.5 inches (excluding the pot shaft)

Buck LED Driver Component

Circuit Design

The circuit is built around a very common dual comparator IC: LM393 using buck converter topology.

The output LED current flows through R10 and R11 (current sensing resistors). The resulting voltage is proportional to the current according to the Ohms Law. This voltage is compared to the reference voltage by a comparator. As the Q3 turns on, current flows through L1, LEDs, and the current sensing resistors. Inductor does not allow current to shoot up immediately, so the current increases gradually. As the current gets higher, the voltage at the comparator’s negative input pin increases as well. When it gets higher than the reference voltage, the comparator trips, which turns off Q3, which turns off current flowing into the inductor.
Now because inductor is “charged”, current doesn’t stop flowing immediately. Current then flows through the Schottky diode D3 to power the LEDs. This current gradually decays, and as the current decays so does the voltage across the current sense resistors. Eventually the comparator flips back again, and the cycle starts over. This method of controlling current is often called “cycle by cycle” current limiting. (This “true” current limiting also works as a buit-in short circuit protection. Shorting the output doesn’t harm the circuit.)

This whole cycle above happens very quickly – as fast as 500,000 times a second. (This frequency changes depending on the supply voltage and LEDs forward drop voltage and current. Anywhere between 100k – 500kHz.)

The reference voltage is generated by an ordinary diode. Forward voltage drop of a diode is about 0.7V and stays relatively constant. Then potentiometer VR1 trims the voltage – because the output current is compared against this voltage, this in turn controls the output current. The range of the change is about 11:1 or 100% – 9%. This is pretty narrow compared to a real dimmer, however it is quite handy. Sometimes after installing the light you realize that LEDs are much brighter than expected. Then you can simply trim the current down until the brightness is just right.
You can omit the potentiometer and replace with resistors if your project doesn’t call for it.

The beauty of a switch-mode controller is that it controls the output current without “burning” the excess energy. Energy from the power supply is used only as much as needed to get the required output current. Some energy is lost in the circuit due to the resistance and other factors, but not that much. A typical buck converter has efficiency of 90% or higher.
The Poorman’s Buck doesn’t get very hot when operating – only get warm. Unlike linear regulators, no heat sinking needed.

References
Buck Converter: http://en.wikipedia.org/wiki/Buck_converter
Comparator: http://en.wikipedia.org/wiki/Comparator

Configuring Output Current
The Poorman’s Buck can be configured to deliver anywhere between 350mA to 1A of output current. Combination of R2’s value and wether you connect R11, you can change the output current.

Here are samples of a few configurations:

Output Current R2 Value Use R11?
350mA (1W LED) 10k No
700mA (3W LED) 10k Yes
1A (5W LED) 2.7k Yes

The current control pot VR1 controls the output current from about 9-100% of the set current. So if you configure the unit to deliver 1A, you can trim it down to about 90mA just by turning the pot. This can be used as a dimmer (although the dimming range is somewhat limited).

PWM Input
The basic operation of this circuit can be done with just one comparator. However the most popular comparator IC (LM393) has two comparators in it. So rather than letting one of the comparators sitting doing nothing, I added a few extra parts to make it PWM controllable. the second comparator in the circuit works as an AND gate so that the PWM input has to be open (or logic high) for the output LEDs to turn on. Usually this pin can be left open (no connection) and the Poorman’s Buck will operate without PWM. But when you need that extra control, you can connect Arduino or other microcontroller and control the high-power LEDs connected to Poorman’s Buck. With Arduino, control is just as easy as using “AnalogWrite()” command. Up to 6 Poorman’s Buck can be controlled by one Arduino.

This PWM control works within the current level set by the current control pot. So if you lower the current, the same 10% PWM level can be darker, for example.

The source of the PWM control is not limited to microcontrollers. Anything that produce voltage between 0 – around 5V can be used to turn the output on and off. Be creative – use photo resistors, timers, logic ICs… The upper limit of PWM frequency is about 2kHz, but I think 1kHz would be the optimum.

This PWM input can also be used simply as a remote on/off switch. However the LEDs will be on when the switch is open, and off when closed – opposite of usual power switch.

circuit

Assembly is very straight forward. All parts are standard, off-the shelf type.

Parts List

  • 1 or 2x 1 ohm 1W – R10, R11 (use only one to get 350mA, or 500mA (with R2=2.7k) output current)
  • 1x 10 ohm – R8
  • 2x 1k ohm – R3, R9
  • 3x 4.7k ohm – R1, R4, R7
  • 3x 10k ohm – R2, R5, R6 (change R2 to 2.7k ohm to get 1A output current)
  • 1x 10k ohm potentiometer – VR1
  • 1x 22pF/35V – ceramic capacitor C5 (optional)
  • 2x 0.1uF/35V ceramic capacitor – C2, C3 (optional)
  • 1x 2.2uF/10V electrolytic capacitor – C1
  • 1x 100uF / 35V electrolytic capacitor – C4
  • 1x 47-100uH / 1.2A – L1
  • 1x GPN (5551, 2222, 3904, etc.) – Q1
  • 1x GPP (5401, 2907, 3906, etc.) – Q2
  • 1x P-ch MOSFET (NTD2955 or IRFU9024) – Q3
  • 2x 1N4148 diode – D1, D2
  • 1x SB140 or 1N5819 Schottky diode- D3
  • 1x LM393 dual comparator – IC1

* All resistors are 1/8W or 1/4W carbon film unless otherwise noted.

Substitutions
Inductor L1 can be anywhere between 47 to 100 uH, rated at least at 1.2A. C1 can also be anywhere from 1 to 10 uF. C4 can be as small as 22 uF, making sure that it’s rated at least at 35V DC.
Similarly, Q1 and Q2 can be almost any general purpose type transistors. Q3 can be substituted by other P-ch MOSFETs capable of minimum 2A of drain current, drain-source voltage at least 30V, and gate threshold lower than 4V (logic gate).

Assembly
Solder the parts starting with the lowest profile ones, in this case, IC1. All resistors and diodes are installed vertically. Be careful with the orientation of polarized parts, such as diodes, transistors, and MOSFET.

Speed Measurement System

A DIY Gatsometer with infra-red light barriers

The light barrier system described in this article allows accurate measurement of the absolute speed of model cars, planes and other moving objects. In education and training programs, the system forms a perfect contactless speedometer. Over to you to football and golf fans to see who has the meanest ball kick or club swing.

Features
– Speed measurement within range of 0.01 to 999 km/h
– Speed readout in m/s or km/h on 1×16 character dot matrix display
– Elapsed time readout (max. 16.777215 seconds)
– Resolution 1 μs
– Light barrier distance adjustable between 1 and 255 cm
– Optical alignment aid
– Single or continuous measurements
– Powered by 9-V battery
– Current consumption approx. 45 mA.

1

Light barriers systems are around us in more situations than you would expect. Unnoticed, they do their job scanning items at the supermarket checkout, detecting vehicles in parking lots, video tapes in VCRs or persons entering or leaving buildings. Usually, infra-red light is employed because it is invisible to the human eye and ensures a high degree of immunity against interfering light sources.

Whereas simple light barriers operating without modulation, like the slotted light barriers that check if a CD or disk is inserted in the PC, have relatively simple functions, the above mentioned

applications in parking lots, garages and security systems have far more challenging requirements in respect of ‘noise’ immunity. The solution, in nearly all cases, is to employ a 36- kHz carrier. The receivers are then designed to respond only to changes in the frequency. A microcontroller system is then  thrown in to analyse the receiver output signal and evaluate the length of any interruption. This is done to prevent erroneous triggering of an alarm in the case of, say, an insect flying or crawling through the barrier.

As illustrated in Figure 1, speed measurement using a light barrier may be achieved with just one sender and one receiver. A disadvantage of this system is the risk of inconsistent measurement results if the moving object has an irregular shape causing multiple

11interruptions of the light beam. In addition, there’s no assurance that the measured object follows the same, straight path when travelling through the barrier, again causing unreliable results.

Several infra-red detector ICs have been used in many projects published in this magazine over the past few years. One of these, the SFH505 from Siemens, has become a kind of standard component for this function. The SFH505 and a other functionally compatible devices (including IS1U detectors from Sharp) are found in lots of equipment of the ‘consumer electronics’ variety. Although these components are versatile and cost effective, they are less suitable for the project we have in mind, mainly because of the following aspects.

– The output response time to beam interruption is subject to too many time tolerance factors;

– For an acceptable range, the infrared light may not be modulated all the time. Pulses need to be inserted to prevent the control electronics from considerably reducing the receiver sensitivity.

– Because of the required pauses within the modulated signal, reproducible speed measurement is not feasible mainly because beam interruption (by the object) can not be distinguished from a pause (inserted by the system).

Despite the extra hardware, the system proposed in Figure 2 is the better alternative, if only for its much higher accuracy and more reliable measurement results when used to measure the speed of objects passing through the barrier.

To make real-life application of the above system as flexible as possible, the design allows the user to set up the length of the path the object has to travel along in order to interrupt the two light beams. In practice, this is done by placing the first and second barrier at a suitable distance from each other, and ‘informing’ the system about the exact distance before the measurement commences.

Sender and receiver

The Kodenshi Company from Korea have developed two modules (Emitter PIE-310 and Detector PID-310) for light barrier applications. Thanks to their high degree of integration, these modules contain all components necessary for a long-range yet noise immune light barrier system. From the datasheets (in Korean) we were able to distil the following important characteristics:

– IR LED with internal modulation and associated photo detector in a separate, compact case with a lens system.
– Size approx. 17 × 8 × 7 mm
– Range 1 to 8.5 m (3 to 25 ft.)
– Active-low open-collector output
– Control input on sender
– Highly tolerant of ambient light thanks to optical filters and internal modulation.
– Low-cost sensor applications at large distances
– Suitable for use in Reflection mode
– 3-pin wire connection
– Supply requirements 5 V/5 mA (receiver) and 5 V/15 mA (transmitter)
– Switching speed 0.5 ms
– Half-sensitivity angle +/-5 degrees
– operating temperature –10 to +60 ºC

The modules, whose pinouts are given in Figure 3, are intended for use in paper sensors, distance sensors in reflection mode, counter and registration systems or proximity detectors.

The simplicity, relatively low cost and reliability of the circuit to be discussed is mainly due to these ready-made modules from Kodenshi. The module connection cables are available as accessories. They are essential, however, because it is very difficult to solder wires to the device pins.

11

The microcontroller

By virtue of a programmed microcontroller, the circuit is relatively uncluttered. The circuit shown in Figures 3 and 4 consists of two light barriers, a display for the speed readout and system settings, four pushbuttons and, of course, the central microcontroller.

A ‘low power, low price, low pin count microcontroller’ (to use the words of Philips) type 87LPC762 is employed here. This device is based on the well-established 8051 architecture. Here, it is clocked at 6 MHz (1 us cycle time), in view of the calculation load and the high time resolution required by the system.

The main features of the 87LPC762 may be found in the datasheet:

– 2 KBytes ROM
– 128 Bytes RAM
– 32 Bytes user programmable EEPROM
– 2.7 to 6 V supply voltage
– Two 16 Bit Timer/Counter
– Integrated Reset
– Internal RC oscillator for optional use
– 20mA drive capacity at all port pins
– up to 18 I/O pins
– 2 analogue comparators
– I2C interface
– Full duplex UART
– Serial in-circuit programmable

Because there are not enough I/O pins available for direct connection of the pushbuttons and the LCD in 8-bit mode, some pins have been given a double function by clever programming. Pushbutton connections ‘+’ and ‘–’ share a port pin line with the display control lines. For the display control these pins are programmed as push-pull stages, while input-only mode is briefly selected when polling the pushbuttons for activity. Resistors R1 and R2 limit the short-circuit current when a pushbutton is pressed at the same time the display is being controlled.

The light barrier receiver outputs are directly connected to the microcontroller inputs. The internal pull-up resistors are used because the light barrier has an open-collector output.

Circuit and construction

The display is an alphanumeric dot matrix type with one line of 16 characters. This version should be widely available because it represents a kind of industry standard, including the use of the Hitachi HD44780 LCD controller and its command set. The display requires a single supply voltage of +5 V (no additional –5 V!). Important things to watch out for are the pinout and with it the order of the connections (upper left corner), as well as the internal RAM address allocation. Only LCD modules with a multiplex rate of 1/16 have the right address order 00, 01, 02, 03, 04, 05, 06, 07, 40, 41 to 47. Although more information has to be displayed than can be fitted on a single line, a 1-line display is used instead of a 4-line type because the user is prompted to press a button to view the information. The display contrast is adjusted by preset P1. Turn P1 across its full travel if no characters are displayed when the circuit is first started and you are sure that no construction  errors have been made.

As usual the circuit is powered via a 7805 fixed voltage regulator.

With simplicity and cost in mind, the sender and receiver are connected to the processing electronics via a single 9-way sub-D connector. The light barrier wires have to be connected in accordance with Figure 3.

In this application, the sender control inputs are not used — they are either not connected or hardwired to ground.

Practical use

To enable the controller to respond instantly to changes at the light barrier outputs, the measurement routine is interrupt-driven. As a consequence, port pins P1.3 and P1.4 are not constantly polled by the software. Instead, a piece of logic inside the microcontroller is set up to control the time measurement. The advantage of this arrangement is that in addition to instant reaction to events, the software has sufficient spare time for other chores like driving the display and scanning the pushbuttons for activity. This is not possible just like that and using any input pin — P1.3 and P1.4 are ‘specially prepared’ to handle such exacting jobs.

At a falling pulse edge, the internal program halts instantly and jumps to a special routine written to handle the task on hand.

Any speed measurement starts when the first light beam is interrupted. Instantly, the 16-bit counter inside the microcontroller is started at a count rate of 1us. Overflows that occur are added in an 8-bit register, allowing a maximum period of 16.777215 seconds to be measured. The object velocity, v, is then computed by the microcontroller using the simple equation v = d / t using the distance, d, between the barriers and the timer state, t.

Using the default settings, the software assumes a barrier distance of  0.1 m, a readout in m/s and ‘continuous’ as the measurement mode.

To simplify the calculations, the resolution is limited to two decimals, which should be sufficient in most if not all cases. If you require better accuracy, get out your pocket calculator and use the indicated counter value and the light barrier distance. You should, however, always take the 0.5-ms delay of the light barriers into account. Note, however, that this delay is about equal on both receivers so that should not be a problem.

More important than tweaking the numbers behind the decimal point (or comma, in this case) is to make sure that the senders and receivers are correctly aligned and properly secured, while their distance remains easily adjustable for the speed measurement you want to perform.

With the barriers installed, connected up and the software switched on, the software takes over, guiding you through a menu in which various options may be selected.

MODE key

Press this key to step through the four menu items, as follows

TEST – DISTANCE – MODE –

SPEED – TEST

TEST causes the state of the light barrier receivers to be displayed. The message OK means ‘high level measured’ and indicates that the light beam from the sender is being picked up. A Low indicates that the beam is either interrupted or not properly aimed at the receiver. Before any measurement is started, both outputs should flag ‘OK’. After a reset or after the circuit is switched on, this menu always appears first.

It should be noted that a unconnected light barrier receiver will also cause OK to be displayed, simply because of the internal pull-up resistors at the controller inputs. Therefore, as a ‘security check’, make a habit of interrupting the light beam manually while watching the display indication.

Another source of errors is the lobe shape of the light beam, which may reach the other receiver when the barriers are placed at a relatively small distance.

When DISTANCE is displayed, the value to be processed by the microcontroller is entered in centimetres. The default value is 10 cm. As a matter of course, you have to make sure that the displayed value is the real distance between the light barriers.

MODE allows you to select the measurement mode: SINGLE performs just one measurement. When the barriers are triggered again, no new measurement is performed.

CONTINUOUS enables results to be refreshed by any new measurement. The current measured value is always overwritten.

SPEED indicates the measured velocity of the object. Three units are available to choose from: m/s, km/h and seconds. The maximum time is 16.777215 seconds. Exceeding this value causes ERROR to be displayed.

START key

This pushbutton is only read in SINGLE mode. It launches a measurement when neither of the light barriers is interrupted. The display then indicates READY. If a barriers fails to detect a signal, the software jumps to TEST, where the user can see

what’s wrong. Once the problem is solved, another press of the START key causes the SPEED or DISTANCE menu to appear.

+ and – keys

In traditional fashion these two keys are used to select different parameters in the individual menus. In the DISTANCE menu, for example, the keys allow values between 1 cm and 255 cm to be set up.

In the MODE menu, both keys have the same function, changing between SINGLE and CONTINUOUS.

In the SPEED menu, finally, the + and – keys allow you to choose between a readout in m/s, km/h or seconds (the latter for the convenience of pocket calculator users).

Components

Resistors:
R1,R2 = 4kOhm 7
R3 = 10kOhm
R4,R5 = 100kOhm
P1 = 10kOhm preset
Capacitors:
C1 = 10µF 16V
C2-C5 = 100nF
C6,C7 = 15pF
Semiconductors:
IC2 = 7805
IC3 = 87LPC762, programmed, download from Rapidshare password 010206-41
Speed_Measurement_System_Hex_File
Miscellaneous:
K1 = 9-way sub-D socket (female), angled pins, PCB mount
K2 = 14-way SIL pinheader
S1-S4 = pushbutton
S5 = on/off switch
X1 = 6MHz quartz crystal
LCD dot matrix display, 1×16 characters, 44780-compatible
2 combinations of IR-Sender PIE-310 and IR receiver PID-310
4 module connecting cables

l010206 51

Reference

Dot matrix display:
http://www.datamodul.de/displaytechnik/lcd-alpha/bt_11608.htm
http://electronicassembly.de/
http://www.schukat.com (Display Fa. Sharp)
Microcontroller:
www-us.semiconductors.philips.com/ mcu/
Light barrier datasheets:
http://www.kodenshi.com/pdfs/g-1.pdf

Electro032002

NUMERIC WATER-LEVEL INDICATOR

Most water-level indicators for water tanks are based upon the number of LEDs that glow to indicate the corresponding level of water in the container. Here it is present as a digital version of the water-level indicator.

It uses a 7-segment display to show the water level in numeric form from ‘0’ to ‘9.’ The circuit works off 5V regulated power supply. It is built around priority encoder IC 74HC147 (IC1), BCD-to- 7-segment decoder IC CD4511 (IC2), 7-segment display LTS543 (DIS1) and a few discrete components. Due to high input impedance, IC1 senses water in the container from its nine input terminals. The inputs are connected to +5V via 560-kilo-ohm resistors. The ground terminal of the sensor must be kept at the bottom of the container (tank). IC 74HC147 has nine active-low inputs and converts the active input into active- low BCD output. The input L-9 has the highest priority. The outputs of IC1 (A, B, C and D) are fed to IC2 via transistors T1 through T4. This logic inverter is used to convert the active-low  output of IC1 into active-high for IC2. The BCD code received by IC2 is shown on 7-segment display LTS543. Resistors R18 through R24 limit the current through the display. When the tank is empty, all the inputs of IC1 remain high. As a result, its output also remains high, making all the inputs of IC2 low. Display LTS543 at this stage shows ‘0,’ which means the tank is empty. Similarly, when the water level reaches L-1 position, the display shows ‘1,’ and when the water level reaches L-8 position, the display shows ‘8.’ Finally, when the tank is full, all the inputs of IC1 become low and its output goes low to make all the inputs of IC2 high. Display LTS543 now shows ‘9,’ which means the tank is full. Assemble the circuit on a general- purpose PCB and enclose in a box. Mount 7-segment LTS543 on the front panel of the box. For sensors L-1 though L-9 and ground, use corrosion free conductive-metal (stainless-steel) strips.

Reference

Home

Basic Physical Concepts

Atoms

All matter is made up of countless tiny particles whizzing around. These particles are extremely dense; matter is mostly empty space. Matter seems continuous because the particles are so small, and they move incredibly fast.

Each chemical element has its own unique type of particle, known as its atom. Atoms of different elements are always different. The slightest change in an atom can make a tremendous difference in its behavior. You can live by breathing pure oxygen, but you can’t live off of pure nitrogen. Oxygen will cause metal to corrode, but nitrogen will not. Wood will burn furiously in an atmosphere of pure oxygen, but will not even ignite in pure nitrogen. Yet both are gases at room temperature and pressure; both are colorless, both are odorless, and both are just about of equal weight. These substances are so different because oxygen has eight protons, while nitrogen has only seven. There are many other examples in nature where a tiny change in atomic structure makes a major difference in the way a substance behaves.

Protons, Neutrons, and Atomic Numbers

The part of an atom that gives an element its identity is the nucleus. It is made up of two kinds of particles, the proton and the neutron. These are extremely dense. A teaspoonful of either of these particles, packed tightly together, would weigh tons. Protons and neutrons have just about the same mass, but the proton has an electric charge while the neutron does not.

The simplest element, hydrogen, has a nucleus made up of only one proton; there are usually no neutrons. This is the most common element in the universe. Sometimes a nucleus of hydrogen has a neutron or two along with the proton, but this does not occur very often. These “mutant” forms of hydrogen do, nonetheless, play significant roles in atomic physics.

The second most abundant element is helium. Usually, this atom has a nucleus with two protons and two neutrons. Hydrogen is changed into helium inside the sun, and in the process, energy is given off. This makes the sun shine. The process, called fusion, is also responsible for the terrific explosive force of a hydrogen bomb.

Every proton in the universe is just like every other. Neutrons are all alike, too. The number of protons in an element’s nucleus, the atomic number, gives that element its identity. The element with three protons is lithium, a light metal that reacts easily with gases such as oxygen or chlorine. The element with four protons is beryllium, also a metal. In general, as the number of protons in an element’s nucleus increases, the number of neutrons also increases. Elements with high atomic numbers, like lead, are therefore much denser than elements with low atomic numbers, like carbon. Perhaps you’ve compared a lead sinker with a piece of coal of similar size, and noticed this difference.

Isotopes and Atomic Weights

For a given element, such as oxygen, the number of neutrons can vary. But no matter what the number of neutrons, the element keeps its identity, based on the atomic number. Differing numbers of neutrons result in various isotopes for a given element.

Each element has one particular isotope that is most often found in nature. But all elements have numerous isotopes. Changing the number of neutrons in an element’s nucleus results in a difference in the weight, and also a difference in the density, of the element. Thus, hydrogen containing a neutron or two in the nucleus, along with the proton, is called heavy hydrogen.

The atomic weight of an element is approximately equal to the sum of the number of protons and the number of neutrons in the nucleus. Common carbon has an atomic weight of about 12, and is called carbon 12 or C12. But sometimes it has an atomic weight of about 14, and is known as carbon 14 or C14.

Electrons

Surrounding the nucleus of an atom are particles having opposite electric charge from the protons. These are the electrons. Physicists arbitrarily call the electrons’ charge negative, and the protons’ charge positive. An electron has exactly the same charge quantity as a proton, but with opposite polarity. The charge on a single electron or proton is the smallest possible electric charge. All charges, no matter how great, are multiples of this unit charge.

One of the earliest ideas about the atom pictured the electrons embedded in the nucleus, like raisins in a cake. Later, the electrons were seen as orbiting the nucleus, making the atom like a miniature solar system with the electrons as the planets (Fig. 1-1). Still later, this view was modified further. Today, the electrons are seen as so fast-moving, with patterns so complex, that it is not even possible to pinpoint them at any given instant of time. All that can be done is to say that an electron will just as likely be inside a certain sphere as outside. These spheres are known as electron shells. Their centers correspond to the position of the atomic nucleus. The farther away from the nucleus the shell, the more energy the electron has (Fig. 1-2).

Electrons can move rather easily from one atom to another in some materials. In other substances, it is difficult to get electrons to move. But in any case, it is far easier to move electrons than it is to move protons. Electricity almost always results, in some way, from the motion of electrons in a material. Electrons are much lighter than protons or neutrons. In fact, compared to the nucleus of an atom, the electrons weigh practically nothing.

Generally, the number of electrons in an atom is the same as the number of protons. The negative charges therefore exactly cancel out the positive ones, and the atom is electrically neutral. But under some conditions, there can be an excess or shortage of electrons. High levels of radiant energy, extreme heat, or the presence of an electric field (discussed later) can “knock” or “throw” electrons loose from atoms, upsetting the balance.

Ions

If an atom has more or less electrons than protons, that atom acquires an electrical charge. A shortage of electrons results in positive charge; an excess of electrons gives a negative charge. The element’s identity remains the same, no matter how great the excess or shortage of electrons. In the extreme case, all the electrons might be removed from an atom, leaving only the nucleus. However, it would still represent the same element as it would if it had all its electrons. A charged atom is called an ion. When a substance contains many ions, the material is said to be ionized.

A good example of an ionized substance is the atmosphere of the earth at high altitudes. The ultraviolet radiation from the sun, as well as high-speed subatomic particles from space, result in the gases’ atoms being stripped of electrons. The ionized gases tend to be found in layers at certain altitudes. These layers are responsible for long-distance radio communications at some frequencies.

Ionized materials generally conduct electricity well, even if the substance is normally not a good conductor. Ionized air makes it possible for a lightning stroke to take place, for example. The ionization, caused by a powerful electric field, occurs along a jagged, narrow channel. After the lightning flash, the nuclei of the atoms quickly attract stray electrons back, and the air becomes electrically neutral again.

An element might be both an ion and an isotope different from the usual isotope. For example, an atom of carbon might have eight neutrons rather than the usual six, thus being the isotope C14, and it might have been stripped of an electron, giving it a positive unit electric charge and making it an ion.

Compounds

Different elements can join together to share electrons. When this happens, the result is a chemical compound. One of the most common compounds is water, the result of two hydrogen atoms joining with an atom of oxygen. There are literally thousands of different chemical compounds that occur in nature.

A compound is different than a simple mixture of elements. If hydrogen and oxygen are mixed, the result is a colorless, odorless gas, just like either element is a gas separately. A spark, however, will cause the molecules to join together; this will liberate energy in the form of light and heat. Under the right conditions, there will be a violent explosion, because the two elements join eagerly. Water is chemically illustrated in Fig. 1-3.

Compounds often, but not always, appear greatly different from any of the elements that make them up. At room temperature and pressure, both hydrogen and oxygen are gases. But water under the same conditions is a liquid. If it gets a few tens of degrees colder, water turns solid at standard pressure. If it gets hot enough, water becomes a gas, odorless and colorless, just like hydrogen or oxygen.

Another common example of a compound is rust. This forms when iron joins with oxygen. While iron is a dull gray solid and oxygen is a gas, rust is a maroon-red or brownish powder, completely unlike either of the elements from which it is formed.

Molecules

When atoms of elements join together to form a compound, the resulting particles are molecules. Figure 1-3 is an example of a molecule of water, consisting of three atoms put together.

The natural form of an element is also known as its molecule. Oxygen tends to occur in pairs most of the time in the earth’s atmosphere. Thus, an oxygen molecule is sometimes denoted by the symbol O2. The “O” represents oxygen, and the subscript 2 indicates that there are two atoms per molecule. The water molecule is symbolized H2O, because there are two atoms of hydrogen and one atom of oxygen in each molecule.

Sometimes oxygen atoms exist all by themselves; then we denote the molecule simply as O. Sometimes there are three atoms of oxygen grouped together. This is the gas called ozone, which has received much attention lately in environmental news. It is written O3.

All matter, whether solid, liquid, or gas, is made of molecules. These particles are always moving. The speed with which they move depends on the temperature. The hotter the temperature, the more rapidly the molecules move around. In a solid, the molecules are interlocked in a sort of rigid pattern, although they vibrate continuously (Fig. 1-4A). In a liquid, they slither and slide around (Fig. 1-4B). In a gas, they rush all over the place, bumping into each other and into solids and liquids adjacent to the gas (Fig. 1-4C).

Conductors

In some materials, electrons move easily from atom to atom. In others, the electrons move with difficulty.

And in some materials, it is almost impossible to get them to move. An electrical conductor is a substance in which the electrons are mobile.

The best conductor at room temperature is pure elemental silver. Copper and aluminum are also excellent electrical conductors. Iron, steel, and various other metals are fair to good conductors of electricity. In most electrical circuits and systems, copper or aluminum wire is used. (Silver is impractical because of its high cost.)

Some liquids are good electrical conductors. Mercury is one example. Salt water is a fair conductor. Gases or mixtures of gases, such as air, are generally poor conductors of electricity. This is because the atoms or molecules are usually too far apart to allow a free exchange of electrons. But if a gas becomes ionized, it can be a fair conductor of electricity.

Electrons in a conductor do not move in a steady stream, like molecules of water through a garden hose. Instead, they are passed from one atom to another right next to it (Fig. 1-5). This happens to countless atoms all the time. As a result, literally trillions of electrons pass a given point each second in a typical electrical circuit.

Insulators

An insulator prevents electrical currents from flowing, except occasionally in tiny amounts. Most gases are good electrical insulators. Glass, dry wood, paper, and plastics are other examples. Pure water is a good electrical insulator, although it conducts some current with even the slightest impurity. Metal oxides can be good insulators, even though the metal in pure form is a good conductor.

Electrical insulators can be forced to carry current. Ionization can take place; when electrons are stripped away from their atoms, they move more or less freely. Sometimes an insulating material gets charred, or melts down, or gets perforated by a spark. Then its insulating properties are lost, and some electrons flow. An insulating material is sometimes called a dielectric. This term arises from the fact that it keeps electrical charges apart, preventing the flow of electrons that would equalize a charge difference between two places. Excellent insulating materials can be used to advantage in certain electrical components such as capacitors, where it is important that electrons not flow.

Porcelain or glass can be used in electrical systems to keep short circuits from occurring. These devices, called insulators, come in various shapes and sizes for different applications. You can see them on high-voltage utility poles and towers. They hold the wire up without running the risk of a short circuit with the tower or a slow discharge through a wet wooden pole.

Resistors

Some substances, such as carbon, conduct electricity fairly well but not really well. The conductivity can be changed by adding impurities like clay to a carbon paste, or by winding a thin wire into a coil. Electrical components made in this way are called resistors. They are important in electronic circuits because they allow for the control of current flow. The better a resistor conducts, the lower its resistance; the worse it conducts, the higher the resistance.

Electrical resistance is measured in units called ohms. The higher the value in ohms, the greater the resistance, and the more difficult it becomes for current to flow. For wires, the resistance is sometimes specified in terms of ohms per unit length (foot, meter, kilometer, or mile). In an electrical system, it is usually desirable to have as low a resistance, or ohmic value, as possible. This is because resistance converts electrical energy into heat.

Semiconductors

In a semiconductor, electrons flow, but not as well as they do in a conductor. Some semiconductors carry electrons almost as well as good electrical conductors like copper or aluminum; others are almost as bad as insulating materials. Semiconductors are not the same as resistors. In a semiconductor, the material is treated so that it has very special properties.

Semiconductors include certain substances such as silicon, selenium, or gallium, which have been “doped” by the addition of impurities such as indium or antimony. Have you heard of such things as gallium arsenide, metal oxides, or silicon rectifiers? Electrical conduction in these materials is always a result of the motion of electrons. But this can be a quite peculiar movement, and sometimes engineers speak of the movement of holes rather than electrons. A hole is a shortage of an electron—you might think of it as a positive ion—and it moves along in a direction opposite to the flow of electrons (Fig. 1-6).

When most of the charge carriers are electrons, the semiconductor is called N-type, because electrons are negatively charged. When most of the charge carriers are holes, the semiconductor material is known as P-type because holes have a positive electric charge. But P-type material does pass some electrons, and N-type material carries some holes. In a semiconductor, the more abundant type of charge carrier is called the majority carrier. The less abundant kind is known as the minority carrier. Semiconductors are used in diodes, transistors, and integrated circuits. These substances are what make it possible for you to have a computer or a television receiver in a package small enough to hold in your hand.

Current

Whenever there is movement of charge carriers in a substance, there is an electric current. Current is measured in terms of the number of electrons or holes passing a single point in 1 second.

A great many charge carriers go past any given point in 1 second, even if the current is small. In a household electric circuit, a 100-watt light bulb draws a current of about six quintillion (6 followed by 18 zeros) charge carriers per second. Even the smallest bulb carries quadrillions (numbers followed by 15 zeros) of charge carriers every second. It is impractical to speak of a current in terms of charge carriers per second, so it is measured in coulombs per second instead. A coulomb is equal to approximately 6,240,000,000,000,000,000 electrons or holes. A current of 1 coulomb per second is called an ampere, and this is the standard unit of electric current. A 100-watt bulb in your desk lamp draws about 1 ampere of current.

When a current flows through a resistance—and this is always the case because even the best conductors have resistance—heat is generated. Sometimes light and other forms of energy are emitted as well. A light bulb is deliberately designed so that the resistance causes visible light to be generated.

Electric current flows at high speed through any conductor, resistor, or semiconductor. Nevertheless, it is considerably less than the speed of light.

Static Electricity

Charge carriers, particularly electrons, can build up, or become deficient, on things without flowing anywhere. You’ve experienced this when walking on a carpeted floor during the winter, or in a place where the humidity was low. An excess or shortage of electrons is created on and in your body.

You acquire a charge of static electricity. It’s called “static” because it doesn’t go anywhere. You don’t feel this until you touch some metallic object that is connected to earth ground or to some large fixture; but then there is a discharge, accompanied by a spark.

If you were to become much more charged, your hair would stand on end, because every hair would repel every other. Like charges are caused either by an excess or a deficiency of electrons; they repel. The spark might jump an inch, 2 inches, or even 6 inches. Then it would more than startle you; you could get hurt. This doesn’t happen with ordinary carpet and shoes, fortunately. But a device called a Van de Graaff generator, found in physics labs, can cause a spark this large (Fig. 1-7). Be careful when using this device for physics experiments!

In the extreme, lightning occurs between clouds, and between clouds and ground in the earth’s atmosphere. This spark, called a stroke, is a magnified version of the spark you get after shuffling around on a carpet. Until the stroke occurs, there is a static charge in the clouds, between different clouds or parts of a cloud, and the ground. In Fig. 1-8, cloud-to-cloud (A) and cloud-to-ground (B) static buildups are shown. In the case at B, the positive charge in the earth follows along beneath the storm cloud. The current in a lightning stroke is usually several tens of thousands, or hundreds of thousands, of amperes. But it takes place only for a fraction of a second. Still, many coulombs of charge are displaced in a single bolt of lightning.

Electromotive Force

Current can only flow if it gets a “push.” This can be caused by a buildup of static electric charges, as in the case of a lightning stroke. When the charge builds up, with positive polarity (shortage of electrons) in one place and negative polarity (excess of electrons) in another place, a powerful electromotive force (EMF) exists. This force is measured in units called volts.

Ordinary household electricity has an effective voltage of between 110 and 130; usually it is about 117. A car battery has an EMF of 12 to 14 volts. The static charge that you acquire when walking on a carpet with hard-soled shoes is often several thousand volts. Before a discharge of  lightning, millions of volts exist. An EMF of 1 volt, across a resistance of 1 ohm, will cause a current of 1 ampere to flow. This is a classic relationship in electricity, and is stated generally as Ohm’s Law. If the EMF is doubled, the current is doubled. If the resistance is doubled, the current is cut in half. This important law of electrical circuit behavior is covered in detail later.

It is possible to have an EMF without having any current. This is the case just before a lightning strike occurs, and before you touch a metal object after walking on a carpet. It is also true between the two wires of an electric lamp when the switch is turned off. It is true of a dry cell when there is nothing connected to it. There is no current, but a current is possible given a conductive path between the two points. Voltage, or EMF, is sometimes called potential or potential difference for this reason.

Even a huge EMF does not necessarily drive much current through a conductor or resistance. A good example is your body after walking around on the carpet. Although the voltage seems deadly in terms of numbers (thousands), there are not many coulombs of static-electric charge that can accumulate on an object the size of your body. Therefore, in relative terms, not that many electrons flow through your finger when you touch a radiator. This is why you don’t get a severe shock.

If there are plenty of coulombs available, a small voltage, such as 117 volts (or even less) can cause a lethal current. This is why it is dangerous to repair an electrical device with the power on. The power plant will pump an unlimited number of coulombs of charge through your body if you are not careful.

Nonelectrical Energy

In electricity and electronics, there are phenomena that involve other forms of energy besides electrical energy. Visible light is an example. A light bulb converts electricity into radiant energy that you can see. This was one of the major motivations for people like Thomas Edison to work with electricity. Visible light can also be converted into electric current or voltage. A photovoltaic cell does this.

Light bulbs always give off some heat, as well as visible light. Incandescent lamps actually give off more energy as heat than as light. You are certainly acquainted with electric heaters, designed for the purpose of changing electricity into heat energy. This heat is a form of radiant energy called infrared (IR). It is similar to visible light, except that the waves are longer and you can’t see them.

Electricity can be converted into other radiant-energy forms, such as radio waves, ultraviolet (UV), and X rays. This is done by specialized devices such as radio transmitters, sunlamps, and electron tubes. Fast-moving protons, neutrons, electrons, and atomic nuclei are an important form of energy. The energy from these particles is sometimes sufficient to split atoms apart. This effect makes it possible to build an atomic reactor whose energy can be used to generate electricity.

When a conductor moves in a magnetic field, electric current flows in that conductor. In this way, mechanical energy is converted into electricity. This is how an electric generator works. Generators can also work backward. Then you have a motor that changes electricity into useful mechanical energy.

A magnetic field contains energy of a unique kind. The science of magnetism is closely related to electricity. Magnetic phenomena are of great significance in electronics. The oldest and most universal source of magnetism is the geomagnetic field surrounding the earth, caused by alignment of iron atoms in the core of the planet.

A changing magnetic field creates a fluctuating electric field, and a fluctuating electric field produces a changing magnetic field. This phenomenon, called electromagnetism, makes it possible to send wireless signals over long distances. The electric and magnetic fields keep producing one another over and over again through space.

Chemical energy is converted into electricity in dry cells, wet cells, and batteries. Your car battery is an excellent example. The acid reacts with the metal electrodes to generate an electromotive force. When the two poles of the batteries are connected, current results. The chemical reaction continues, keeping the current going for a while. But the battery can only store a certain amount of chemical energy. Then it “runs out of juice,” and the supply of chemical energy must be restored by charging. Some cells and batteries, such as lead-acid car batteries, can be recharged by driving current through them, and others, such as most flashlight and transistor-radio batteries, cannot.

Reference: