Basic Electronics category

Use a Comparator or Op-Amp to Simplify Light Dependent Resistor Output

If your project calls for light sensitivity, it’s hard to beat light dependent resistors (LDRs), also known as photoresistors. They’re available for a few cents each, and their resistance varies based on how much light they receive. In the dark, these devices produce resistances in the megohm range, and can fall to hundreds of ohms or even less when exposed to sufficient light. You first instinct when prototyping this type of device is likely to use an analog input on an Arduino or similar dev board to sense voltage levels. This works quite well in many situations, but you may also want to consider a comparator or operational amplifier (op-amp) to turn this analog input into a simple on/off signal. You could also use one of these components by itself to produce a usable output without the use of a microcontroller.

LDR Analog Input to Microcontroller

An LDR setup for Arduino Analog Input. Illustration: Jeremy S. Cook in Fritzing

First, let’s examine how a microcontroller would see an LDR input. Using the circuit illustrated in the figure above with an Arduino Uno, an LDR is attached to 5VDC, then routed to the analog input A0. Voltage at the intersection of A0, the resistor, and LDR is divided between the fixed resistor and LDR, which decreases its resistance as light is applied. Voltage at this analog input increases with the lowered resistance in proportion to the amount of light the LDR sees.

The Arduino board is thus able to sense the resulting voltage level and convert it to an analog value. A threshold can be setup to respond to different light levels as on or off, or the analog signal can be used for proportional control. Note that the resistor in this illustration is just a placeholder; it would need to be adjusted based on your LDR sensitivity. You can also use a trimming resistor to tweak output values as needed.

Comparator Digitizes Analog Signal

What if you need light input, but just want an on/off value? Analog inputs can handle this programmatically, but if you’re using an Arduino Uno you’re restricted to the 6 analog pins. There’s also the normally minor issue of additional program complexity. If you need more performance out of your setup, you could turn to a comparator, or operational amplifier (op-amp) set up to act as one, to convert this analog value into a simple on/off signal.

Caption: An LDR and LM358 Op-amp setup to detect light as a binary signal to an Arduino Uno Illustration: Jeremy S. Cook in Fritzing

For example, if you were going to use an LM358 op-amp and LDR to detect light, you could tie the V+ (pin 8) to the 5V supply of your Arduino, ground (pin 4) to the Arduino’s ground, and output A (pin 1) to a digital pin on your Arduino board. The inverting input (pin 2) would be hooked to a voltage divider between +5V and ground, and your LDR would be setup in a voltage divider on the non-inverting input (pin 3). Here the LDR would act as the resistor from +5V to the op-amp input, and the set resistor would run to ground.

This will give you an on/off input to your Arduino without mucking about with any extra programming. Note that because of the way this op-amp operates, the output will be less than 5V, but will be sufficient to trigger the needed input. Obviously this will add some wiring complexity—more work than a few lines of code—so it’s not ideal in all situations.

Comparator Sans Arduino

You’re probably wondering at this point why you wouldn’t simply get a dev board capable of more analog inputs if that’s what is needed. After all, hooking up additional wiring or adding more complication to your PCB isn’t trivial. Certainly there are some applications that call for this, but for really simple electronics, you may not need a microcontroller at all.

Caption: An LDR and LM358 Op-amp setup to turn an LED on when there isn’t sufficient light available.
Illustration: Jeremy S. Cook in Fritzing

One such simple application would be a light that you want to come on when the ambient light drops below a certain threshold. In this application, you’d want to put the resistors only voltage divider on the non-inverting input (pin 3), while the LDR voltage divider would be placed on the inverting input (pin 2). This would cause the voltage on pin 2 to be larger than pin 3 when the light is on, turning the output (pin 1) on when there isn’t enough light.

Of course LDRs are but one type of sensor, and there are many models of op-amps and comparators with different characteristics available depending on your needs. If you’re just starting out with sensors and electronics, using a dev board like an Arduino is a great choice. As you advance in your knowledge, you might also consider analog electronics for your builds. While not appropriate or necessary for every project, it’s a great tool to have available when purely digital processing doesn’t quite fit your application.

Jeremy S. Cook and Zach Wendt are engineers who enjoy sharing how electronic components can best impact applications. Jeremy writes for a variety of technical publications. Zach works for Arrow Electronics, a major supplier of Arduino products.

Understanding Relay Coil Voltage Specifications

