Author Archives: Andi

How do Sensors Measure Angle?

An angle is the degree of rotation of an object from a reference position about a central axis. In the engineering world, there are two types of angles requiring measurement. One is the physical or mechanical characteristic, such as the rotation of a shaft with respect to its bearing or housing. The other is a mathematical term such as the angle between two phases of alternating voltage system. Usually, sensors measure angles in a format that a computer or a machine can understand, interpret and utilize.

It is also a common practice to convert a physical characteristic into a rotational mechanical movement to measure linear displacement. For example, the distance traveled by a shaft can be translated into rotational movement by a rack and pinion arrangement. The angular position sensor attached to the arrangement then interprets the angular movement in proportion to the linear movement of the shaft.

In the market, you will find different sizes and forms of angle positioning sensors using various technologies. Generally speaking, these sensors are versatile and one can use them in all kinds of applications, such as in agriculture, commercial equipment, off-road vehicles and in automotive industries. Most of the applications above require a product suitable for operating in harsh environments, including moisture, dirt, dust, extreme temperatures and more.

For example, Forklift Position sensors measure the angle of the forks on a forklift truck. According to OSHA, one of the primary causes for tip-over accidents on forklifts is excessive speed when the machine is turning or rounding a corner. The angle position sensor on the truck helps it to remain within a safe speed and prevents overturning. This particular application also prevents accidents from unbalanced loads and limits the operation of the machine when the load is improperly positioned or balanced.

The simplest form of measuring angle is by using the gear tooth sensor. By sensing the teeth to count the rotation of a gear or wheel, engineers monitor and limit speed. Another common form of angular position measurement utilizes potentiometers. Other more sensitive and rugged types of angle sensors use optical or magnetic technology.

Traditional rotary encoders use an LED transmitter, a coded disc and a photo sensor to detect angular movement. The disc is coded with opaque and transparent sections, which transmit light in a specific manner to the photo sensors depending on the position of the disc. The photo sensor converts the light falling on to it into an electrical code. This allows the encoder to detect rotation, position, angle, etc.

Sensors that are more rugged use the Hall-Effect technology for measuring angle. This technology uses magnetic field sensing and does not require the critical positioning necessary for the components using optical methods. In both methods, accuracy of an angle sensor depends largely on its resolution. The higher the resolution, the more precise is the detection of angular movement. Sensors measuring angles using Hall-Effect technology can perform without physical contact, thereby remaining unaffected by vibration and abrupt movements. These sensors also have the added benefits of virtually unlimited lifespan.

A Bike Computer that Deters Theft

Cars already have theft alarms that create a racket when someone tries to tinker with or steal them. So far, there have not been many bike alarms, but now Wi-MM offers one that can notify users if anyone tries to pinch their bicycle. The Bike+ BPU-100 from Wi-MM is a bicycle computer that runs embedded Linux.

As bicycles are easy targets for thieves, people with top-of-the-line bikes think twice when riding in areas that have high theft rates. However, the Bike+ BPU-100 will notify users if their bike is stolen by sounding an alarm and helping track it down via GPS. The device links to cloud services via its onboard 3G cellular modem. Additional capabilities include real-time location and mapping, route tracking, synchronizing to a smartphone via Bluetooth, apart from fleet management features.

To determine whether a bike has been moved and stolen, the Bike+ uses the combination of a cloud-based service, a 3G cellular modem and an accelerometer. Depending on the GPS and 3G signals, the user receives continuous updates about the present position of his or her bike. When moved or stolen, an alarm goes off and the owner receives a text message. The owner can then track the movement of the bike over a smartphone. The user can affix Bike+ securely to the frame of the bike to prevent it from removal.

Although the protection device does not have a screen, it can link to a nearby iOS or Android smartphone via Bluetooth. On this, the bike computer offers real-time location and mapping features. Apart from ride tracking functionality, the user can make use of several performance analytics including distance traveled, time and speed over the web interface.

The accelerometer on the Bike+ also helps in detecting the occurrence of a crash. If the bike crashes, Bike+ can send automatic alerts to selected contacts. For tracking multiple riders, messenger operators can make use of the Fleet Management Dashboard. This helps in bike sharing.

