Author Archives: Andi

Guiding Basics in Efficient Lighting Design

Discovery of fire and subsequently lighting has contributed hugely to the modern advancements in human life all over the world. However, only a few are aware of proper applications of lighting or that effective lighting also needs planning and design. Most people incorrectly infer lighting design to mean simply selecting lighting equipment for a system. Of course, selecting the most energy-efficient and cost-effective products is important, but they are simply the tools to achieve the design.

In reality, lighting design requires assessing and meeting the needs of the people who will use the space. It also requires skillful balancing between the functional aspects and the aesthetic impact of the lighting system.

That makes lighting both an art and a science. It also implies there cannot be any hard and fast rules for designing lighting systems. Additionally, there will also not be any single ideal solution optimum for all lighting problems. Typically, lighting designers face conflicting requirements and must set priorities before reaching a satisfactory compromise. Assets necessary for successful lighting designers include a proper understanding of basic lighting concepts, extensive experience, careful planning, assessment and analysis.

Lighting mostly involves use of energy. One of the chief concerns is achieving optimum energy efficiency, which means getting maximum lighting quality with minimum consumption of energy. This requires a combination of thoughtful design together with selecting the appropriate lamp, luminaire and control system. Additionally, decisions made must include informed choices of the level of illumination required, the integration and awareness of the space or environment being lit.

Lighting designers must have an intimate knowledge of the human eye and the way it perceives light and color. For example, light falling on an object is partly absorbed and partly reflected by the object. We see the object because of the reflected light entering our eye. The color of the reflected light also determines the perceived color of the object.

A flexible lens within the eye helps to focus the image on the retina and allows clear vision. The retina of the eye has many rods and cones. These convert light into electrical impulses that reach the brain via the optic nerve. The brain interprets the impulses into a proper image. However, illumination levels also change the way the eye perceives an object.

During the day and in normal daylight conditions, the cones in the retina enable us to see details in color. This is photopic or daytime adaption of the eye. As light levels dip, cones become less effective and the more sensitive rods take over. For example, in a well-lit street, the eye sees a mixture of cones and rods to see.

However, rods do not differentiate colors and respond only to different shades of black and white. The overall impression in average lighting is an image with lower color – the mesopic adaption. As light levels fall even further, such as in dim moonlight, the cones cease to function altogether and the eye loses all capability to see in color. This gives completely black and white vision – the scotopic or nighttime adaption.

Latest Touch Display for the Raspberry Pi

Those who were on the lookout for a proper touch display for their single board computer, the Raspberry Pi or RBPi can now rest easy. The official RBPi touch display is on sale at several stores and others will be receiving stock very soon. Users of RBPi models such as Rev 2.1, B+, A+ and Pi 2 can now use the simple embeddable display, instead of having to hook it up to a TV or a monitor. Watch the You-Tube video demonstration for a better understanding.

The new official touch display for the RBPi is a 7” touchscreen LCD. A conversion board interlinks the display module with the LCD and plugs into the RBPi through the display connector. Although the ribbon cable is the same as that used by the camera, the two do not work interchangeably. Therefore, identify the display connector first, before plugging in the ribbon cable from the display.

You can power up the display in one of three ways: using a separate power supply, using a USB link or by using GPIO jumpers. When using a separate power supply, you need a separate USB power supply with a micro-USB connector cable. The power supply must have a rating of at least 500mA and requires plugging in to the display board at PWR IN.

It is also possible to power the RBPi through the display board. For this, use an official RBPi power supply of rating 2A and plug it into the display board at PWR IN. Use another standard micro-USB connector cable from the PWR OUT connector and plug it into the RBPi power in point.

Powering the display from the RBPi GPIO requires using two jumpers – one from the 5V and the other from the GND pins of the GPIO.

After plugging in the ribbon cable and making one of the above power connections between the RBPi and the display, using the display requires updating and upgrading the OS on the RBPi. On rebooting, the OS automatically identifies the new display and starts to use it as its default display rather than the HDMI. To allow the HDMI display to stay on as default, the config.txt file must contain the line:

display_default_lcd=0

For further setup steps, follow these instructions.

The RBPi display comes with an integrated 10-point touchscreen. The driver for the touchscreen is capable of outputting both full multi-touch events and standard mouse events. Therefore, it is capable of working with ‘X’ – the display system of Linux, although X was never designed to work with a touchscreen.