by Robert_Fay @ digikey.com:

When learning about relays there are a couple coil voltage specifications that can be a little tricky to understand. There are typically 4 specification for coil voltage listed in the datasheet. For this example we will be looking at relay part Z2352-ND 14. This is a SPST non-latching relay with 1 Form A (normally open) set of contacts.

Understanding Relay Coil Voltage Specifications – [Link]

How to make precision measurements on a nanopower budget

Gen Vansteeg @ ti.com discuss about precision measurement for nanopower scale using OPAMPs.

Heightened accuracy and speed in an operational amplifier (op amp) has a direct relationship with the magnitude of its power consumption. Decreasing the current consumption decreases the gain bandwidth; conversely, decreasing the offset voltage increases the current consumption.

Many such interactions between op amp electrical characteristics influence one another. With the increasing need for low power consumption in applications like wireless sensing nodes, the Internet of Things (IoT) and building automation, understanding these trade-offs has become vital to ensure optimal end-equipment performance with the lowest possible power consumption. In the first installment of this two-part blog post series, I’ll describe some of the power-to-performance trade-offs of DC gain in precision nanopower op amps.

How to make precision measurements on a nanopower budget – [Link]

Transistors- The 70-year-old invention that changed the world

First transistor made in 1947- Point contact transistor

Its been 70 years since the fundamental building block of electronics was created, and it has been getting smaller, and better since then. The invention that won the Nobel prize for John Bardeen, Walter Brattain, and William Shockley in 1956 revolutionized electronics and made it into the IEEE milestone list. Before 1947 computers used vacuum tubes, which could be several inches long, consumed massive amounts of power, and needed to be regularly replaced. Nowadays, billions of transistors can fit in the area of a single vacuum tube, can last for many years and are a lot more efficient.

What is a transistor? For computing, basic binary logic operations are needed in order to perform calculations, so the objective of both vacuum tubes and transistors was to toggle the device between on and off position (1 or 0). A transistor is made from semiconductor material (usually silicon or germanium) capable of carrying current and regulating its flow. The semiconductor is doped which results in a material that either has extra electrons (n type) or has holes in the crystal structure (p type), and the transistor is made from a combination (layers) of both of these types. When current is applied, electrons can go through the different layers allowing energy to flow. Transistors can work as a switch or an amplifier depending on how it’s configured.

In 1965, the intel co-founder formulated Moore´s Law which states that every 2 years the number of transistors in a dense integrated circuit doubles. Since then Gordon E. Moore has been right, but soon the law will no longer be true which will lead to either a slowdown in technologic advancement or a new golden era for engineering where a new technology will replace transistors and a race to make it better and more efficient will again begin.

Transistors have powered 70 years of advances in computing, and it all started with the point contact transistor made by three scientists who changed history. However, other ways must be found to make computer more capable, but the problem is not just making smaller transistors, but also about the time it takes for information to get from one side to another. Transistors can be found in cellphones, computers, cameras, electronic games, and pretty much anything electronic that performs calculations, so if transistors stop advancing so will all these devices. Perhaps, consumers won’t feel the impact right away, but scientists in need of fast processing and super computers will.

[source]

Learn Arduino Easily with The Arduino Inventor’s Guide

Are you looking for Arduino tutorials? Already over-whelmed by the guides and videos available on the internet? Sparkfun is making Arduino and electronics easier for you with its new book ” The Arduino Inventor’s Guide”!

First of all, the authors of this book , Brian Huang and Derek Runberg, are both working in the department of Education at SparkFun Electronics. Since they are experienced in electronics and educating engineering in schools, they are working towards making electronics easy and fun.

In fact, this 10-project guide is a project-packed introduction to building and coding with Arduino microcontroller. With each hands-on project, total beginners learn useful electronics and coding skills while building an interactive gadgets. Accordingly, this guide is within the introductory-level educational series introduced by No Starch Press and Sparkfun.

“We wanted to share the magic that happens when you build something interactive with electronics,” says Huang. “The goal is to teach real, valuable hardware skills, one project at a time,” adds Runberg.

