mbed application board

The new application board has been designed to enable the maximum number of potential experiments and projects, with the minimum footprint.

/media/uploads/chris/app_board_front_small_map1.png/media/uploads/chris/app_board_back_small.png

Although that there are 2x20 way headers for the mbed for jumper wiring pins off-board, it's a fairly well encapsulated platform.

Where to buy

Feature list

  1. 128x32 Graphics LCD
  2. 5 way joystick
  3. 2 x Potentiometers
  4. 3.5mm Audio jack (Analog Out)
  5. Speaker, PWM Conencted
  6. 3 Axis +/1 1.5g Accelerometer
  7. 3.5mm Audio jack (Analog In)
  8. 2 x Servo motor headers
  9. RGB LED, PWM connected
  10. USB-mini-B Connector
  11. Temperature sensor
  12. Socket for for Xbee (Zigbee) or RN-XV (Wifi)
  13. RJ45 Ethernet conenctor
  14. USB-A Connector
  15. 1.3mm DC Jack input

1. 128x32 LCD

An example program to print text and variables to the LCD

» Import this program

#include "mbed.h"
#include "C12832_lcd.h"

C12832_LCD lcd;

int main()
{
    int j=0;
    lcd.cls();
    lcd.locate(0,3);
    lcd.printf("mbed application board!");

    while(true) {   // this is the third thread
        lcd.locate(0,15);
        lcd.printf("Counting : %d",j);
        j++;
        wait(1.0);
    }
}

» Import this library into a programC12832_lcd

Lib for the LCD display on mbed lab Board

A full featured test program :

» Import this programlab1

test program for mbed Lab Board

Demo for using bitmap graphic :

» Import this programChristmas-LCD

Demo for using bitmap graphic

2. Joystick