Among the various features including the anti-theft alarm and buzzer, the Bike+ boasts of a high-performance GPS receiver and a 3G cellular modem. This links to a smartphone via Bluetooth, providing in-ride experience such as real-time ride information, accessible on the web browser. Bike sharing operators can use the fleet management dashboard of the device. In case of a crash, the Bike+ can detect and send alert notifications.

The method of working of the Bike+ is very simple. The user can get on his/her bike without concern. The device immediately detects motion and starts to collect ride statistics, while the rider focuses on the journey. In case of an emergency such as a crash, the device will notify the riders loved ones.

Bike+ uploads all ride information to the cloud automatically. Therefore, the rider has a chance to monitor his/her progress and keep track of their goals at any time. On parking the bicycle, the user can rest assured that the Bike+ will watch over the bike to detect if it is being stolen. It then generated an alarm, while the user can locate the present position of the bicycle on the web.

The Ultimate GPS HAT for the Raspberry Pi

If your smartphone is lost or misplaced, you can trace it using its GPS or Global Positioning System receiver. The US Department of Defense has placed 24 satellites into the Earth’s orbit making it a satellite based navigation system. Although GPS was conceived originally for military applications, in the 1980s, the government allowed the civilians to use the system as well. GPS works without any subscription fees or setup charges for 24 hours a day, covering the entire world in any weather condition.

Circling the earth twice a day in very precise orbits, the GPS satellites transmit signal information to the earth. GPS receivers calculate their exact location by receiving and tri-lateraling this signal information. GPS receivers compare the time the signal was transmitted from the satellite with the time of its reception. The difference tells the GPS receiver its distance from the satellite.

After computing the distance measurements from at least two more satellites, the receiver determines its 2-D position and displays it on the electronic map of the unit. That allows it to know its latitude and longitude and to track its movement. If the receiver is able to contact four or more satellites, it can determine its 3-D position – latitude, longitude and altitude. With this information, the GPS unit of the receiver can compute other information such as speed, track, bearing, trip distance, sunrise and sunset time, distance to destination and much more.

The popular single board computer, the RBPi or Raspberry Pi, does not have a GPS receiver built-in. However, you can add a GPS unit to the SBC by plugging in a new HAT from Adafruit. This Hardware Attached on Top board conforms to standard specifications, enabling the board to be identified by the RBPi. Once identified, the SBC configures its GPIO ports and its drivers to suit the attached HAT.

The new HAT has an Ultimate GPS on it and enables the RBPi to know its exact position and time. It fits the RBPi Models A+ or B+. If you slip in a coin cell in the holder provided, it will power its RTC, and the RBPi will keep precise time. As the GPS unit does not take up much space, the HAT has plenty of prototyping area for adding sensors, LEDs and much more.

It must be noted that the GPS HAT uses the hardware UART of the RBPi. Once you are using this HAT, you will be unable to use the Rx/Tx pins of the RBPi for any other purpose. If you plan to use the GPS HAT along with a console, you will have to change the application and use a composite or HDMI monitor and log in with a keyboard. Of course, you can still use ssh to connect to your RBPi over the network.

Adafruit has very informative tutorials for using this HAT. They offer the HAT in a fully assembled condition, with the GPS unit already soldered in along with an unsoldered 2×20 header for sitting on the RBPi GPIO. Once you have soldered in the header, you are all set to connect the GPS HAT on your RBPi. The coin battery is not included in the kit.

The Raspberry Pi Piano HAT

Not only musicians, but children also like to play on pianos. A real piano takes up too much space and is an expensive acquisition, but electronic pianos are affordable and their small size offers a great opportunity for music aficionados to practice at their leisure. Creating a piano with a Raspberry Pi or RBPi, the versatile single board computer, enables the designer to learn to program a computer as well as distinguish nuances in music.

That inspired the 14-year old Zachary Igielman to design PiPiano, and the Piano HAT is based on Zachary’s PiPiano. Where PiPiano is an add-on for the RBPI, the Piano HAT is a full-fledged Hardware Attached on Top board specifically designed for the RBPi.

Hardware Attached on Top or HAT boards sit on the RBPi models B+, conforming to a specific set of rules. HAT boards include a system to allow the RBPi to identify it. Based on the identification, the RBPi automatically configures its GPIO pins and drivers to suit the HAT board.