For finger touch operations in cross-platform applications, the Python GUI development system Kivy is a great help. Although designed to work with touchscreen devices on tablets and phones, Kivy works fine with RBPi.

The 7” touchscreen display for the RBPi is of industrial quality from Inelco Hunter and boasts of an RGB display with a resolution of 800×480 at 60fps. It displays images with 24-bit color and a 70-degree viewing angle. The metal backed display has mounting holes for the RBPi and comes with an FT5406 10-point capacitive touchscreen.

The GoPiGo Robot Kit for the Raspberry Pi

Making a robot work with the tiny computer Raspberry Pi or RBPi has never been so easy. If you use the RBPi robot kit GoPiGo, all you will need is a small screwdriver with a Phillips head. The GoPiGo kit comes in a box that contains a battery box for eight or 6 AA batteries, two bags of hardware, two bags of acrylic parts, two motors, the GoPiGo board and a pair of wheels. For assembling all this into a working robot, follow these step-by-step instructions.

You start with the biggest acrylic part in the kit, the body plate or the chassis of the GoPiGo. Lay the plate on the GoPiGo circuit board and align the two holes with those on the circuit board. Place two short hex spacers in the holes below the body plate to make sure of which way is the upper side.

Next, you must attach the motors to the chassis. Use the four acrylic Ts in the kit for attaching two motors. Do not over tighten the bolts while attaching the motors, as this may crack the acrylic.

With the motors in place, it is time to attach the two encoders, one for each motor. These encoders fit on the inside of the motors and poke through the acrylic chassis of the GoPiGo. Encoders are an important part, providing feedback on speed and direction of rotation of the motor. If the encoders will not stay on, use blue ticky tacky to make them stay.

Now it is time to attach the GoPiGo board to the chassis. Place the GoPiGo board on the spacers and line its holes with the holes in the board before holding them together with screws. Two hex supports on the back of the GoPiGo board allow you to attach the castor wheel.

That brings us to attaching the wheels to the GoPiGo. You must do this gently, backing the wheels so they do not touch or rub against the screws. The battery box comes next, to be placed as far back on the chassis as possible. This gives it extra space and prevents the box from hitting the SD card on the RBPi.

This completes the mechanical assembly of the GoPiGo robot and only the RBPi remains to be attached. Locate the black plastic female connector on the GoPiGo and slide the GPIO pins of the RBPi into this connector. The RBPi remains protected by a protected plate or a canopy that has to be attached by screwing it on to the chassis.

Make the electrical connections according to the instructions. Be careful while flashing the GoPiGo hardware and leave the motors unconnected during the flashing. After connecting the GoPiGo for the first time, if you find any motor running backwards, simply reverse its connector.

GoPiGo comes with an ATMega 328 micro-controller, operating on 7-12VDC. SN7544 ICs handle the motor control part, which has two optical encoders using 18 pulse counts per rotation and a wheel diameter of 65 mm. External interfaces include single ports of I2C, Serial, analog and digital/PWM. The idling current consumed is about 3-500 mA, and full load current is 800 mA – 2A with both the motors, the servo and the camera running with the RBPi model B+.

What are Flying Probe Test Systems?

When testing a component or an electronic gadget, it is usual to hold two probes to the test points. Probes are metal prods insulated except for the tips touching the test points on one end and connected by flying leads on the other to an instrument. The instrument could be a voltmeter, an ammeter, an ohmmeter or a combination called the multi-meter. Such an arrangement is good for testing individual components or a printed circuit board. However, in a manufacturing scenario, where boards are produced in hundreds or thousands, humans cannot match the speed and special testing machines are used.

Such testing machines use a set of flying probe test systems for testing, trimming or alignment of components on a printed circuit board or a gadget. Most of these machines are computerized test beds with high speed, unprecedented positioning accuracy and extensive test coverage. They remove the requirement for a bed-of-nails testing fixture and provide a wide variety of test facilities contributing to validation of low-volume production and of the R&D department.

The typical configuration of a flying probe test system consists of four standard moving probes installed diagonally to the board under test. Advanced machines may also have two optional Z-mechanisms for holding another pair of moving probes that can move up and down vertically.

