Tag Archive | "buzzer"

Review – Freetronics Module Family

Hello

In this article we examine a new range of eleven electronic modules from Freetronics. When experimenting with electronics or working on a prototype of a design, the use of electronic components in module form can make construction easier, and also reduce the time between thoughts and actually making something 🙂 So let’s have a look at each module in more detail…

PoE Power Regulator – 28V

This is a tiny switchmode voltage regulator with two uses – the first being regulation of higher voltage up to 28V carried via an Ethernet cable to a Freetronics Ethernet shield or EtherTen to power the board itself. The PCB is designed to drop into the shield or EtherTen as such:

… and converts the incoming voltage down to 7V which can be regulated by the EtherTen’s inbuilt regulator. The second use of this board is a very handy power supply for breadboarding or other experimentation. By bridging the solder pads on the rear of the board, the output is set to 5V DC, as such:

Note the addition of the header pins, which make insertion into a breadboard very easy – so now you have a 5V 1A DC power supply. For more information visit the product page.

N-MOSFET Driver/Output Module

This module contains an On Semi NTD5867NL MOSFET which allows the switching of a high current and voltage line – 60V at up to 20A – with a simple Arduino or other MCU digital output pin. The package is small and also contains enlarged holes for direct connection of high-current capability wire:

The onboard circuitry includes a pull-down resistor to ensure the MOSFET is off by default. For more information see the product page.

Logic Level Converter Module

This is a very simple and inexpensive method to interface 3.3V sensors to 5V microcontrollers in either direction.The module contains four independent channels, as shown in the image below:

However you can interface any low or higher voltage, as long as you connect the low and high voltages to the correct sides (marked on the PCB’s silk screen). For more information please visit the product page.

RGBLED Module

Surprisingly this module contains a RGB LED module (red, green and blue LEDs) which is controlled by a WS2801 constant-current LED driver IC. This module is only uses two digital output pins, and can be daisy-chained to control many modules with the same two pins. The connections are shown clearly on the module:

The WS2801 controller IC is on the rear:

There are several ways to control the LEDs. One way is using the sketch from the product home page, which results with the following demonstration output:

Or there is a unique Arduino WS2801 library available for download from here. Using the strandtest example included with the library results with the following:

During operation the module used less than 24 mA of current and therefore can happily run from a standard Arduino-type board without any issues. For more information please visit the product page.

TEMP Temperature Sensor Module

This module allows the simple measurement of temperature using the popular DS18B20 temperature sensor. You can measure temperatures between -55° and 125°C with an accuracy of +/- 0.5°C. Furthermore as the sensor uses the 1-wire bus, you can daisy-chain more than one sensor for multiple readings in the one application. The board is simple to use, and also contains a power-on LED:

Using the demonstation Arduino sketch from the product page results in the following output via the serial monitor:

Using this module is preferable to the popular Analog Devices TMP36, as it has an analogue output which can be interfered with, and requires an analogue input pin for each sensor, whereas this module has a digital output and as mentioned previously can be daisy-chained. For more information please visit the product page.

Humidity and Temperature Sensor Module

For the weather-measuring folk here is a module with temperatures and humidity. Using the popular DHT22 sensor module the temperature range is -4°C to +125°C with an accuracy of +/- 0.5°C, and humidity with an accuracy of between two and five percent. Only one digital input pin is required, and the board is clearly labelled:

There is also a blue power-on LED towards the top-right of the sensor. Using the module is quite simple with Arduino – download and use the example sketch included in the sensor library you can download from here. For the demonstration connect the centre data pin to Arduino digital two. Here is an example of the demonstration output:

Although the update speed is not lightning-fast, this should not be an issue unless you’re measuring real-time external temperature of your jet or rocket. For more information please see the product page.

Shift Register/Expansion Module

This board uses a 74HC595 serial-in parallel-out shift register which enables you to control eight digital outputs with only three digital pins, for example:

You can daisy-chain these modules to increase the number of digital outputs in multiples of eight, all while only using the three digital output pins on your Arduino or other microcontroller. For more information about how to use shift registers with Arduino systems, read our detailed tutorial. Otherwise for more information about the module please visit the product page.

Hall Effect Magnetic and Proximity Sensor Module

This module contains a sensor which changes output from HIGH to LOW when a magnetic presence is detected, for example a magnet. The board also has an LED which indicates the presence of the magnet to aid in troubleshooting:

Using this module and a small magnet would be an easy way to create a speedometer for a bicycle, the module is mounted to the fork, and the magnet on the rim of the front wheel. For more ideas consider the speedometer project in this tutorial. Otherwise for more information about this module please visit the product page.

Microphone Sound Input Module

This module performs two functions – it can return the sound pressure level (SPL) or the amplified audio waveform from the electret microphone. The LED (labelled “DETECT”) on the board visually displays an approximation of the SPL – for example:

… however the value can be returned by using an analogue input pin on an Arduino (etc). to return a numerical value. To do this connect the SPL pin to the analogue input. The MIC pin is used to take the amplified output from the microphone, to be processed by an ADC or used in an audio project. For more information please visit the product page.

Light Sensor Module

This module uses the TEMT6000 light sensor which returns more consistent values than can be possible using a light-dependent resistor. It outputs a voltage from the OUT pin that is proportional to the light level. The module is very small:

Use is simple – just measure the value returned from the OUT pin using an analogue input pin on your Arduino (etc). For more information please visit the product page. And finally, the:

Sound and Buzzer Module

This module contains a piezoelectric element that can be used to generate sounds (in the form of musical buzzes…):

Driving the buzzer is simple, just use pulse-width modulation. Arduino users can find a good demonstration of this here. Furthermore, as piezoelectric elements can also generate a small electrical current when vibrated, they can be used as “shock” detectors by measuring the voltage across the terminals of the element. The procedure to do this is also explained clearly here.