You can use the Piano HAT with RBPi models 2, B+ and A+. The kit comes in a fully assembled state and has a trove of software examples so that you can start playing music with it immediately as soon as you plug it in. The Piano HAT is completely touch-sensitive and you can use it to play music and generate software synthesizers using Python, control hardware synthesizers or simply be creative.

The Piano HAT kit comes with 16 touch-sensitive buttons, a full octave of 13 piano touch keys, buttons to shift the octave up or down, an instrument cycle button and 16 LEDs. You can let the program play and light up the LEDs auto-magically, or control them with Python.

You can use Python to program the 16 touch-sensitive buttons individually on the Piano HAT. Hook up the buttons to any of your projects and use them as you like. Two dedicated buttons are available to allow you to shift the music scale up or down an octave, offering a chance of expanding your playing horizons.

Using a little Python glue, it is possible to send a patch change event from your RBPi to a synthesizer such as the Yoshimi – the Instrument cycle button allows this. With the 16 LEDs available, you can light up the keys, making the Piano HAT a learn-to-play keyboard. With Python, you can use the LEDs as a visual metronome or allow your child to walk through his or her favorite tune.

The Piano HAT and RBPi combination, with some Python programming thrown in, allows creation of Piano-controlled contraptions. This includes a variety of synthesizers, both hardware and software types. MIDI examples included in the kit let you play music with synthesizers such as the Yoshini, Sunvox and others. The kit also includes a PyGame example that can generate a few octaves of great piano and includes drums as well.

Python on your RBPi allows your Piano HAT to output regular MIDI commands, with which you can use your MIDI adapter over USB to take control of your hardware synthesizer gear.

How do you select a Tactile Switch?

We find tactile switches almost everywhere – on keyboards, on mice, beside the monitor, on TV sets, on set-top boxes, on toys and on mobile phones. These tiny switches give a distinctive feeling when pressed. We are so used to using tactile switches; we press them a dozen times a day and never think twice about them – that is, as long as they work. However, tactile switches can also stop working, and engineers must select tactile switches with great care so they last long. After all, most feel that a bad or nonfunctioning switch equals a bad device.

Therefore, to avoid the possibility of a quality black eye, you must essentially select the right switch. Deciding what it is that exactly makes a tactile switch right of the job, may depend on a host of factors, of which two are most important. One is the actuation force and deflection characteristics necessary to meet the requirements of the application. The other is the reliability with which the switch must work during the life of the host electronic gadget.

Thinking of switches as commodity items selected straight off a datasheet, is an expensive mistake that many engineers do make. In reality, picking a durable switch with the right feel does require somewhat more than a mere glance at its specifications. Here is what you should be looking for.

Click ratio

The click ratio of a switch expresses the relationship of its actuation and contact forces. A higher click ratio is indicative of a snappier or crisper switch feel. The deflection or travel distance of a pressed switch also contributes to its overall feel.

A typical datasheet holds the force and travel specifications and these can be a starting point for selecting a switch that feels just right in its intended application. However, the ideal switch depends on the application – an important thing to remember.

For example, users of portable consumer electronic devices prefer crisp tactile switches that have a relatively high click ratio and shorter travel distances. On the other hand, tactile switches for the automotive industry need lower click ratios and longer travel distances. This prevents accidental actuation while driving. Therefore, each electronic application needs to reach a unique balance between the travel distance and the actuation forces.

Sealing

Consumer electronics and medical applications need tactile switches that are protected against ingress of liquids and other contaminants – IP 67. Usually, these sealed tactile switches reach their maximum lifecycle, because of the sealing.

Manufacturers have traditionally used a bonded silicone membrane to seal the innards of a tactile switch. Now, technologically improved IP67 rated tactile switches use a patented laser welding process that seals the switch with a thin nylon film. This goes over the actuator rather than under it, giving a better seal. The seal not only preserves the crisp feel, but also protects the switch against side loads.

Reliability

Protecting the switch with the nylon film improves its inherent reliability by not allowing ingress of contaminants. The best switches will typically offer a life expectancy of above one million press-and-release cycles.

How do AC Current Sensors Work?

