UNDERSTANDING Arduino memory

Most Arduino users probably are aware that Arduinos contain memory but have you ever thought about what type of memory there is? There is actually three types of memory in an Arduino! These are: flash, SRAM and EEPROM. In this article we will look at each type in turn and look at why you might…

Read Article

UNDERSTANDING PWM

Pulse Width Modulation (PWM), is a technique that can be used to create analogue from digital! Using digital electronics to create a square wave, a signal can be created that repeatedly alternates between an ON and OFF state. This pattern can range between 0V and the supply voltage. This is achieved by varying the period…

Read Article

UNDERSTANDING ADC

Humans live in an analogue world but computers are digital. Therefore, if we wish to measure elements of our analogue world, we need a way of converting these measurements to digital. This is the role of the process known as Analogue to digital conversion (ADC). With digital signals, we often deal with binary signals, such…

Read Article

UNDERSTANDING data types

Introduction When declaring a variable, you need to state a data type. A data type determines how much space a variable can occupy in memory and what type of data. Dynamic vs static typing If you come from a background of Java, JavaScript, PHP, Python or Ruby – then this may seem odd. These languages…

Read Article
555

BUILD a square wave signal generator

There are occasions when a circuit needs to be fed with a square wave signal. To provide for such a scenario, we will build a square wave signal generator that uses a 555. A 555 can be configured to run in 3 different modes, the one that we are concerned with here is called the…

Read Article
random numbers

UNDERSTANDING random numbers in C++

Even though languages have ways of generating numbers, these numbers are not truly random! A more accurate description of what has been generated is a pseudo random number! The very nature of computers and software is such that random behaviour is not a feature that they have. Because we want them to perform set tasks,…

Read Article
dice

BUILD a rolling LED die

OBJECTIVE The objective of this project is to simulate a rolling die. I will use LEDs arranged in the pattern of a conventional die and give the illusion that it is ‘rolling’ as a number is randomly chosen. THE CODE The first thing that I did was to create and initialise an array, with the…

Read Article
74165 4021 pinout

BUILD a GPIO extender

The problem There may be occasions when you have a microcontroller that does not have enough GPIO pins for a circuit! Your circuit may require a large number of switches or LEDs, which would use up lots of GPIO pins. It’s likely that you will need some of the GPIO pins for other parts of…

Read Article
binary

BUILD a binary counter

OBJECTIVE We will build an 8-bit binary counter. This means that it will be able to count from 0 to 255, which in binary is 00000000 to 11111111. An LED that is off will represent a binary 0 and an LED that is on will represent a binary 1. Since computers count in binary, this…

Read Article

UNDERSTANDING binary

Computers use binary, base 2 and therefore I think that it is very important that you understand what binary is and how to use it. If you understand and build the circuit that I describe here, it can help you to count in binary! Binary uses only two digits, 0 and 1. Each digit is…

Read Article

BUILD a voltmeter

OBJECTIVE The objective of this project is a build a voltmeter that can measure voltages between 0 and 30V. I will use the analog inputs of an Arduino to measure the voltage, via a voltage divider. When an Arduino is powered from a 5V supply the maximum voltage that could be measured is 5V. However,…

Read Article

BUILD a thermometer

OBJECTIVE In this project we will build a device for measuring temperature. THE HARDWARE You can use an UNO or MEGA There are a number of sensors that I could have used to make this thermometer but I chose the LM35. I chose the LM35 because of its precision. The LM35 has an output voltage…

Read Article

BUILD a frequency counter

THE OBJECTIVE Our objective is to build a frequency counter that can identify frequencies up to 1MHz. pulseIn() pulseIn() reads a pulse on a pin and waits for a change from HIGH to LOW or LOW to HIGH. This works with times that are between 10μs and 180s. You can provide either two or three…

Read Article

BUILD a passive infrared motion detector

OBJECTIVE We will build a passive infrared motion detector that can detect movement from distances that are between 3m and 7m. THE SCIENCE All objects that have a temperature above absolute zero (0 ° Kelvin/-273.15 ° C/-459.67 ° F) emit heat in the form of infrared radiation. The hotter the object is, the more radiation…

Read Article
h-bridge motor

UNDERSTANDING motors

THE PROBLEM It is not possible to directly control a motor with an Arduino because of the low of the signal from the Arduino and because the current consumption of the motor will be too high for the Arduino. THE SOLUTION What is needed is a circuit to interface the motor and Arduino. Such a…

Read Article
range finder

BUILD a range finder

OBJECTIVE A range finder is a device that is used to find the distance between two points, using a technique known as ranging. In this project we will design and build a range finder that can measure how far away an object is, from 2 cm to 4 m (0.79 in to 13.12 ft). The…

Read Article