Raupino, an Arduino clone for DIY hobbiest

Raupino including the nRF24L01+ module and the digital temperature sensor DS8B20. The box-headers, the LED, the voltage regulator, the voltage divider and the analog sensor are not used in this configuration.

Raupino bottom

Design goals

  • DIY assembly: the components can be hand-soldered. SMD (0805) are used for most capacitors/resistors. For all other components through hole components are used.
  • Cheap: Dual layer PCB with the dimension 50mm x 50mm. The majority of the components are sourced from TaydaElectronics.
  • Battery: The design includes the possibility to use the Raupino with a voltage regulator or without by powering it directly from the battery. The user can select this by setting a jumper.
  • Wireless: A header for the nRF24L01+ module is included.
  • Modular:
    • Can be used with the box-header system (all credits go to Manicabug for his great idea)
    • Can be used with customized shields, shields can also be created with standard 0,256mm (0,1″) spacing.

Continue reading

Interfacing an AT-command capable phone (Sony Ericsson T630) with Arduino and incoming call number identification

Motivation

Use the cellphone “Sony Ericsson T630” to make and receive calls using Arduino. Especially of interest for me is the caller number identification.

Some advantages of using an old AT-command capable phone:

  • No Internet connection is needed, only GSM connectivity
  • No main power needed, can run on battery
  • Low cost, because the phone is old and receiving calls are free

Wiring

Connect the Arduino with the phone:
The pinout of the phone can be found at: http://pinouts.ru/CellularPhones-P-W/erics_t28_pinout.shtml
Three pins are of interest: data in (4:RX), data out (5:TX) and ground (10:DGND)

T630 connector

Wires are directly soldered to the pins

Connect the wires (Arduino <–> Phone):
Arduino GND <–> phone pin 10 (DGND)
Arduino pin 10 (RX) <–> phone pin 5 (TX)
Arduino pin 11 (TX) <–> R <–> phone pin 4 (RX) <–> R <–> Arduino GND

Notes:

  • R stands for resistor and the value should be 330 ohms. They are used to divide the voltage.
  • Verify the voltage between phone GND and phone TX. It should be about +2,6V
  • Software-Serial is used to connect the Arduino to the phone. The Hardware-Serial (pin 0 and pin 1) is used for debugging output.

Software

#include <SoftwareSerial.h>

#define rxPin 10
#define txPin 11

SoftwareSerial mySerial(rxPin,txPin); // RX, TX

void setup(){

  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  Serial.begin(9600);
  Serial.println("Arduino serial initialized!");
  delay(10);

  mySerial.begin(9600);
  Serial.println("Software serial initialized!");
  delay(10);
}

void loop(){
  issueCommand("AT");
  readSerial();
  delay(500);

  issueCommand("AT+CRC=1");
  readSerial();
  delay(500);

  issueCommand("AT+CLIP=1");
  delay(500);

  //call number 123456
  //issueCommand("ATD123456;");

  while(true){
    readSerial();
  }
}

void issueCommand(char* msg){
  mySerial.println(msg);
  Serial.print(msg);
  delay(10);
}

void readSerial(){
  while (mySerial.available()){
    Serial.write(mySerial.read());
    delay(10);
  }
}

Expected output:

Arduino serial initialized!
Software serial initialized!
ATAT+CRC=1+CRC=1
OK
AT+CLIP=1+CLIP=1
OK
+CRING: VOICE
+CLIP: "+43XXXXXXXXXXX",145,,,"Michael Rogger"
+CRING: VOICE
+CLIP: "+43XXXXXXXXXXX",145,,,"Michael Rogger"

The magic AT-command AT+CLIP is activated before the phone is called, otherwise the number will not be identified!

Possible use cases

  • A garage door opener. A caller is identified by its number (white list), if found in database the garage door will open.
  • Power on/off a AC system. If a caller is identified by its number (white list), a relay could switch on/off any device.
  • Power out notifier. If the electricity on the main line is out (AT command to check if the phone is discharging) the phone can call a number or send an SMS. Might be useful to notify a person that all the stuff in the fridge is at risk.

Sources

Arduino and T210: http://forum.arduino.cc/index.php/topic,22411.0.html
Pinout: http://pinouts.ru/CellularPhones-P-W/erics_t28_pinout.shtml
AT commands for Sony Ericsson cellphone: http://www.daimi.au.dk/~jones/sms/packed/dg_at_r3a.pdf

Debug ATTiny 45/85 with Arduino

Arduino can be used to program ATTiny 45/85. In order to get any debug messages from ATTiny you can use Arduino UNO also as a serial monitor. “Coding Badly” did an excellent job to create a communication bridge between Arduino and ATTiny. Software serial and his Knock-Bang protocol are supported. The usage of the Knock Bang protocol is described here.

Prepare the Arduino

  • Download TinyISP https://github.com/Coding-Badly/TinyISP/
  • Copy the extracted folder to Arduino sketch folder
  • Start Arduino (Software). Click File -> Sketchbook -> TinyISP
  • Switch to “_TinyISP_BuildOptions” (Tab)
    • Add the line “#define RELAY_KNOCK_BANG_ENABLED 1” before “#endif”
  • Switch to “TinyISP” (Tab). Make sure to have selected the Arduino UNO board and upload the sketch.
  • To test the monitor:
    • Open “Serial Monitor”, ensure baud rate 19200 is set
    • Enter “!” to start/stop monitoring

Install Knock-Bang library

Test ATTiny Arduino communication

Select ATTiny 45/85 board and upload the following test to your ATTiny.

#include <TinyDebugKnockBang.h>

void setup( void )
{
  Debug.begin( 250000 );
}

void loop( void )
{
  Debug.println( F( "Hello G! " ) );
  delay( 1000 );
}

Open Serial Monitor and enter “!”. You should see “Hello G!”

Sources

http://arduino.cc/forum/index.php/topic,123388.30.html

Programming ATtiny 45/85 with Arduino and feedback LED’s

There are several guides around that describe the process of programming an ATtiny 45/85 with an Arduino. This post can be considered as a small extension, therefore read and follow the reference guide from high-low tech (MIT media group) at http://hlt.media.mit.edu/?p=1695 first.
What I changed: I used an 100uF capacitor, simply because I had no 10uF around. I think a higher capacity doesn’t hurt, as long as the max voltage of the capacitor is well above the +5V (mine has 100uF and max. 16V).
What I added: 3 LED’s which give you visual feedback of the Arduino ISP. A green LED states the heartbeat, a yellow LED will light up when the ATtiny will be programmed and the red LED indicates an error during programming.

Wiring

From the ArduinoISP file I quote the cabling for the mentioned LED’s:
// Put an LED (with resistor) on the following pins:
// 9: Heartbeat – shows the programmer is running
// 8: Error – Lights up if something goes wrong (use red if that makes sense)
// 7: Programming – In communication with the slave

Programming ATtiny with Arduino and feedback LED's

Programming ATtiny with Arduino and feedback LED’s

Observations

  • When you start the upload the red LED (error) lights up for a short time (~100ms), but everything works normal and afterwards the yellow LED (programming) blinks as expected.
  • If you have programmed the ATtiny with internal 8MHz, but the delay time is about 8 times higher, then you forgot the following step. To fix this issue (also stated on MIT website I referenced) you need to “burn” the bootloader by selecting the correct board under Tools -> Board -> ATtiny45/85 (internal 8MHz clock) and then execute Tools -> Burn Bootloader.