Thursday, July 26, 2012
Bluetooth Card - Proof of Concept
Bluetooth Card using the MP3 board and source code.
At KansasFest 2009 when Vince Briel (of Briel Computers http://www.brielcomputers.com/) unveiled his MP3 card I was instantly captivated and eager to find out how this cool little card functioned. After learning its little secrets, like many of the other Apple II developers, I saw great potential for enhancing this card into other USB and serial communication uses. During the construction of WALTR, my wireless turtle robot, I had toyed with the idea of running the Bluetooth from a card inside the Apple II instead of the current external setup. There were many distractions to keep me from having a crack at it. That was until this week.
Since I was attending this year's KansasFest event I was asked by a fellow Aussie Apple II enthusiast to bring back one of Vince's MP3 cards. Since Vince did not have any pre-made cards remaining I signed myself in to the kit building session and put the card together. Vince had a few spare MP3 boards which I quickly snapped up. I put forward the idea of a Bluetooth card and after a quick discussion we realised we had the resources to pull this off.
The spare board came in handy (easier than starting from a Veroboard). The Bluetooth module part was sourced from my WALTR project and the rest of the parts were pulled from a few super serial cards. We had finished construction by the end of the kit building session. All that was left was the software and testing.
Unlike the MP3 card which shows a flashing LED when working, the Bluetooth module's working state can not be determined by just looking at it. It does have a LED but that's used to show the pairing status with the other Bluetooth devices. We needed to show that data could be sent over the medium. In WALTR's latest program changes I had one of the LEDs change colour depending on which mode is selected i.e. green equals LOGO and red equals direct control. This was going to be the test case. If the LED turned from green to red after sending the character "2" and a carriage return then we would have our proof of concept.
The following day, between sessions, we worked out what was needed to initialise the 6551 chip and the software was written on the Apple II to perform the test case. The theory was there but the card just would not work. We kept at it and it was way past midnight before we had any indication that we were close. We were delighted when the logic analyser showed pulses coming out of the 6551 chip even though they didn't look quite right. Also using the MP3 software to talk to the card, made WALTR's wheels go nuts. We struggled through the night. Finally at 4am, Eureka, we got the light to go red. So after running on empty, having floppy disk corruption issues, wiring issues, two faulty 6551 chips and programming hiccups it was finally done. It should have been difficult to fall asleep after being on such a high but I passed out faster than I could say "Good night".
Thank-you to my team members Vince, Wayne, Alex, George and Sean in getting this project completed in such a short time. It was truly a group effort. It seemed like the right people came together at the right time. It was great to see. I had a ball. Also a big thank-you goes out to all the KansasFest attendees who encouraged us throughout all hours of the day and night.
In conclusion, the card in its current state needs to be initialised manually (dedicated software). It would be nice just to be able to type "PR#2" and then be able to type in the transmission string. For this to occur, an EPROM would need to be programmed and added to the board. Also in this instance of the project we have demonstrated the use of Bluetooth however it would be just as feasible to use XBee or Wi-Fi. Even though KansasFest is over for this year I know that the brainstorming and discussions will continue and we will attempt to develop this hack into a functional product.