Quantcast
Channel: AlferSoft Blog » scoreboard
Viewing all articles
Browse latest Browse all 2

Scoreboard (Part 3: Final – Communicating with Android and more)

0
0

Scoreboard - FinalThe Scoreboard project is now finished and working!

The idea of this project is pretty simple: control a ping-pong electronic scoreboard from an Android bluetooth-enabled device.
To do this, I used an ATtiny45 which main function is to display the current scores in a VGA monitor while reading from a bluetooth module UART interface waiting for “commands” that will tell it what to display. The Android device sends the commands via bluetooth, running an application specially designed for this project.

As usual, the whole project is open source, including schematics, AVR firmware and the Android application.

Schematic and Board

Schematic and board were made with Eagle CAD software.
Note: In this schematic I’ve used an ATtiny13, because I could not find the ATtiny45 in my Eagle library. As it was said before, in the project I ended using an ATtiny45. I guess the memory of ATtiny13 is enough to run the scoreboard firmware but can’t say for sure.

Scoreboard Schematic

Scoreboard Schematic


Scoreboard PCB

Scoreboard PCB


List of materials
Qty Component Sch. Code Datasheet Price (avg. US$)
1 3.3v Regulator IC1 tlv1117-33 0.79
1 Atmel ATtiny45 microcontroller IC2 2.31
1 Bluetooth module P$1 bluetooth 6.60 (on DealExtreme)
2 104 Ceramic capacitor C1, C4 0.05 (each)
2 10uf Electrolytic capacitor C2, C3 0.05 (each)
2 22pF Ceramic capacitor C5, C6 0.05 (each)
1 20Mhz Crystal oscillator Q1 0.65
1 Led LED1 0.15
1 470R Resistor R1 0.01
1 VGA DB-15 connector 2.28
1 10K Resistor R2
1 Plain PCB / Printout / Iron chloride 3.00

Circuit

Circuit is pretty straight as you can see. An external C/C power supply is needed to power the circuit. There is a voltage regulator so the supply in this case can be up to 15V (I didn’t measure consumption yet). The regulator has its respective capacitors in the input and output, used as filters. The bluetooth module and the microcontroller are connected through a single wire between module’s UART TXD and the PB5 pin of the ATtiny fused as an input (read more on Part 2 of this series).
A blue led with a resistor is attached to PIN24 of the bluetooth module, it will blink while the module is waiting for a connection and keep on when a connection is established, that’s using the default module firmware linvor1.5 that comes pre-programmed from DealExtreme, if you buy a different module or use a different firmware, you will need to review all the pin connections. According to the bluetooth module datasheet (at least the one that is supposed to be the correct one) you should put a 10K resistor from the reset pin to the ground, BUT actually I had to remove it to get the module working, otherwise it won’t even turn on. So DO NOT PUT R2.

The meaning of the pads in the PCB is the following:

  • PAD1: Input supply V+
  • PAD2: V- (ground)
  • PAD3: HSYNC to the VGA connector DB-15 pin 13
  • PAD4: VSYNC to the VGA connector DB-15 pin 14
  • PAD5: RGB to the VGA connector DB-15 pin 1 to 3
  • PAD6: Ground to the VGA connector DB-15 pin 5 to 10

Scoreboard on the breadboard

Scoreboard on the breadboard


Scoreboard on PCB (top view)

Scoreboard on PCB (top view)


Scoreboard on PCB (bottom view)

Scoreboard on PCB (bottom view)


Android Application

Thanks to CarlosBar!!! that made the program for me. He used the Android chat example as a base, changed the UUID to be able to connect using the SPP serial bluetooth (after all is what the DX bluetooth module is, an SPP serial port). Then he designed a nice GUI to control the scores, with an internal stack to support an Undo functionality in case you score on the wrong team.
Also, you can control the scores with the Volume Up/Down keys for convenience.
We have created a public repository on https://bitbucket.org/fvicente/scoreboard where you can checkout the source code.
Also it is available on the Android Market (search for “Scoreboard SPP”), I recommend to check out other CarlosBar project like the excellent TTSAid.

Scoreboard Android Application

Scoreboard Android Application



Related Posts

You can find more details on the ATtiny firmware, the UART communication and the VGA output, on previous posts:
Scoreboard (Part 1: VGA signal from an ATtiny45)
Scoreboard (Part 2: Reading UART from the Bluetooth Module)

Download

Scoreboard Final Source Code
Enjoy!


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images