# I made a thing! DIYDragy - iOS/Hardware drag performance software



## pyjamasam (Feb 25, 2020)

So not specifically Tesla related, but I tend to hang out on these forums, so I though I'd post here.

First off the obligatory link: https://github.com/pyjamasam/DIYDragy

And some images
















I had wanted to record some statistics about the performance of my Model 3 LR AWD but up here in Canada the real Dragy was a bit pricy for my tastes (especially since I wasn't really planning on using it that often).

So I did what any self respecting geek would do. I built my own. I purchased some 10hz GPS units from aliexpress, and cobbled together some other bits of hardware, then married that all up to an embedded processor that also had Bluetooh Low Energy support.

Then I wrote an iOS app that could talk to this new little device (nice little side effect of BLE vs standard Bluetooth is that iOS doesn't need anything special from Apple to talk to the device), and after a few false starts I got it all working nicely.

I figured there might be other people who would be interested in things, so I posted it all up on github.

The repository has information on what parts you can use to build the hardware (including a little 3d printed case for it), parts list, electrical schematic, the code for the embedded processor, and iOS app code (also this was my first stab at using both Swift and SwiftUI - I always had used Objective-C for the iOS apps I worked on - So that was fun). I have toyed around with the idea of publishing the app to the app store for free, and I might still do that at some point just to make it easier if people just want to build the hardware themselves and then use the published app.

I am open to ideas, improvements, or anything else really. I just wanted to share what I had created with the community.

chris.


----------



## JWardell (May 9, 2016)

pyjamasam said:


> So not specifically Tesla related, but I tend to hang out on these forums, so I though I'd post here.
> 
> First off the obligatory link: https://github.com/pyjamasam/DIYDragy
> 
> ...


Very cool! So you're just plugging the GPS module's serial output to the BLE board, and connecting to that from your app? I didn't realize it could be that simple 
I always thought it was super difficult to have serial comms to an arduino etc from iOS unless you're a big developer.


----------



## GDN (Oct 30, 2017)

Very nice. I know you don't have a Dragy or you likely wouldn't have made this, but any chance you know anyone with one to compare the two devices side by side, or taken it to a track against an official strip time? If you don't use their name and can put it together for $75 or less, I bet you've got a pretty good business.


----------



## pyjamasam (Feb 25, 2020)

JWardell said:


> Very cool! So you're just plugging the GPS module's serial output to the BLE board, and connecting to that from your app? I didn't realize it could be that simple
> I always thought it was super difficult to have serial comms to an arduino etc from iOS unless you're a big developer.


Exactly that ya. I had initially got some normal serial to Bluetooth boards but those don't work without apple's blessing. But BLE boards that are advertising a specific set of attributes work as a UART AND iOS just lets you connect and read/write data.

Its slower then the SPP profile for bluetooth, but with some optimization (and configuring the GPS to only send the data needed an in binary) I was able to get the required bandwidth really low and well within the limit of the BLE stuff.

chris.


----------



## pyjamasam (Feb 25, 2020)

GDN said:


> Very nice. I know you don't have a Dragy or you likely wouldn't have made this, but any chance you know anyone with one to compare the two devices side by side, or taken it to a track against an official strip time? If you don't use their name and can put it together for $75 or less, I bet you've got a pretty good business.


From my testing things _seem_ to be tracking correctly. The software does automated launch detection (watch the interface video at: https://github.com/pyjamasam/DIYDragy/blob/master/Media/Interface.mp4?raw=true to see how that interaction works), and it looks like it's catching the launches correctly (as well as the 1' times). But more testing is always a good thing.

I would love to test against a real Dragy and compare, just need to find somebody with one in the Toronto area to compare with 

As for packaging it up commercially, I had though of that, but ya I'd need a new name for sure. I might at some point still post the app on the app store (and maybe put a donation link/in-app purchase), but (at least with my experience) the hardware side would be a tougher thing for me.

chris.


----------



## JWardell (May 9, 2016)

The test I would like to see is dragy/this 10Hz GPS vs the data I read from the car..I do times looking at the speed signal, start at 0.1 and stop at 60.1. And might as well compare to the car's GPS speed data as well.
@All About Jake is adding support for my server to read the data, so technically we have all we need to simultaneously log and compare these signals on iOS


----------



## pyjamasam (Feb 25, 2020)

Once I get my CANserver hardware I'll code up some tests. (I was already thinking about adding a BLE board to your hardware and see what kinda bandwidth I can push through it  )

chris.


----------



## NightStorm (Aug 19, 2018)

Cool project.

How accurate is the car's speedometer? I've often wondered if one could just make a phone app that watched (and timed) it change.


----------



## AGVI (12 mo ago)

pyjamasam said:


> So not specifically Tesla related, but I tend to hang out on these forums, so I though I'd post here.
> 
> First off the obligatory link: https://github.com/pyjamasam/DIYDragy
> 
> ...


Will this work with the C3 Corvette?


----------



## pyjamasam (Feb 25, 2020)

AGVI said:


> Will this work with the C3 Corvette?


Hahahaha..

I saw this message come in in my email and was like... "Oh ya totally it will work". They I finally got around to coming to the forum to post the reply. Here is a transcript of my thought process while preparing the reply.

"Oh cool, somebody asking about a C3... Nice I had one a while ago"
"Wow its silver. Just like mine!"
<clicks on image to make it bigger>
"Woah it looks really similar"
"Hey it has the same crappy nose damage as mine did"
"Hmm. Those people in the background look really familiar"
"Hey those other 2 cars look familiar"
"Wait that guy looks a lot like me"
"Bahahahahaha - Holy crap that is me and my car"
"Wait WTF"
"<looks at profile> Whoooo posted this? Hmmm, where did they get this image?"

Hahaha.

Ok. So really, who are you and why do you have this pic?

chris.


----------

