Introduction: Li-ion Battery Bluetooth Scoreboard
The Project is based on my Instructables from the last year: Bluetooth Table Tennis Scoreboard
The Scoreboard is dedicated for amateur sport fans and table tennis player But it is not applicable just for table tennis. Can be used for other sports like Volleyball, Badminton and each sport which require points counting. By simple software change, software could be adopted to any maximal points value in match.
Technical principle is based on communication via Bluetooth between Table unit (unit under table) and Scoreboard itself. Two Control Boxes are mounted under table on each player side and connected by cable to Table Unit. Player after each winning point press big touch button on Control Box. According that action, score is changed on board to value plus one point..
Comparing to old project there are some substantial improvements:
- Scoreboard is safety. No more main voltage 220V! Power supply consist of two Li-ion battery blocs, each with two batteries, type 18560. Table Unit remain powered by one battery Li-ion 18560.
- Construction is simplified and all components are located on one larger print circuit board.
- Frame is smaller and thinner, about 3.0 cm and size exactly A4.
- Software is a new version with corrected errors.
Large 7-segments display 2.3 inch
Touch control buttons
Software controlled rules according international rules for Table Tennis
Bluetooth transfer data from table to Scoreboard
Battery states indicators
Battery operating time min. 5 hours (Scoreboard), and about 12 hours for Control Panel
Control boxes under table on each player side
Table Unit mounted under table connected to two control boxes Control box with front touch button allow to add score plus one point for each player
Control box with back touch button allow correction minus one in case of mistake
Correction is accepted only for player with the last increased score value
Sound confirmation for each press of button
Different melody sound at the end of game and match
Final score is displayed 10 second after the end of match
End match activates start of a new game by entering to setting mode
Setting allow to select:
- Number of games for match, preset is 3, options 4 to 9
- The first serving player A or B, preset A
- Change side after each game, if side is switched, displayed score on the Scoreboard is switched as well
- IC1 MAX7219 Led Display driver, Led Driver
- IC2, IC3 MAX394 (or MAX333 which is cheaper), 2x, Analog Switch
- U1 Arduino Nano, Arduino
- U2 HC-05 Wireless Bluetooth, HC-05
- X1 Audio module LM386
- Q1 - Q6, IRF540 N-Channel 6 x, MOSFET
- TTP1 - TTP4 Sensor touch small 4x, TTP223A
- LED1 -LED6, 7-segment 2.3", 6x, Display
- LED7, 7-segment 0.56", Small display
- LED8,LED9, led white 2x
- LED10 led blue
- LED11 led red
- K3, K4 Relay TQ2-5V, 2x, Relay
- R1, R2, R6, R16 Resistor 1k 4x,
- R3, R4 Resistor 470 2x,
- R5 Resistor 100,
- R7, R8 Resistor 22k, 2x,
- R9 - R14 Resistor 4k7 6x,
- R15 Resistor 220,
- C1, C5 Capacitor M1 2x,
- C2 Capacitor 10M,
- C3, C4 4700M 2x,
- B1, B2 bridge or jumper,
- P1 - P3, Connectors 6P 2x, 4P 1x, JST XH
- Connectors for displays 2.3 inch, Pinhead
- Speaker 3W
- Double LI-ion Battery 2x, Holder
- Li-ion batteries 4x, 3000mAh
- USB connector, breakout board, C-type
- Screw terminal,
- Switch DPDT, Toggle
- A4 frame,
U1 Arduino Nano, Arduino ,
- U2 HC-05 Wireless Bluetooth, HC-05
- U3 Double switch,
- U4 Audio module, LM386
- R1 Resistor 1k,
- R2, R3 Resistor 22k, 2x
- C1 Capacitor 470M,
- C2 Capacitor M1,
- J1 Double connector, Phone
- Li-ion battery, 3000mAh
- Li-ion battery, Single holder
- USB connector breakout board, C-type
- Switch SPST,
- Speaker 3W
- Plastic box, Box large
Capacitor, resistor, screws and other small parts are available in local stores.
Required main tools:
- Cordless Drill driver
- Soldering iron
- Screwdriver set
- Cable crimping tool
Step 1: Wiring Diagram
Detailed description of complete electrical wiring is shown in original document. This time I would explain just differences.
New battery power supply should replace the old one with two voltages: +5V and -5V. One battery nominal voltage is about 4.2V, this is not enough. We need boost voltage. Battery holder with integrated voltage booster for 5V is good solution. In addition, battery holder contains integrated battery charger and lithium battery protection. This way batteries could be charged inside holder.
For bigger power requirement there are two batteries in each compartment. Here is very roughly calculation without efficiency taking in account: Current consumption is about 300mA for each battery source 5V. By assumption 10 hours operating time we need 1500mAh by 10, it means 15000mAh for 2 batteries. That means 7500mAh for one battery power. It is much more than typical capacity around 3500mAh. To be satisfied with operating time about 5 hours, Li-ion batteries type 18650 with energy 3000 to 4200mAh, could be used.
Problem is battery charging. Both battery packs share one voltage level, we can say ground. Source +5V. by terminal minus and second source -5V by terminal plus. Outputs for both battery packs are connected in series. During charging, power supplies must be connected parallel, if we wont prevent using two external charger. For this reason, relays K3 and K4 are added to electrical diagram.
Relays are activated if charger is connected to +5V.. In this case power supplies are switched from serial connection to parallel. During charging The Scoreboard could not be used, this is a disadvantage. The second disadvantage is relatively long charging time. Charger inside battery holder and added external charger providing 5V, create a not very effective combination. Charging time is over 12 hours. If you plan to charge batteries outside of instrument, you can omit relay and do it faster externally, but less comfortable..
Table Unit and Control Boxes:
New Table unit isnot changed very much comparing to old one. Battery "state" led´and "on" led are not wired from holder to front panel and are visible through holes in side of box. This way is wiring simplified and therefore, this side of box should be front side. Speaker is oriented to this side also.
Instead of two phone connectors for Control Box wires, there is just one double phone connector. Connection to audio module is modified, in order to decrease noise in speaker.
Step 2: Construction
For PCB design I am used to do design PCB in Eagle, but this case was special. PC board is relatively large, size 285 x 206 mm is too much for Eagle, free version. Looking for some other PCB software I have found Easyeda. It is free and accept PCB at any size. Inside the board there are two big cut off for battery holders and one for speaker. Fabrication was done by JLCPCB and all cut off were cut by producer. I was happy, because this save me some work.
If you wont order the board, I have attached Gerber files for two boards Scoreboard and Table Unit board. It is a new version with relays. On the picture in my article there is still old version with relays added on external board, do not be confused.
PCB is placed to A4 frame. I have bought frame for photo in a bigger hardware store. It could be any A4, but should be deep about 3 cm. Board contains holes for mounting and is fitted with screws through plastic brackets.
Front panel is covered by transparent acrylic glass. Under glass is photo paper mask with cut windows for displays. Originally I plan to use milk acrylic glass without mask, but visibility was poor. Finally I put on front, transparent acrylic glass. Holes for battery indicators is not necessary cut, light is visible through paper.
Be careful to keep upper level of components just under acrylic glass. This is especially true for all displays, all led´s and all touch buttons modules. It depends on socket size. For displays I use round pin heads. They are more reliable and height is acceptable. In my case I use distance washers to keep upper level for touch buttons and leds.
Paper musk is done by Sketch in Windows. To make it more lively I insert a photo of meadow..
Status lads lights on battery holder are visible directly through holes in front panel. There are holes for speaker on the same side of Table Unit.
Two cables for Control Boxes are standard 4 wires phone cables. They are attached and fixed in each Box without connector. On the other side of cables, phone connector is fitted by cable crimping tool.
Inside box, wires are soldered directly to prototype PCB. On this board are mounted two Touch Sensors perpendicular, on each side of box. At the site of touch area, there is hole with diameter 12mm, easy accessible. Construction is clear from attached photos.
Step 3: Software
Two Arduino ino files, one for Scoreboard and one for Table unit (Control Box) are below. Bluetooth modules HC-05 must be paired at first. Use Arduino, AT commands and the best instructions are here . In the Scoreboard there is master, slave is located inside Table Unit. Recommended Baud rate is 38400 and address mode as "fix".
Both mentioned ino files should be complemented by common file pitches.h. How to do is on web site Arduino . This time ino files and all other files were loaded to Instructables editor without any problems and I hope would be downloaded easily.
Generally, new files are not very different as old, orginal ones. What is improved:
- In Switch Side mode there are serving player replaced at right moment of game, old problem is fixed
- Correction button is enabled for the last served player only
- Points counting and selection of serving player after correction via touch button in Control Box is fixed.
Concerning Arduino program, I am not a programmer and I know that code could not be perfect optimized, but is working almost perfect.
Step 4: Conclusion
Brightness of 7-segment numbers on displayed photos is faded, but is not true. In fact, It is clear and sharp.
You can see original video, where brightness is OK. On next video1 you can see demonstration of counting points on Battery Scoreboard. Again, on this video there is problem with clear segment light, but problem is caused by strong Lighting during recording video.
There are some ways or suggestions for improvement still. Consumption of current could be reduced by replacing 7-segments displays by TFT LCD displays with size about 2.3". If only numbers would be shown, memory space would be acceptable for Arduino?
I hope you will enjoy this project and sport as well.