The vertical Z-axis probes enable access to test points that the standard moving probes find difficult to reach. In addition, the Z-axis probes can make proper contact with locations at different heights. With such flexibility, flying probe test systems can directly contact through-holes and heads of connector pins. To prevent slippages and false contacts, the probe tip may be of the dagger or inverse cone head type, all resulting in increased test coverage.

The testing machines are highly accurate measurement systems that include several 4-quadrant sources and measurement systems. Almost invariably, these are embedded with AC programmable generators that can also be used as function generators. Therefore, the testers are capable of applying measuring signals that are best suited to specific electronic components.

The measurement system associated with the flying probes usually features high-resolution ADC/DACs, which help to make precise tests and measure the dynamic characteristics of the circuit.

To enable accurate and repeatable measurements, these testers possess an XY table or stage made of highly polished native granite. Modern flying probe test systems boast of superfast movement of probes with positioning accuracies better than conventional models by at least 25%.

The super-fast movement is the result of using state-of-the-art high power and fast-moving drive motor systems controlled by new control software speeding up the test by 30-50% over conventional models. With the addition of three bottom probe units, combination tests can be performed more efficiently, further cutting down test times.

Modern flying probe test systems come with vision test systems offering simple AOI functions. Detection of missing, wrongly oriented or positioned components is made simple with the use of megapixel color digital cameras, backed by ring illuminations with high-intensity white LEDs. This combination is helpful in reading not only barcodes and 2D codes, but in color identification tests, OCR functioning and modifying contact points as well while debugging testing programs.

What is Vapor Phase Reflow Soldering?

Vapor Phase Reflow Soldering is an advanced soldering technology. This is fast replacing other forms of soldering processes manufacturers presently use for assembling printed circuit boards in high volumes for all sorts of electronic products. Soldering electronic components to printed circuit boards is a complex physical and chemical process requiring high temperatures. With the introduction of lead-free soldering, the process is more stringent, required still higher temperatures and shorter times. All the while, components are becoming smaller, making the process more complicated.

Manufacturers face soldering problems because of many reasons. Main among them is the introduction of lead-free components and the lead-free process of soldering. The other reason is boards often can contain different masses of components. The heat stored by these components during the soldering process varies according to their mass, resulting in uneven heat distribution leading to warping of the printed boards.

With Vapor Phase reflow soldering, the board and components face the lowest possible maximum temperatures necessary for proper soldering. Therefore, there is no overheating of components. The process offers the best wetting of components with solder and the soldering process happens in an inert atmosphere devoid of oxygen – resulting in the highest quality of soldering. The entire process is environment friendly and cost effective.

In the Vapor Phase Reflow Soldering process, the soldering chamber initially contains Galden, an inert liquid, with a boiling point of 230°C. This is same as the process temperature for lead-free Sn-Ag solders. During start up, Galden is heated up to its boiling point, causing a layer of vapor above the liquid surface, displacing the ambient air upwards. As the vapor has a higher molecular weight, it stays just above the liquid surface, ensuring an inert vapor zone.

A printed circuit board and components introduced in this inert vapor zone faces the phase change of the Galden vapor trying to cool back its liquid form. The change of phase from vapor to liquid involves the release of a large amount of thermal energy. As the vapor encompasses the entire PCB and components, there is no difference in temperature even for high-mass parts. Everything inside the vapor is thoroughly heated up to the vapor temperature. This is the biggest advantage of the vapor phase soldering process.

The heat transfer coefficients during condensation of the vapor ranges from 100-400Wm-3K-1. This is nearly 10 times higher than heat transfer coefficients involved in convection or radiation and about 10 times lower than that with contact during liquid soldering processes. The excellent heat transfer rate prevents any excessive or uneven heat transfer and the soldering temperature of the vapor phase reflow process stays at a constant 235°C.

There are several advantages from the Vapor Phase Reflow Soldering process. Soldering inside the vapor zone ensures there can be no overheating. As the vapor completely encompasses the components, there are no cold solders due to uneven heat transfer and shadowing. The inert vapor phase process precludes the use of nitrogen. Controlled heating up of the vapor consumes only one-fifth the usual direct energy consumption, and saves in air-conditioning costs.

As the entire process is a closed one, there is no creation of hazardous gasses such as from burnt flux. Additionally, Galden is a neutral process fluid and environment friendly.

A Raspberry Pi HAT with 16-Channel PWM Servo

DC servo motors are a few of the things that the single board computer, Raspberry Pi or RBPi, finds uncomfortable. The reason being the specific and repetitive timing pulses these motors require for setting their position, which the RBPi is unable to provide in the absence of a real time clock. Although the Linux kernel can do the job, it leaves the RBPi rather over taxed.

A HAT or Hardware Attached on Top board eases the situation. It takes care of all the timing requirements, runs and controls 16 Servos, and is capable of delivering pulse width modulated or PWM signals up to 1.6 KHz using 12-bit precision. Additionally, all this is completely free running that leaves the RBPi to handle everything else.

The 16-Channel 12-bit PWM/Servo HAT from Adafruit can drive 16 servos simultaneously or output PWM signals. It communicates with the RBPi through only two pins using the I2C protocol. Additional RBPi processing overhead is not required for the on-board PWM controller on the HAT board to drive all the 16 channels at a time. Moreover, you can stack more HAT boards – up to 62 of them and control 992 servos – all with only the same two pins.

Adafruit offers a Python library that you can use to immediately set up and run the servos to make your robotic system come to life. When you need to run several servos, this HAT and the Python library to go with it are the simplest and perfect solution.

The HAT board requires two levels of DC voltages. The 3V3 DC comes from the RBPi to power the PWM chip and to decide the logic levels for the PWM signals and the I2C signals. The voltage is available as soon as you plug in the RBPi – shown by the PWR or the red LED on the RBPi.

The other voltage is required for the servos, for which you need to supply 5-6V DC. Usually, most servos will be happy with only 5V, and will work a little more strongly if you give them 6V. You can connect this supply via the DC jack or the blue terminals on the HAT board. A reverse-polarity diode protects the board in case you have the wires connected in reverse. However, do not use both the DC jack and the terminal block at the same time.

Keep in mind that servos need a lot of current from the 6V DC supply. Even if you are using micro servos, they will draw several hundred mA when moving. Larger servos will need more power and you should have provision of about 2A for up to four servos. That means it is not recommended drawing this power from the 5V supply of the RBPi, as it could cause your RBPi to behave erratically. Keeping the servo power supply and the RBPi power supply totally separate gives good results.

On the RBPi, there is a place for soldering a through-hole capacitor. It is a good idea to use one if you are driving many servos. Switching motors generate dips and spikes on the power lines and these can upset the RBPi. A capacitor takes care of the sudden variations – use n*100µF, where n is the number of servos.

A Stamp-Sized Radar Sensor from NXP

Radio waves are used for different purposes other than transmitting audio, video and for communication. One of their primary uses includes detecting the presence of objects in the atmosphere, including aircraft, clouds, and precipitation. This is done mainly through Radio Detection and Ranging or RADAR. By noting the time of flight that a single pulse takes to return after reflection from an atmospheric object, it is possible to estimate the distance of the object.

To detect a target, radar systems generate an electromagnetic pulse, focus it, and transmit it using an antenna. Objects in the path of the transmitted pulse scatter most of its energy. However, some of this scattered energy returns to the radar system and is gathered by the same antenna, which then feeds it into a receiver.

The receiver determines the time taken for the pulse to make a round trip from the radar to the target and back. As the electromagnetic pulse travels at the speed of light, its multiplication with the time of travel gives the total distance travelled by the pulse. Therefore, the actual distance to the target is half this total distance.

Manufacturers feel radar is a versatile gadget for use in automobiles. For instance, it can help the driver estimate the distance between his/her vehicle and other objects in front, sides, or back – promoting safer driving. Following this lead, manufacturers have been shrinking the size of the radar system to make it suitable for use in automobiles.

At present, the smallest radar is the 77GHz radar transceiver from NXP Semiconductors N.V. It is a single chip device, roughly the size of a postage stamp. Consequently, manufacturers can place the chip anywhere in the vehicle. This is a very big advantage to vehicle designers, as they are targeting driverless, fully automated driving in the near future, and need increasing numbers of sensors within the vehicle. In fact, Google engineers are already field testing working prototypes of the NXP device for their self-driving cars project.

The reference design from NXP is a 35×35 mm printed circuit board and it has a radar front-end, two MCUs for signal processing, and supporting components. Designers can use this in their self-driving cars, in the form of a cocoon comprising 10-20 tiny radar sensors all around the vehicle to provide a high-resolution, 360-degree view of the environment around it.

ADAS or Advanced Driver Assistance Systems also use radar as their core technology, using it to make driving easier and safer. For instance, they use it for adaptive cruise control, lane change assist warnings, forward collision warnings, blind spot monitoring, emergency braking, and automated braking. According to IHS Research, the market for radar-based ADAS will grow by 23 percent year-on-year, increasing from the current year to more than 50 million radar sensors.

Although alternate technologies presently exist for avoiding collisions, mostly in the form of laser-light and ultrasonics based systems, the 77GHz radar offers a superior performance under adverse conditions such as road grime, fog, and rain. So far, bulky hardware had made it difficult to use radars in vehicles, but not anymore.

How Do You Read Resistor Values?

Resistors range from huge multi-watt giants to sub-miniature surface mount devices (SMDs) and parts with different types of leads in between. The larger varieties do not pose much of a problem as they usually have a big-enough surface for printing the value of the resistance, its tolerance, and other necessary specifications. For smaller sizes, codes are generally used for letting the user know the details of the resistor.

Two common methods are under use for identifying resistors – color coding for resistors with leads and number coding for SMD resistors. Color coding is an easy way to convey a lot of information concisely and effectively. One of the advantages is that specifications of the resistor are visible irrespective of its orientation on the PCB – very useful for overcrowded boards. As SMD resistors have only limited surfaces, number coding is more suitable.

Color coding for resistors

Resistors with color coding come with one of two standard codes – the 4-band code or the 5-band code. The 4-band coding is used more with resistors of low precision with 5, 10, and 20% tolerances. Higher precision resistors with tolerances of 1% and lower are marked with 5-band color codes.

The colors used have their own values. For example, Black represents zero, Brown represents one, Red represents two, Orange represents three, Yellow represents four, Green represents five, Blue represents six, Violet represents seven, Gray represents eight, White represents nine, Gold represents 0.1, and Silver represents 0.01.

For tolerances, Gray represents ±0.05%, Violet represents ±0.1%, Blue represents ±0.25%, Green represents ±0.5%, Brown represents ±1%, Red represents ±2%, Gold represents ±5%, Silver represents ±10%, while an absence of color represents ±20%.

The 4-Band color coding scheme

The 4-band color coding has thee color bands crowded on one side with the fourth band separated from the others. One has to read the code from the left to right beginning with the crowded colors on the left and the separated color band on the extreme right. Starting from the left, the first two color bands represent the most significant digits of the resistance value, while the third band represents the multiplier digit. The isolated fourth band is the tolerance band. As an example, a resistor of 4.7KΩ, 5% value will have the colors bands Yellow, Violet, and Red representing 4700Ω, with a fourth band of Golden color. In cases where there are only three color bands, it means the resistor has a ±20% tolerance.

The 5-band color coding scheme

High quality, high precision resistors with tolerances of 2%, 1% or lower are represented by five color bands, with the first three denoting the three most significant digits of the resistance value. The fourth band represents the multiplier value, while the fifth stripe gives the tolerance. Some resistors have an additional sixth band denoting the reliability or the temperature coefficient.

Number coding for SMD resistors

SMD resistors usually have three or four numbers on them, depending on whether they are of 5% or 1% tolerance. The last number is the multiplier with the others representing the most significant digits of the resistance value. In some cases, an alphabet is used, representing the resistor’s tolerance. However, if the alphabet is an R, it represents a decimal at its position. For more details, refer to this web site.

How Gray Are The Gray Codes?

Many data acquisition systems and rotary encoders use the Gray Codes for their operation. As only one bit changes state while the numbers progress, read errors from timing and mechanical issues are minimized. Initially, use of Gray Codes was limited to specific applications, but now this versatile coding scheme is extensively used in Karnaugh maps, error detection systems, and in rotary and optical encoders.

