FF Module

From RepRapWiki
Jump to: navigation, search

Template:FF Module

Crystal Clear action run.png

Release status: working

Description Sound & RGB Led
License Creative-Commons 3.0 CC BY-SA
Author V.Mendoza (VincentM)
Based-on Delta
Categories Electronics, Marlin, FF_Module, Electronics development
CAD Models
External Link none

This 'module' allows you to add sounds and control an RGB Led to your 3D Printer or any other project based on Arduino board.

It's called module but it's a complete Arduino project because it uses an Arduino as microcontroller.

The Sound part and the Led part are independents.

It's controlled by Marlin firmware. Acts simulating to be an BlinkM and uses M150 Gcode.

The Led part is based on Micah Riddell design of Amblone: http://fritzing.org/projects/uln2003a-amblone-v2/



Hardware needed:

Arduino Board

The core of the module can be any Arduino board. We need SDA/SCL comunication, 4 digital I/O and 3 PWM pins. All working at 5v.

(Not an Arduino board working at 3.3v)

I use an Arduino UNO.

Sound module (WTV020-SD-16P)

For play the sound, the modules control is an WTV020-SD-16P (easy to find in Ebay & cheap).

Micro SD card

The WTV020 use a Micro SD card to store sounds. The card must be of 1GB or less (some people are using 2GB but specs says 1GB max.) Not all cards are compatible with the module. I buy cards from http://www.embeddedadventures.com/ for ensure compatibility. The card must be formated in FAT16 mode.

Loud Speaker

8Ω Speaker is conected to the WTV020 to play sounds.


Used to pass PWM output to RGB Led.

Resistors (1/4W)

1 470Ω 1/4W (Busy Led)

2 4.7KΩ 1/4W (SDA,SCL lines)

3 1.5KΩ 1/4W (Voltage divider) (*) R1

3 2.2KΩ 1/4W (Voltage divider) (*) R2

3 1KΩ 1/4W (Voltage divider) (*) R2

(*) This resistors are used as a voltage divider to down the 5v output of Arduino I/O pins to 3.4v in my case (1.5k to pin, 3.2k (2.2k+1k in series) to Ground).

You can use 1.8K to pin and 3.3K to ground to simplify, and you will obtain 3.24v . You will need 3 of each.

RGB Led Strip

12v RGB LED strip, common positive, that can be manually controlled.


Female/Male pins, protoboard, cables, solder ... to create an Arduino Shield containing the Hardware.



We need to make a PCB Shield for our Arduino board. In this example, it's for Arduino Uno.

The Gerber files to manufacture the PCB:

File:FF Module.zip

Solder all components as marked in the figure.


Converting sounds to AD4 format

The WTV020 play sounds in .ad4 format. To convert your .mp3 sounds to .ad4 you can use SOMO Tool from 4dsystems (http://www.4dsystems.com.au/product/SOMO_14D/). You have a good guide of how to do in the same page.

Once converted, rename sounds like:





Copy to the Micro SD card and put the card in the WTV020 slot.

Example sounds: File:Sonidos.zip


Load file Media:FF Module V1.ino to your Arduino as usualy.


To enable the M150 Code, find the following line in Configuration.h:

//define BlinkM/CyzRgb Support

//#define BLINKM

And uncomment

//#define BLINKM

Load Marlin to your Printer control board.

Connecting & Wiring

Put the shield on an Arduino UNO:


and wire Power (+12v 1A) to JP7. Note: Red wire is positive and Black GND.

Insert the micro-SD with Sounds in the module:

2 Put SD.JPG

Conect the Speaker respecting polarity:

3 Wire Speak.JPG

Put a 4 wires cable in JP5:

4 Wire RGB.JPG

Note: Black wire is Common Positive in this photo.

And connect this cable to RGB LED strip:

4 2 Wire RGB.JPG

Now, pay attention to JP3:

5 Wire I2C.JPG

Conect 3 wires from this connector ...


to your Printer Control Board I2C port.

For example, on RAMPS board, the I2C port is near the endstops:

(RAMPS users, please see note in Troubleshooting section)





SAV MkI I2C.jpg

Yes, but I have an I2c device conected yet...

There are others devices for Reprap controller boards using the I2C connection. It's not a problem.

The I2C bus allows you to conect more than one devices to it in paralel. Each one is identified with a number and will collect only the instructions for this number.

If you have other I2C device conected, conect the FF_Module in paralel with this device.

Using the module

The module is controled by Gcode M150.

Normal use of this Gcode is:

m150 rxxx uxxx bxxx

where xxx is a numeric value for colours in RGB (r-red, u-green, b-blue)

Using the module in this way, it acts as an RGB LED but you can't use 255 as a value for Red colour (use 254 instead).

Placing a value of 255 in r changes the working mode of the module and it acts as a sound module, playing the sound number found in the u value.

For example:

m150 r255 u003 b000 - Play sound 3 on SD card

m150 r000 u255 b000 - Put RGB Led full Green

m150 r254 u255 b255 - Put RGB Led White


You can add this Gcodes to yours 'Start Gcode' & 'End Gcode' in your Slicer program.

In this case, be sure you enter CAPS LETTERS in your Gcode:

M150 Rxxx Uxxx Bxxx

and, after every M150 line, put a 1 second pause, using G4, like this:

G4 S1


The module has been tested in Sanguinololu & RAMPS 1.3 boards without problems, but some RAMPS 1.4 users reports that the module don't work (don't receive data from RAMPS).

In this case, you can solve the problem bypassing the two R2 (4.7k) resistors from A4-A5 to JP3. A simple wire in place of resistors is enough.


Speaker Box: http://www.thingiverse.com/thing:488096


Arduino Uno mount: http://www.thingiverse.com/thing:239837


Proyecto Clone Wars