You can sense current using a series resistor and measuring the voltage drop across it. According to Ohm’s law, the current through the resistor is then the voltage drop divided by the resistance value. That makes the voltage drop proportional to the value of the resistance and the current flowing through it. The disadvantage is obvious – to prevent the voltage drop from affecting the circuit parameters, one needs a very low value resistor when the current involved is high. Additionally, as the current reduces, so does the voltage drop. That involves amplification of the voltage drop, creating additional circuit complexity.

Ideally, current sensors should not use any power when detecting the current in the circuit. However, real current sensors do require a part of the energy from the circuit for providing the information. For sensing AC currents, current sense transformers are typically useful. A single wire from the circuit acts as the primary of the transformer or the primary may be a single turn winding on the transformer.

The AC current sense transformer develops a current in the secondary, proportional to the sensed primary current. The secondary current is allowed to flow through the terminating resistor to produce an output voltage. As the turns ratio of the transformer decides the secondary current, a low turns ratio (pri/sec << 1) minimizes the current through the terminating resistor. A balance of the transformer ratio and low-enough current through the terminating resistor ensures adequate output voltage. You select the appropriate AC current sensor based on the frequency range and current rating of the sensor for the conditions of your application. The highest flux density to prevent saturation of the sensor core will then depend on the worst-case current and frequency conditions in the circuit. The requirement is to generate a voltage output from the sensor that will vary linearly with the current being sensed. If the core saturates, the output becomes non-linear, and the output voltage is no longer strictly a representative of the input current. Sensors come in surface mount or through hole types, with different turns ration and overall dimensions. As noted earlier, you can have a sensor only type, which has a conductor integral to the application serving as the primary. The other is a current transformer type, where the primary is an included winding. Current transformer manufacturers offer online selection tools for selecting the right current sensor for the specific application. Initially, the user selects either an SMT sensor or a leaded type of sensor. The tool then requires the user to input the maximum sensed current expected, the input frequency, the duty cycle of the primary current waveform and the desired output voltage. The output voltage being the desired output voltage for the maximum input current the user expects. Based on the maximum input current, the number of secondary turns and the output voltage necessary, the tool suggests the required terminating resistor value. For this calculation, the tool assumes a single-turn primary. The tool also provides the maximum flux density based on the above parameters and the maximum operating frequency, making sure the value does not exceed 2K Gauss to ensure linearity.

Different Types of E-Bike Motors

The major difference between electric bikes is the various types of drive systems they use. These include shaft drives, mid-drives, geared and gearless hubs. In addition, there are differences between the motors, chiefly brushed and brushless. Therefore, if you are looking for an e-bike for a specific use, this article will help you to understand and focus on finding the right one.

The shaft drive

This system works more like the arrangement in an automobile, with the motor positioned more towards the center of the bike and driving the rear wheel with a shaft. These are not popular nowadays, because of the customized frames required to support the motor and shaft. The entire arrangement is awkward and difficult to service.

A mid-drive motor

Mid-drive motor systems are used in e-bikes meant for climbing. You will find this design close to the bottom bracket, at the point near the pedals. The system drives the chain forward rather than the wheel, benefitting from mechanical drivetrain systems such as use of gears for going fast or for climbing. Therefore, when approaching a hill, the rider can shift to a lower gear, making it easier to pedal and climb.

The geared hub motor

There are two types of hub motors – geared and gearless. The geared hub motor provides mechanical advantage with smaller and lightweight motors. However, they also produce more friction and hence more noise and wear out faster. A built-in flywheel mechanism unlatches the shaft from the axle while the rider is coasting, preventing addition of any resistance.

The gearless hub motor

The simplicity of the gearless hub motor delivers smooth and quiet performance, much eulogized by shops selling e-bikes. These motors rely greatly on electromagnets and most do not even include a freewheel mechanism. That may be due to the extremely low magnetic resistance to be overcome when the electromagnets are powered off. Usually, such motors are also called direct drive systems, enabling regeneration of electricity from repelling magnets within the motor.

Gearless hub motors are generally larger than other types, because they need to accommodate magnets, ultimately making them weigh more. However, improvements in technology are helping to produce small and lightweight direct drive hub motors nowadays.

Hub motors usually operate even when the rider is not pedaling. Whether geared or gearless, the system can fit in the rear or the front wheel. However, with increased unsprung weight, hub motors can experience reduced traction, limited efficiency and strain the spokes and rims of the wheel.

The drive system you select will affect the overall weight and weight-distribution of your electric bike. The cost will depend on whether you need a customized frame, regeneration and special sensors for shifting gears. Motorized e-bikes provide improved efficiency, help in riding fast, in climbing and in navigating bumps. For lightweight around-the-town transportation, geared hub motors are fine. If you like quieter rides with more power and regenerative braking, go for direct drive hub motors. However, if you ride your bike more in the mountains and do lots of hill climbing, you definitely need mid drive motors.

Extracting Precious Metals from Discarded Electronics

Scientists at the University of York have worked out an innovative technology to recover precious metals like gold, silver and others from electronic gadgets that users have disposed. The technique involves the use of a gel to draw the metals from the waste and change them into nanoparticles that are conducting in nature. Eventually, these are transformed to make up a hybrid nanomaterial, which can be adapted for use in various new electronic applications.

Many of the electronic gadgets that are thrust aside by users when they are not suitable for usage contain small amounts of gold, silver and several other expensive metals. Though these metals are present in minute quantities in each of the devices, the abundance of electronics cast off every year makes for a significant amount that can be collected by efficient extraction techniques.

Self-assembling gels derived from simple sugars

Professor David Smith of the university teamed up with a PhD student Babatunde Okesola to derive a gel from sorbitol, a type of sugar alcohol that is popular as a low calorie sweetener in food and pharmaceutical industries. Being hygroscopic or water absorbing nature, sorbitol finds use in certain other applications, too. Hydrogenation of glucose can produce sorbitol commercially, as it is present in several fruits.

Sindhu Suravaram and Dr. Alison Parker of the Department of Chemistry assisted in the research, the results of which they published in Angewandte Chemie.

Selective removal

Sorbitol’s hygroscopic property allows it to form a gel easily on contact with the water vapor in the atmospheric air. The gel structure allows the precious metals to adhere to the surface so that they can be removed with ease. Furthermore, the stable nature and anti crystallizing properties of the gel makes it an ideal material for extracting the metals. The scientists found that the sorbitol-based gel could draw out these elements from intricate structures deep within the gadgets. Amazingly enough, the researchers found that the gel appeared to have an affinity for these metals, which allowed for the extraction of these valuable elements from among various other substances. This selective separation makes the extraction process cost effective.

Additional benefits

The researchers discovered that apart from recovering the precious metals from the electronic devices, the Nano fibers within the gel convert the metals into nanoparticles over a period. These minute particles implanted within the gel make it electrically conducting.

Okesola explains that since gels add in the properties of both liquids and solids, they can be used to bridge the gap between hard word of electronics and the soft world of biology. This interface could be exploited in future electronics and other technologies. In fact, the researchers are currently working on techniques to produce renewable energy from bacteria using the conducting gel nanoparticles.

The researchers also hope to utilize these conducting sorbitol gels in more ambitious projects involving the integration of biological organisms and electronics through the concept of cybernetics. One can loosely define cybernetics as the science of communication and control between animal and machine worlds. Cybernetics can throw light on various puzzling facts in nature.

What are Wearable PCBs Made of?

The Internet of Things market is growing at a tremendous speed. Among them, wearables represent a sizeable portion. However, there are no standards governing the small size PCBs or Printed Circuit Boards for these wearables. The unique challenges emerging in these areas require newer board level development and manufacturing experiences. Of these, three areas demand specific attention – surface material of the boards, RF or microwave design and RF transmission lines.

Surface material of the boards

PCB materials are typically composed of laminates. These can be made of FR4, which is actually fiber-reinforced epoxy, of polyamide, Rogers’s materials of laminates, with pre-preg as the insulation between different layers.

It is usual for wearables to demand a high degree of reliability. Although FR4 is the most cost-effective material for fabricating PCBs, reliability is one issue the PCB designer must confront when going for a more expensive or advanced material.

For example, with applications requiring high-speed and high frequency operation, FR4 may not be the best answer. While FR4 has a Dk or dielectric constant of 4.5, the more advanced Rogers series materials can have a Dk of 3.55-3.66. The designer may opt for a stack of multilayer board with FR4 material making up the inner cores and Rogers material on the outer periphery.