An example program for the mbed application board that uses the joystick button. LED1,2,3,4 light in sequence with up, down, left, right, and pushing the button lights them all (as a 80's computer gamer, I want to call this "fire!")

Note: that the orientation is looking at the screen in landscape, with the row of connectors at the bottom

» Import this program

#include "mbed.h"

BusIn joy(p15,p12,p13,p16);
DigitalIn fire(p14);

BusOut leds(LED1,LED2,LED3,LED4);

int main()
{
    while(1) {
        if (fire) {
            leds=0xf;
        } else {
            leds=joy;
        }
        wait(0.1);
    }
}

3. 2 x Potentiometers

To be completed

4. Analog Out

Plug in a pair of earphones.

» Import this program

#include "mbed.h"

AnalogOut Aout(p18);
AnalogIn pot1(p20);

int main()
{
    while(1) {
        for(float i=0.0; i<1.0; i+=0.1) {
            Aout = i;
            wait(0.00001+(0.0001*pot1.read()));
        }
    }
}

5. Speaker

A frequency sweep. Press the fire button to to play it again!

» Import this program

#include "mbed.h"

DigitalIn fire(p14);
PwmOut spkr(p26);

int main()
{
    while (1) {
        for (float i=2000.0; i<10000.0; i+=100) {
            spkr.period(1.0/i);
            spkr=0.5;
            wait(0.1);
        }
        spkr=0.0;
        while(!fire) {}
    }
}

6. 3 Axis Accelerometer

» Import this program

//Uses the measured z-acceleration to drive leds 2 and 3 of the mbed

#include "mbed.h"
#include "MMA7660.h"

MMA7660 MMA(p28, p27);

DigitalOut connectionLed(LED1);
PwmOut Zaxis_p(LED2);
PwmOut Zaxis_n(LED3);

int main() {  
    if (MMA.testConnection())
        connectionLed = 1;
        
    while(1) {
        Zaxis_p = MMA.z();
        Zaxis_n = -MMA.z();
    }

}

» Import this library into a programMMA7660

Library for the MMA7660 triple axis accelerometer

7. Analog In

To be completed

8. Servo Motor

An example program that uses the two potentiometers to set the position of the servo motors. You'll need to supply 6v into the DC socket, (1.3mm, center/tip positive)

» Import this program

00001 #include "mbed.h"
00002 #include "Servo.h"
00003 
00004 Servo s1(p21);
00005 Servo s2(p22);
00006 
00007 AnalogIn p1(p19);
00008 AnalogIn p2(p20);
00009 
00010 int main() {
00011     while(1) {
00012         s1=p1;
00013         s2=p2;        
00014         wait(0.1);
00015     }
00016 }

» Import this library into a programServo

A class to control a model R/C servo, using a PwmOut

9. RGB LED

An example program that cycles the on board RGB LED through various colours.

Information

The RGB LED is common anode, so that "0" is on, and "1" is off. For PWM, the closer to 0.0 the brighter, the closer to 1.0 the dimmer. use (1.0 - value) to invert.

» Import this program

00001 #include "mbed.h"
00002 
00003 PwmOut r (p23);
00004 PwmOut g (p24);
00005 PwmOut b (p25);
00006 
00007 int main()
00008 {
00009     r.period(0.001);
00010     while(1) {
00011         for(float i = 0.0; i < 1.0 ; i += 0.001) {
00012             float p = 3 * i;
00013             r = 1.0 - ((p < 1.0) ? 1.0 - p : (p > 2.0) ? p - 2.0 : 0.0);
00014             g = 1.0 - ((p < 1.0) ? p : (p > 2.0) ? 0.0 : 2.0 - p);
00015             b = 1.0 - ((p < 1.0) ? 0.0 : (p > 2.0) ? 3.0 - p : p - 1.0);  ;  
00016             wait (0.01);
00017         }
00018     }
00019 }

» Import this programapp-board-RGB2

Example program to cycle the RGB LED on the mbed application board through all colours

10. USB Device

» Import this program

#include "mbed.h"
#include "USBMouse.h"

USBMouse mouse;

int main() {
    int16_t x = 0;
    int16_t y = 0;
    int32_t radius = 10;
    int32_t angle = 0;

    while (1) {
        x = cos((double)angle*3.14/180.0)*radius;
        y = sin((double)angle*3.14/180.0)*radius;
        
        mouse.move(x, y);
        angle += 3;
        wait(0.001);
    }
}

» Import this programUSBKeyboard_HelloWorld

USBKeyboard Hello World

» Import this programUSBSerial_HelloWorld

USBSerial Hello World

» Import this programUSBHID_HelloWorld

USBHID Hello World

11. LM75B Temperature sensor

An example program to read the current temperature from the LM75B and display it on the LCD

» Import this program

#include "mbed.h"
#include "LM75B.h"
#include "C12832_lcd.h"

C12832_LCD lcd;
LM75B tmp(p28,p27);

int main ()
{

    while (1) {
        lcd.cls();
        lcd.locate(0,3);
        lcd.printf("%.2f\n",tmp.read());
        wait(1.0);
    }

}

» Import this library into a programLM75B

A simply library for the LM75B I2C temperature sensor

12. Xbee socket

Websocket over Wifly - Hello World - This example send messages to the mbed websocker server over a wifi connection using the RN-XV Wifly module.

The output can be seen at

» Import this program

#include "mbed.h"
#include "WiflyInterface.h"
#include "Websocket.h"
#include "LM75B.h"
#include "MMA7660.h"


/* wifly interface:
*     - p9 and p10 are for the serial communication
*     - p30 is for the reset pin
*     - p29 is for the connection status
*     - "mbed" is the ssid of the network
*     - "password" is the password
*     - WPA is the security
*/

WiflyInterface wifly(p9, p10, p30, p29, "mbed", "password", WPA);

// accelerometer
MMA7660 acc(p28, p27);

// temperature sensor
LM75B tmp(p28,p27);


int main()
{
    char json_str[100];

    wifly.init(); //Use DHCP
    while (!wifly.connect());
    printf("IP Address is %s\n\r", wifly.getIPAddress());

    // See the output on http://sockets.mbed.org/app-board/viewer
    Websocket ws("ws://sockets.mbed.org:443/ws/app-board/wo");
    
    // connect WS server
    while (!ws.connect());

    while (1) {
        // create json string with acc/tmp data
        sprintf(json_str, "{\"id\":\"app_board_wifly_EW2013\",\"ax\":%d,\"ay\":%d,\"az\":%d, \"tmp\":%d}", (int)(acc.x()*360), (int)(acc.y()*360), (int)(acc.z()*360), (int)tmp.read());
        
        // send str
        ws.send(json_str);
        
        wait(0.1);
    }
}

HTTP Client over Wifly - Hello World

» Import this programapp-board-Wifly-HTTPClient

An example program using the HTTP Client over wifly, creat

13. Ethernet Interface

NTP Hello World - This example fetches the the time using NTP, and prints it over the USB Serial interface. Be sure to have been through /handbook/SerialPC to make sure you have a serial console

» Import this programNTPClient_HelloWorld

Simple example demonstrating how to use the NTP Client to set the time

HTTP Client Hello World

» Import this programHTTPClient_HelloWorld

Simple example demonstrating how to use GET & POST requests with the HTTP Client

Websocket Accelerometer-Temperature demo - This example streams acceleration and temperature data to a websocket server. Visit app-board viewer to have a real time feed.

» Import this programapp-board-Ethernet-Websocket

Modifed version from Samuel Mokrani Changed URL to push data to sensor page Added visualisation page URL as a comment

14. USB Host

Important!

When using the mbed as a USB host, 15k Ohm pull down resistors are needed on the D+ and D- signals, as per the USB specification. This can be achieved by switching both switches the DIP switch to the "USB Host" position

SW1

Flash disk Hello World This example program writes the file "test.csv" to a USB flash stick, taking 100 samples (20 per second for 5 seconds) from pot1. The resulting CSV file can easily be plotted as a graph in Excel!

» Import this program

#include "mbed.h"
#include "MSCFileSystem.h"

MSCFileSystem fs("fs");
DigitalOut led(LED1);
AnalogIn pot1(p19);

int main()
{
    FILE *fp = fopen("/fs/test.csv","w");
    printf("Create filehandle for test.csv\n");

    printf("Writing to file\n");
    for (int i=0; i<100; i++)  {
        fprintf(fp,"%.2f\n",pot1.read());
        wait(0.05);
        led=!led;
    }

    fclose(fp);
    printf("Close the handle\n");
    led=1;
}

USB 3G Modem : NTP Client Hello World This example uses a Vodafone USB 3G Modem to connect to the internet and fetch the current time using NTP

» Import this programVodafoneUSBModemNTPClientTest

NTP Client Test with the Vodafone USB Modem library

USB 3G Modem : HTTP Hello World This example uses a Vodafone USB 3G Modem to connect to the internet and fetch a web page using HTTP

USB 3G Modem : SMS Hello World This example uses a Vodafone USB 3G Modem, to connect to the mobile phone network for sending and receiving text messages

» Import this programVodafoneUSBModemSMSTest

SMS test with the Vodafone library

USB 3G Modem : app-board Websocket demo This example uses a Vodafone USB 3G Modem, to connect to the mobile phone network for sending and receiving websocket messages containing accelerometer and temperature data.

» Import this programapp-board-USBModem-Websocket

websocket over 3g using VodafoneUSBModem and app-board on-board sensors (acc - tmp)

Details

Form factor55mm x 86mm x 19mm (with mbed)
128x32 Graphics LCD, SPI InterfaceNewhaven C12332A1Z
MOSI:p5
nRESET:p6
SCK:p7
A0:p8
3 Axis +/1 1.5g Accelerometer,I2C InterfaceFreescale MMA7660
SCL:p27
SDA:p28
Address:0x98
Temperature sensorLM75B
SCL:p27
SDA:p28
Address:0x90
5 way JoystickALPS SKRHADE010
Down:p12
Left:p13
Centre:p14
Up:p15
Right:p16
2 x PotentiometersIskra PNZ10ZA, 10k
Pot 1 (left) :p19
Pot 2 (right):p20
2 x 3.5mm Audio jack (Analog In/Out)CUI Inc SJ-3523-SMT
Analog In:p17
Analog Out:p18
2 x Servo motor headersPWM1:p22
PWM2:p21
RGB LED, PWM connectedCree Inc CLV1A-FKB
Red:p23
Green:p24
Blue:p25
Speaker, PWM ConnectedMULTICOMP MCSMT-8030B-3717
p26
USB-B ConnectorNeltron, 5075ABMR-05-SM1
USB-A ConnectorMULTICOMP,USB-A-V
RJ45 Ethernet conenctorPulse Jack, J00-0045NL
1.3mm DC Jack inputCLIFF, FC68145S
1.3mm
6v-9v
Centre positive

Schematics




8 related questions:


17 comments:

17 Oct 2012

Great when can I order one.

19 Oct 2012

Hi,

I think the labels for the Ethernet socket & USB A connector are the wrong way round.

Looks really cool though!

Jez

02 Nov 2012

great job...where we find this aplication Mbed board?

23 Dec 2012

Thanks, works great!!

28 Dec 2012

Any word as to when these will be available for purchase?

30 Dec 2012

where i can buy the mbed application board and how much it cost?

09 Jan 2013

R.s.components are showing stock

15 Jan 2013

#include "mbed.h"
#include "MSCFileSystem.h"

MSCFileSystem fs("fs");
DigitalOut led(LED1);
AnalogIn pot1(p19);

int main()
{
    FILE *fp = fopen("/fs/test.csv","w");
    printf("Create filehandle for test.csv\n");

    printf("Writing to file\n");
    for (int i=0; i<100; i++)  {
        fprintf(fp,"%.2f\n",pot1.read());
        wait(0.05);
        led=!led;
    }

    fclose(fp);
    printf("Close the handle\n");
    led=1;
}

this program create signal Coulomb how to create table in test.csv , how could i store data in diff Coulomb

08 Feb 2013

pleas also load Bluetooth dongle example :)