In general, a Gray Code represents numbers using the binary encoding scheme and it groups a sequence of bits such that only one bit in the group changes from the number before and after it. Frank Gray, a researcher from Bell Labs, described the code in his 1947 patent, where he called it the Binary Reflected Code. After the patent was granted in 1953, the encoding system was referred to as the Gray Code.

Being an un-weighted code, the columns of bits in the Gray Code do not imply any base weight in contrast to the Binary number system. For instance, in the Binary number system, the right most column holds the most significant bit and carries a weight of 20=1; the second column has the weight of 21=2; the third 22=4, and so on. That means each column represents a base (2 in Binary) raised to a power, with the final value calculated by multiplying the bit by the weight of its column and adding the results of the columns.

Although columns in the Gray Code are also positional, they are not weighted, as the Gray Code is a numeric representation of a cyclic encoding scheme. The code rolls over and repeats, therefore, it is unsuitable for mathematical operations. To be used in displays or in mathematical computations, Gray Code sequences need to be converted to Binary or Binary Coded Decimal (BCD).

Gray Codes are a member of unit-distant, minimal-change codes. That means only a single bit of the sequence changes with the progress of the number count. Therefore, Gray Codes are more flexible during synchronization and misalignment as they limit the maximum read error to one unit. This property makes them useful in error detection schemes as well. Communication systems use Gray Codes in preference to parity check, as detection of unexpected changes in data is better with Gray Codes. If you sum up the bits in a number, the sum of the next number will change only by one, with the sum alternating even and odd.

Rapidly changing values can lead to errors due to interfacing or hardware constraints. This is where the Gray Code is most useful, as only a single bit quantifies the change. That is also the reason most mechanical rotary and optical encoders offer Gray Code outputs. However, Gray Codes have progressed farther than the encoding mask that Frank Gray documented in his patent.

For example, aircrafts use mechanical altimeters where the encoding disk is synchronized to the dials, producing a sort of Gray Code output known as the Gillham Code. The specialized code offers a single-bit change for each increment of 100 feet – allowing an easy tracking of the altitude.

Make Your Raspberry Pi Follow Walls

The versatile single board computer, the Raspberry Pi or RBPi, makes an excellent base for an autonomous bot using a rover 5 platform. The bot uses custom laser range finders for basic wall following. It features speed control of each track, regulated by PID using feedback from its quadrature encoders, giving it the ability of directional control. The basic features are explained below.

Batteries power the bot, feeding two separate switching mode regulators. One supplies power to the motors via the H-bridge, while the other powers the RBPi and other electronic devices. The H-bridge and the SMPS reside on the lower layer of the bot, while the sensors and the RBPi are on the upper layer. Mechanical standoffs separate the two layers, and the physical separation between the two layers creates a barrier for the electromagnetic fields from the power system that would otherwise affect the compass.

A Pixy CMUCam and a line laser form the laser range finding system of the bot. A simple piece of PVC pipe with slots cut into it breaks up the beam from the line laser. That allows the cam to recognize the color of the laser blobs as it reports this data via I2C to the RBPi, which then uses simple trigonometry for converting the data into vectors representing range and angles.

A sonar device mounted on the front of the bot implements a fairly simple crash prevention mechanism. The laser range finding system may also be used for a more sophisticated crash prevention system. Even though the bot is meant for autonomous operation, it also has a basic user interface built-in to allow control for testing purposes. The interface allows simple operations such as setting the heading and limiting the forward and backward speeds. It uses some feedback from the current heading of the robot.

For testing the laser range finding, the bot has a built-in GMR or graphical mapping representation, but in a minimal configuration. Using the GMR reveals a basic difference between the mapping from the sonar device and that from the laser range finder. For example, the sonar data interprets long flat surfaces as convex, but the data from the laser shows them to be perfectly straight – implying the laser range finding is linear.

A custom mount holds both webcams and the laser line. As the cases of the webcams made it difficult to mount them, they had to be removed from their casings. One of the cams faces 25-degrees to the left, while the other faces 25-degrees to the right. That gives a 100-degree field of view to the bot. Both the cams are tilted upwards such that the bottom-line of their images is just below the horizontal.

The software processes the images and locates the laser line to calculate ranges. It makes 30 vertical scans from the top of the image looking for the laser line. Looking specifically for a laser line makes it simpler as the line is never vertical. Therefore, every point located on the line has a neighboring point.