You can think of the Dk of a laminate as the capacitance between a pair of conductors on the laminate, as against the same pair of conductors in a vacuum. Since there must be very little loss at high frequencies, the lower Dk of 3.66 for a Rogers’s material is more desirable for high frequency circuits, when compared to FR4, which has a Dk of 4.5.

Typical wearable devices have a layer count between four and eight. With eight layer PCBs, the layer structuring offers enough ground and power planes to sandwich the routing layers. That reduces the ripple effect in crosstalk to a minimum, while significantly lowering the EMI or electromagnetic interference. For RF subsystems, the solid ground plane is necessarily placed right next to the power distribution layer. This arrangement reduces crosstalk and system noise generation to a minimum.

Issues related to fabrication

Tighter impedance control is an important factor for wearable PCBs. This results in cleaner signal propagation. With today’s high frequency, high-speed circuitry, the older standard of +/-10% tolerance no longer holds good and signal-carrying traces are now built to tolerances of +/-7%, +/-5% or even lower. This influences the fabrication of wearable PCBs negatively, as only a limited number of fabrication shops can build such PCBs.

High-frequency material such as Rogers require to have a +/-2% of Dk tolerance and +/-1% is also a common figure. In contrast, for FR4 laminates it is customary to have Dk tolerances of +/-10%. Therefore, Rogers’s material presents far lower insertion losses when compared to FR4 laminates.
In most cases, low cost is an essential factor. Although Rogers’s material offers low-losses with high-frequency performance at reasonable costs, commercial applications commonly use hybrid PCBs with FR4 layers sandwiched between Rogers’s material. For RF/microwave circuits, designers tend to favor the Rogers’s material over FR4 laminates, because of their better high-frequency performance.

What Are IP Markings and IP Ratings?

With so many IP ratings, it is easy to be confused about their actual meaning. However, published by IEC or the International Electro technical Commission, their standard 60529 details all the ratings. IP ratings are also known as Ingress Protection Ratings or International Protection markings. They classify and rate the degree of protection that mechanical casings and electrical enclosures offer against dust, water, accidental contact and intrusion by body parts such as hands and fingers.

Typically, IP ratings indicate the protection level offered by the enclosure of a device. Two or three numbers in the rating indicate the protection level. Within the IP marking, the number in the first position indicates protection from solid objects or materials. The number in the second position indicates protection from liquids, including water. The number in the third position indicates protection from mechanical impacts. However, the third number is commonly omitted as not being a part of IEC 60529. For example, IP65 denotes protection from solid objects to the level of 6 and from liquids to the level of 5. The levels, ranging from 0-9, represent increasing amounts of protection from different solids and liquids, with the level 0 representing no protection at all from either contact or ingress.

For protection from solids, level 1 denotes protection from any object larger than 50mm. This could be any large surface of the body such as the back of a hand, but not offering any protection against a deliberate contact with a body part. Level 2 represents protection against objects of size greater than 12.5mm, but less than 50mm, such as fingers or similar objects. Level 3 represents protection against intrusion from objects of size between 2.5-12.5mm, such as tools, thick wires, etc. Level 4 represents protection against objects of size between 1mm and 2.5mm, such as most wires, screws and so on. A level 5 enclosure will protect against ingress of dust, but not entirely prevent it from entering. That means although the dust protected enclosure will offer complete protection against contact, it will not allow dust to enter in quantities that may interfere with the satisfactory operation of the equipment. If your equipment needs to be dust tight, only an enclosure with a level of 6 will ensure there is no ingress of dust including complete protection against contact.

The second number in the IP rating denotes protection from liquids. For instance, level 1 represents enclosures offering protection from dripping water. Level 2 denotes protection from dripping water when the enclosure is tilted by 15 degrees. An enclosure with a rating of level 3 will not allow the ingress of water sprayed on it, while a level 4 enclosure protects against water being splashed on it. If you want the equipment to remain protected against water from jets, you must go for a level 5 enclosure. If the water jets are really powerful, only a level 6 or above enclosure will help. However, if you expect equipment to work even when immersed in water up to a depth of 1m, you need to go for an enclosure with a rating of level 7. For equipment expected to work even beyond an immersion depth between 1-3m, only an enclosure with a rating of 8 is to be used.