Now for a final demonstration – we use the light sensor to demonstrate making some noise with the buzzer module:

One final note I would like to make is that the design and construction quality of each module is first rate. The PCBs are strong, and the silk-screening is useful and descriptive. If you find the need for some or all of the functions made available in this range, you could do worse by not considering a Freetronics unit. Finally, although this has only been a short introduction to the modules for now, we will make use of them in later projects.

The modules are available directly from Freetronics or through their network of resellers.

Disclaimer – Modules reviewed in this article are a promotional consideration made available by Freetronics

Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe  for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in arduino, freetronics, learning electronics, microcontrollers, modules, reviewComments (0)

Getting Started with Arduino – Chapter Thirteen

This is part of a series titled “Getting Started with Arduino!” by John Boxall – A tutorial on the Arduino universe. The first chapter is here, the complete series is detailed here.

Welcome back fellow arduidans!

This chapter we will examine piezo buzzers, continue with our alarm clock, and then spend more time with the wireless radio modules by creating some remote control systems and sending various data over the airwaves. So let’s go!

Sometimes you would like to make some noise. For warnings, fun, or to annoy people. A very simple and inexpensive way to do this is with a piezoelectric buzzer. In simple terms, it contains a disc of metal that can deform when a current is applied to it. If you apply an alternating current at a high enough frequency, the disc will move fast enough to create a sound wave, something we can hear.

This is an example of a small piezo buzzer:

tdk_ps1240ss

This example was very cheap, less than $2.  Here is the data sheet: PS1240.pdf. It can run from between 3 and 30 volts AC – which thankfully the output from our Arduino falls between. But how do you output AC from an Arduino? There are several ways, however the easiest is using pulse-width modulation (PWM). If you look at your Arduino’s digital output sockets, some are labelled PWM. Using the function analogWrite(); you can send a PWM signal to the buzzer. For example:

The sketch above will beep the piezo on and off, and be somewhat annoying. Perfect. However with the analogWrite(); function it is impossible to use the full frequency range of the piezo buzzer. With a value of 254 for the duty cycle, the frequency generated is around 1500 Hz:

ps1240_analogwrite254ss

Later on we will explore ways to create a better range of sounds. But now to use that buzzer in our alarm clock to help wake people up.

Continuing on from exercise 12.1, this chapter we will add some more features to the clock. First of all is the piezo buzzer. As we just discussed above, using it is quite simple. On the hardware side of things, we can replace the resistor and LED connected between digital pin 6 and ground with our piezo buzzer. On the software side of things, instead of digitalWrite(6, HIGH); we use analogWrite(6,128);. Very easy. And here is a short video – with sound!

Moving on, it’s time to clean up the alarm function in general. Most alarm clocks have a snooze function, so let’s add one as well. When the alarm sounds, the user presses button four to turn off the buzzer, and is then asked if they want to snooze. Button one is yes and four is no. If yes, add ten minutes to the alarm time and carry on as normal. When adding the ten minutes be sure to check for increasing the hour as well, and also take into account the jump from 2359h to 0000h (or 2400h). If the user presses no, the alarm is switched off and the user warned with the flashing “OFF”.

Example 13.1Here is a demonstration of what I came up with:

The hardware is the same as exercise 12.1, except the LED and resistor from digital pin 6 to GND has been replaced by the piezo buzzer as described earlier. You will find the snooze function is controlled in the checkalarm(); function in the sketch.

 

In chapter eleven we started to examine the inexpensive serial data transmitter/receiver pairs. In this chapter we will continue working with them, to create the backbone of various remote control and data transmission ideas for you to use. For our next example, consider a simple remote control with four channels. That is, it has four buttons, and the transmitter will send out the state of the four buttons, high or low.

This would be useful for a remote control toy or a perhaps robot. The sketches are quite simple. The transmitter reads the buttons with digitalRead(); then transmits a single letter a~h – which is code for a button and its state. For example, a means button 1 is low, h means button 4 is high. The receiver just decodes that a~h code and sends the result to the serial monitor window. Here is the sketch for the transmitter and receiver.

To save time I will use the button board created in example 12.3. Here are the schematics for the transmitter and receiver sections:

example13p2schemss

And set up:

example13p2ss

And finally a video of the serial monitor showing the button states:

Now that we have the data being sent across, let’s get some switching happening. Using the same transmitter system as example 13.2, we will turn on or off four LEDs at the receiving end. Of course you could use relays, transistors, 74HC4066s, etc instead. Our sketch decodes the transmitted data once more, but sets the digital pins high or low depending on the received code. Here is the schematic for the new receiver:

example13p2schemss

… and the board laid out:

example13p3boardss

And again a quick demonstration video:

Now that you can turn the LEDs on or off with a push of a button, there are a few other ways of controlling those digital outputs with the remote control rig without altering the hardware.

For out next example, we will control two digital outputs with the four buttons, as each output will have an on and off button. Consider this sketch; and the following demonstration video:

So there you have various ways to control digital outputs and send basic data across a wireless radio serial data link.

LEDborder

Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe  for email updates or RSS using the links on the right-hand column, or join our Google Group – dedicated to the projects and related items on this website. Sign up – it’s free, helpful to each other –  and we can all learn something.

Posted in 315 MHz, 433 MHz, arduino, education, learning electronics, lesson, microcontrollers, piezo, tutorial, wirelessComments (12)


Subscribe via email

Receive notifications of new posts by email.

The Arduino Book

Arduino Workshop

FĂĽr unsere deutschen Freunde

Dla naszych polskich przyjaciół ...

Australian Electronics!

Buy and support Silicon Chip - Australia's only Electronics Magazine.

Use of our content…

%d bloggers like this: