Of stackmats and smartphones

jfly

Regular
Joined
Aug 23, 2008
Messages
226
Location
California
WCA ID
2005FLEI01
YouTube
Visit Channel
Hey all! I got something working this year that I'm very excited about. Check it out!


This was not easy to do. If you're interested in the details I wrote a blog post detailing the whole saga.

I intend to continue working on this until we have enough infrastructure to start using this in competitions :).
 
Last edited by a moderator:
:p I also did this two years ago.
9345d688d43f879460e171dfd21b0ef41bd53a20.jpg
 
Last edited:
After browsing a bit in the internet I've found this, seem's interesting.
I don't have an android phone, but I tried it in an emulator, and it has stackmat options (and the code also contains stackmat related things)... I'll try borrowing a phone to test it.
 
This reminds me of an idea I had. Since I can code in Java.

Code a timer in my, device, I only have an iPod Touch that doesn't run Java. So either I'm getting an Android or I'm using Jailbreak tools. Then when you stop the timer it sends it to my computer. This is defiantly possible using Packet-Objects and Sockets in Java to connect a computer and iPod or whatever together to send Packets within. Then I can store all my times and what-not on my computer. And have it synced to my iPod.

I made a timer in Java for Rubik's Cubes. I kinda quit coding it, but I should really make it better.

Good job, by the way. I hope your device can get implemented.
 
Last edited:
Congratulations on getting this working! Even better post summarizing it too.
I've been looking into doing something like this, seems now like I was heading into a larger minefield than anticipated. I can't wait to see what this turns into now, if you find a way to get the chip made, this is going to be huge.

Nice to see a live demo of this!
This is particularly joyous to witness considering you wanted something like this for ages.
Great work!
I almost posted that same link, and lo, it is awesome cool!
 
Nice! Details? What kind of phone is that? Is the stackmat plugged directly into your phone?

Yes. I used an Android phone (HTC Desire-Z) to connect the stackmat, and the signal seemed very nice.
signal.png
Then I copied some codes of CCT to my timer app, and finally it worked well.
 
I did a post in the forum years ago with a video of a stackmat connected to my computer in the USB-port. For some month ago a tried the same cable on a phone and tablet with a USB host cable (OTG cable) and it worked real nice.

 
Last edited by a moderator:
I did a post in the forum years ago with a video of a stackmat connected to my computer in the USB-port. For some month ago a tried the same cable on a phone and tablet with a USB host cable (OTG cable) and it worked real nice.
How exactly did you go about reading the signal of the stackmat to produce the string?
Just read from serial that exact number of bytes?
 
How exactly did you go about reading the signal of the stackmat to produce the string?
Just read from serial that exact number of bytes?
The stackmat sends out serial data. In the usb-cabel (I give my friend creed for that one, both know how to do and some soldering) there is a chip that creates a "virtual com port". It uses a standard driver witch is available on Windows/Linux/OS X. This chip is reprogrammable so my friend configured it to invert the signal. In the phone/pc you just read serial data on right baud rate. I have thoughts about to get hold of a bluetooth-unit that a can connect to the cable instead of the host-cable. With that I should be able to read the signal on all smartphone (and many "dumbphones") wireless and not be dependent on working drivers of the cables chip.
 
This reminds me of an idea I had. Since I can code in Java.

Yeah, there are potential applications for this outside of competitions. Anyone who wants to use the android library I created is more than welcome to (https://github.com/jfly/fskube/tree/gh-pages/android). Without the board, it will only work on a select few smartphones (see http://www.jflei.com/stackmat-phones/). For now, I want to focus on changing the way we run competitions.

Yes. I used an Android phone (HTC Desire-Z) to connect the stackmat, and the signal seemed very nice.
View attachment 4499
Then I copied some codes of CCT to my timer app, and finally it worked well.

Yay CCT! If you still have the phone, could you record a bit of the signal and send it to me? I'll put it up on http://www.jflei.com/stackmat-phones/ so we have a record of it.

This is really neat! Also pro timer compatibility ftw. If you ever start some sort of kickstarter, I will definitely support it. ;)