18 Mar 2013

Anyone else has incorrect readings from the LM75B? It measures about 5 degrees to high.

19 Mar 2013

Wish there was some screw terminal I could use to screw this board into a project box.

25 Mar 2013

Same problem here...

user Ben Jamin wrote:

Anyone else has incorrect readings from the LM75B? It measures about 5 degrees to high.

Another question: Is it a problem to connect the USB to the lab board and the DC input jack at the same time?

03 Apr 2013

My LMB75 was also reading about 10 Degrees F. High after 20 min. I assume its a function of ambient (74 Deg. F. in my office) vs. heat generated on the board itself. After 20 Minutes the reading stays pretty consistent at +10 above ambient.

As a very QUICK and dirty Fix for this, I used the POT1 reading to apply to the Temp Reading as an offset. This way, I can dial in how much of an offset I need by simply turning the POT1 wheel.

Here is a code snippet of what I did.

#include "LM75B.H"

AnalogIn Pot1(P19);       // POT1 voltage reading
LM75B LMTemp(p28,p27);    // LM75B reading in Deg. C.


. . .

int main()
{

float TempFair;   // Temperature in Deg F
float TempCel;    // Temperature in Deg C 
float TempOff;    // Temperature Offset


	while(1){
		
		TempCel = LMTemp.read();  // get the reading in Deg C
		TempFair = TempCel * 9/5 + 32; // Convert to Deg F
		
		// We want a 0 to 20 Offset
		TempOff = Pot1 * 20; //Get the POT1 voltage and Multiply by 20
		
		// Apply the offset to the Deg F reading
		TempFair = TempFair - TempOff;

		// TempFair now has the correct Temperature.
		pc.printf("%.2f\r\n", TempFair);
	
		// you could also print out TempOff and Pot1
		// to see the effect of turing the POT1 wheel.
		
		. . .
		
		wait(1.0);
	}
}

user Julez Shoe wrote:

Same problem here...

user Ben Jamin wrote:

Anyone else has incorrect readings from the LM75B? It measures about 5 degrees to high.

Another question: Is it a problem to connect the USB to the lab board and the DC input jack at the same time?

21 May 2013

user Ben Jamin wrote:

Anyone else has incorrect readings from the LM75B? It measures about 5 degrees to high.

Yes, I see the same problem.

21 May 2013

Bigger Font Size on LCD?

How is this done?

21 May 2013

<<quote donde>> Bigger Font Size on LCD?

You find my fonts in : https://mbed.org/users/dreschpe/code/LCD_fonts/ You have to include the font file you want to use :

  1. include "Arial24x23.h"

Then switch to this font : LCD.set_font((unsigned char*) Arial24x23);

Peter

21 May 2013

THANKS PETER !

user Peter Drescher wrote:

<<quote donde>> Bigger Font Size on LCD?

You find my fonts in : https://mbed.org/users/dreschpe/code/LCD_fonts/ You have to include the font file you want to use :

  1. include "Arial24x23.h"

Then switch to this font : LCD.set_font((unsigned char*) Arial24x23);

Peter