The board itself is shown on the left. Apparently, it has been discontinued by Parallax (Parallax store), but what we have is what we have. The EB500 is part of a line of Bluetooth transceivers designed by A7 Engineering. Luckily, the user manual containing the technical specifications, circuit board layout, and pinouts is still available (EB500 User Manual).
I have an Arduino Nano 3.0 (Atmel ATmega 328, manufactured by Gravitech) that I'll use to test the EB500. According to the user manual, we need to connect a total of seven pins for communications without flow control: two grounds, transmit, receive, status, mode, and power. The status and mode pins aren't crucial, but I'll connect them for debugging purposes. Two grounds are specified, pins 1 and 2, and should both be connected. The data sheet says the EB500 draws 35 mA at maximum speed and can accept 5 to 12 volts - within the specifications of the Arduino. The connections I made are as follows:
EB500 Pin (Signal) Arduino Pin
-------------------------------
1 (GND) <-------> GND
2 (GND) <-------> GND
3 (TX) <-------> 12
4 (RX) <-------> 11
8 (STATUS) <-------> 10
9 (MODE) <-------> 9
20(VCC) <-------> 5V
Note that pin 1 on the EB500 is the lower-right most pin, marked with a white dot, and has a white box around it. Pin 20 is the upper-right most pin; be sure to check this connection before powering up the Arduino. The Arduino will be powered directly from the PC via the USB connection. After verifying all the connections, I connect the USB to the computer. The blue LED power indicator lights up and within half a second the green connection indicator on the EB500 briefly flashes once.
I open the Arduino development environment (download here) and load up the program I've written. The sketch depends on one external library, NewSoftSerial.
The port settings are 9600 bits per second, 8 data bits, no parity, 1 stop bit, and no flow control. After accepting the port settings, HyperTerminal automatically connects to the EB500. The indicator light turns on solid green, and "Bluetooth: Connected" is displayed on the Arduino serial monitor. This lets us know that the EB500 has set its status pin (8) high and confirms that it is connected. Everything looks good so far! On the netbook, I type some characters into the HyperTerminal window. If everything's working right, they'll appear in the Arduino serial monitor window...okay! Also, the red LED blinks with every character sent. The characters don't appear in the HyperTerminal window because we haven't set the terminal up to echo the characters locally. That's not really necessary. Lastly, I'll send a message back to the netbook. In the field at the top of the serial monitor I type my message and press enter to send it.
And presto, there they are! Lastly, I'll click the "hang up" button in HyperTerminal to disconnect the Bluetooth connection. The green LED switches off and the Arduino sees that pin 8 has gone low, resulting in a "Bluetooth: Disconnected" message.
It looks like the EB500 Bluetooth module is functioning well - maybe the problems are stemming from our PS/2 connector...?
-Ted
The test code follows.
//eb500_test.pde - EB500 Test Program
//Theodore A. Bieniosek
//January 27, 2010
//MEM380-003, Autonomous Vehicle Control
//This sketch was developed to test the Embedded Blue EB500 Bluetooth Module,
//demonstrating simple serial communications.
//Serial settings should be 9600 bps, 8 data bits, no parity, 1 stop bit, and no flow control.
//Utilizes the interrupt-based NewSoftSerial library instead of the built in software serial.
//http://arduiniana.org/libraries/NewSoftSerial/
#include
#define MO 9 //Mode, EB500 Pin No. 9
#define ST 10 //Status, EB500 Pin No. 8
#define TX 11 //Transmit, EB500 Pin No. 4 (EB500's RX)
#define RX 12 //Receive, EB500 Pin No. 3 (EB500's TX)
#define IOLED 13 //Use Arduino's built-in LED to flash when transmitting/receiving
boolean LEDstate = 0;
boolean STATUS;
char data_in;
char data_out;
NewSoftSerial eb500( RX, TX );
void setup()
{
//Initialize data pins
pinMode( MO, OUTPUT );
pinMode( ST, INPUT );
pinMode( RX, INPUT );
pinMode( TX, OUTPUT );
digitalWrite( MO, LOW );
//Start serial connections
Serial.begin( 9600 );
eb500.begin( 9600 );
}
void loop()
{
//Check Bluetooth for incoming data
if( eb500.available() > 0 )
{
data_in = eb500.read();
Serial.print( data_in );
flash();
}
//Check serial buffer for outgoing data
if( Serial.available() > 0 )
{
data_out = Serial.read();
eb500.print( data_out );
flash();
}
//Check for change in status of Bluetooth connection
checkStatus();
}
//Function to check Bluetooth connection status
void checkStatus()
{
boolean previous_status = STATUS;
STATUS = digitalRead(ST);
if( STATUS != previous_status )
{
if( STATUS )
{
Serial.println( "Bluetooth: Connected" );
}
else
{
Serial.println( "Bluetooth: Disconnected" );
}
}
}
//Function to flash the onboard LED
void flash()
{
LEDstate = !LEDstate;
digitalWrite( IOLED, LEDstate );
}