Thank for the kind words. Current plan is to move forward with phones that don't need the chip, but I am looking into mass production on the side, so people can use this with any smartphone they own.

The stackmat sends out serial data. In the usb-cabel (I give my friend creed for that one, both know how to do and some soldering) there is a chip that creates a "virtual com port". It uses a standard driver witch is available on Windows/Linux/OS X. This chip is reprogrammable so my friend configured it to invert the signal. In the phone/pc you just read serial data on right baud rate. I have thoughts about to get hold of a bluetooth-unit that a can connect to the cable instead of the host-cable. With that I should be able to read the signal on all smartphone (and many "dumbphones") wireless and not be dependent on working drivers of the cables chip.

Daniel, I'm so sorry for not mentioning your USB cable in my post! It honestly completely slipped my mind. The reason I wanted to go through the microphone jack is to have an option for iPhones. However, now that I'm just interested in building something for competitions, buying a bunch of cheap Android devices and connecting via USB becomes a real option, if your cable can be made for less than the cost of producing the board we made. Any idea how much it costs? Just curious, does the microcontroller in the cable need a battery, or is is powered over USB?
 
After browsing a bit in the internet I've found this, seem's interesting.
I don't have an android phone, but I tried it in an emulator, and it has stackmat options (and the code also contains stackmat related things)... I'll try borrowing a phone to test it.

I'm not sure about the details, but if I remember correctly, DCTimer is a popular timer in China (I recall a forum on Baidu Ba about it). Never knew it read StackMat signals. I don't have the cable to connect the stackmat, I'll try to obtain one. Looking into this...

Update:
Found this post on the functionality: http://tieba.baidu.com/p/1835672089
If you look at the fourth post, the app apparently allows you to choose the sampling rate
Anyway, if anyone wants to test to see if it works, the apk is in the link primarycuber posted.

Update 2:
Downloaded the app, here's a screenshot of the stackmat settings:
Screenshot_2014-09-14-14-21-40.jpg
 
Last edited:
I'm not sure about the details, but if I remember correctly, DCTimer is a popular timer in China (I recall a forum on Baidu Ba about it). Never knew it read StackMat signals. I don't have the cable to connect the stackmat, I'll try to obtain one. Looking into this...

Update:
Found this post on the functionality: http://tieba.baidu.com/p/1835672089
If you look at the fourth post, the app apparently allows you to choose the sampling rate
Anyway, if anyone wants to test to see if it works, the apk is here: http://pan.baidu.com/s/1rQqke

Update 2:
Downloaded the app, here's a screenshot of the stackmat settings:
View attachment 4516

I tried it out with a borrowed phone, but unfortunately it didn't work (2.5-3.5 jack cable, it works on my computer with prizma for example).
I'm not sure if it's the app's fault, 'cause it doesn't even recoginse that the timer is plugged in, it might be an issue with the cable/phone jack input not recognising mic properly.
The timer itself seems really cool, so if somehow it can be connected to the stackmat, I'm definately buying an android device...
 
I tried it out with a borrowed phone, but unfortunately it didn't work (2.5-3.5 jack cable, it works on my computer with prizma for example).
I'm not sure if it's the app's fault, 'cause it doesn't even recoginse that the timer is plugged in, it might be an issue with the cable/phone jack input not recognising mic properly.
The timer itself seems really cool, so if somehow it can be connected to the stackmat, I'm definately buying an android device...

What kind of phone? Send me a recording of the signal, and I'll upload it to http://www.jflei.com/stackmat-phones/.
 
I tried it out with a borrowed phone, but unfortunately it didn't work (2.5-3.5 jack cable, it works on my computer with prizma for example).
I'm not sure if it's the app's fault, 'cause it doesn't even recoginse that the timer is plugged in, it might be an issue with the cable/phone jack input not recognising mic properly.
The timer itself seems really cool, so if somehow it can be connected to the stackmat, I'm definately buying an android device...

More details: I tried with the wrong cable (what I use for my computer), so no wonder it didn't work :)
jfly kindly pointed out that I'd need something like this.
If I can get one, I'll try to investigate the app a bit more.
 
Back
Top