Content of the book

  • Introduction
  • Electronics Primer
    101 electronics
  • Project 1: Getting Started with Arduino
    Blinking an LED
  • Project 2: A Stoplight for Your House
    A miniature traffic light
  • Project 3: The Nine-Pixel Animation Machine
    An LED screen that displays animated patterns and shapes
  • Project 4: Reaction Timer
    A fast-paced button-smashing game to test your reflexes
  • Project 5: A Color-Mixing Night-Light
    A light-sensitive, color-changing night-light
  • Project 6: Balance Beam
    A challenging ball-balancing game
  • Project 7: Tiny Desktop Greenhouse
    A temperature-sensing mini greenhouse with an automated fan and vent
  • Project 8: Drawbot, the Robotic Artist
    A motorized robot that you can control
  • Project 9: Drag Race Timer
    A racing timer for toy cars
  • Project 10: Tiny Electric Piano
    A tiny electric piano that you can actually play!
  • Appendix: More Electronics Know-How

Reviews

The Arduino Inventor’s Guide will appeal to the gadget freak as well as those who like to put their own spin on things.” —Microcontroller Tips

“This is probably the best Arduino starter book out there! I highly recommend it for every library and classroom.” —Sequential Tart

To sum up, the book is available for $30 on No Starch Press as a printed book and for $25 as an Ebook. In addition, you can check this page for more insights. Also download Project 2: A Stoplight for Your House, and the sketches, templates, and diagrams used in this book.

How to Select a Voltage Regulator

Sanket @ octopart.com tipped us with his latest blog post about voltage regulators and how to select them.

All electronics projects need power. Power can come from either stored energy in a battery, or directly from mains AC voltage or DC power from renewable sources such as solar energy. Power Management ICs (PMICs) help manage the power requirements in a system including scaling voltages, battery charging, and DC-DC conversion. Choosing the right PMIC can make a difference in whether the final product becomes successful or not.

How to Select a Voltage Regulator – [Link]

Edgefx Kits, Get Your DIY Project Kit Now!

Aiming to bridge the gap between the academics and industry in electronics, communication and electrical sectors, Edgefx Technologies was born at 2012 as an online store for project solutions.

Edgefx provides practical skill building solutions to the engineering students in the form of Do It Yourself (DIY) project kits. These kits support wide areas of electronics and communication, and also the latest trends like IoT, Android, Arduino, Raspberry Pi and many more.

Edgefx kits are easy to use and self-explanatory. They come with hardware and training material in the form of extensive audio-visuals and can be purchased online.

The company has grown to have a very strong focus on customer service, quality and morale of the staff and most of all, a passion for what we do. And although we’re a team of almost 30 right now, nothing about us is corporate. We don’t have multiple tiers of hierarchy. The vast majority of our employees work on the front lines, taking care of our customers or shipping items out of the Edgefx Fulfillment Centers.

The website contains more than 200 projects in about 15 different categories. Kits prices range from Rs. 1500 to Rs. 50000 (~ $23 to $750). In addition to the project kits, Edgefx also conducts practical workshops in colleges and schools.

School students, starting from 8 years old, can opt for school electronic projects that empowering them to innovate. It includes three basic level STEM kits and one intermediate level kit. All of these kits are edutainment and fun, with real time applications using latest technologies, and also can create multiple experiments.

Each basic kit has a three project inside, these projects are:

  • Security protection for museum items
  • Touch controlled fan
  • Touch me not LED warning
  • Bike theft alarm
  • Upside down  indicator for fragile item
  • Toll gate auto light LED
  • Security area protecting alarm
  • Auto door opening motor
  • Human detection under debries

The intermediate kit is an Arduino project kit. This project is designed for digital sensors solder-less Arduino projects on breadboard. It will light flasher of different color light on single LED each time on sensing finger swipe with the help of IR obstacle sensor. Also, the project makes different unique sounds on sensing each time.

Beginners Arduino Project Kit

So, if you are searching for some project kits you have to visit the Edgefx store, explore the kits to find the project you want to make and then order it. In the end, don’t forget to share with us your experience once you buy and use the kit!

Integrated Load Switches versus Discrete MOSFETs

Alek Kaknevicius @ ti.com discuss about load switches and the advantages of intergrated switches over discrete ones.

The most common approach to load switching solutions is to use a Power MOSFET surrounded by discrete resistors and capacitors; however, in most cases using a fully integrated load switch has significant advantages. While both discrete and integrated load switching solutions perform the same basic function (turn on and turn off), distinctions exist, such as the transient behavior and total solution size. This application report highlights many drawbacks and limitations of a discrete switching solution and discusses how they can be overcome with an integrated load switch.

Integrated Load Switches versus Discrete MOSFETs – [Link]