Custom smartphone App / Data logger

benj

100 W
Joined
Jun 6, 2013
Messages
242
Hey everyone,

Seeing as I make mobile apps for a living, I decided to combine my job with my hobby, and I started making a custom iPhone app and hardware for some data logging.

The overall plan is to try and make something really useful and the end goal is to open source everything talked about here :)

It all started with Apple's new iBeacon technology which I was playing with, then I glanced over at my board, and had the eureka moment. With some pretty basic tinkering, I have the following setup all working:

- Turn on my electric longboard
- It automatically wakes up your phone with a notification, and tells you the current battery voltage, charge %
- Tap the notification, and it launches the app. You can see battery stats and estimated range.
- Tap Start button, and it records your GPS route, displays it on a live map, and shows speed graph. Tap Stop and your session is saved.

So far, it's very cool. It's so great to have the phone wake up when the board is turned on :) Here are some pics:

bleShield.jpg

This picture is old - I don't use an Uno and shield anymore - see below.....
goCatApp1.PNG


The current list of hardware is super simple:
- Arduino Uno
- Red Bear BLE Shield
- A few wires

Note: As of June 2014 I ditched the Uno and Red Bear shield in favour of a LightBlue Bean. It's much smaller and hugely better!:
http://www.punchthrough.com/bean

Now comes some trickier stuff, and I'd love anyone to help and get involved. I'm no good with circuits and I think this project could benefit from someone who is!

Currently, I only measure one lipo cell through the balance plug. This is good enough for people who balance charge, but I'd love to monitor each cell and feed that back to the app.

I would also love to see currents/amp draw coming through, but no idea on how that would work. I've seen some ESCs with great data logging, like temperature, motor RPM. I'm not trying to compete with ESCs like that - this is just a fun project!

Open to all suggestions - what would you like to see being reported back? And what other killer features would you want in something like this?
 
Nice project.

Check http://endless-sphere.com/forums/viewtopic.php?f=35&t=46202&start=25
Things did amazing things there, but I don't think he's still very active on here.

I'd love to learn about this stuff! Can someone recommend me a course or manual or something to get started? I have basic electronics knowledge. Maybe on coursera.org or edx.org ?
 
Couldn't find vidometer on android. I found alaprecorder and alaprecorderhd which looks like it is used for racing cars, might work. They don't look to have been updated since 2011 though. I guess if it works why change it.
 
Thank you Bose, that's really helpful for an electronics idiot like myself :) Seems great for the job. I see the ACS758 goes up to 200A and the price is very good.

I'll also be looking at some thermistors, one on the ESC and one for the motor, something like this: https://www.sparkfun.com/products/250.

Just need some time, life got busy and not much hobby time right now!
 
Cool idea.

Current sensing is a key parameter. From this, you can accurately estimate range based on the battery capacity. Remaining battery could be displayed like a gas gauge or bar graph. Starts blinking red when you get low.
Individual cell voltage monitoring would be cool, but probably difficult to implement and generally not so important if the pack has its own BMS.

Don't most phones have some kind of accelerometer? Not sure how important that is, but might be good to data log and compare to power consumption.

Speed could be determined from sensing one of the motor hall lines or from a bike speedometer sensor. I'm not sure how accurate the speed from GPS is on a phone.
 
Dude I'm buying the Arduino Uno!

It's on sale on conrad in Belgium at the moment :)

Are you willing to share your stuff later on? :) because I'm new at this.
 
Finally got some spare time again for an update to this project.

I've ditched the Arduino and Red Bear BLE shield in favour of this little beauty:

http://www.punchthrough.com/bean

It's a tiny Arduino with Bluetooth 4.0 (BLE) built in. It's also got a battery, accelerometer and thermometer on it - all in a tiny board about the size of your thumb :) I highly recommend it, so far I'm very impressed. It runs standard Arduino code, and makes Bluetooth stuff super easy.

I've got it wired up to an AttoPilot Voltage and current sensor:

https://www.sparkfun.com/products/10644

This can read up to 50 volts and 180 amps, so should suffice for most eBoard projects!

Here's a pic of my quick and very dirty setup to test everything is working:

Bean_Atto.jpg


A few lines of code and I now have amps and volts going wirelessly back to my iOS app for datalogging :D A quick test was reporting 0.2 amp draw when stationary and about 6amps on WOT with wheels in the air. That sounds about right....anyone got any ideas how I can test for accuracy?

Next job is to plastidip the AttoPilot and fix it up to the Bean properly. Then it's time for some testing, which means riding my board some more :)
 
this is really cool...

so could it control throttle of speed controller using BT?
 
Yep, indeed it could. It runs Arduino code and has pretty much the same pins as a standard Arduino and we've seen plenty of work here lately on getting ESCs working with that platform.

The only possible problem is that these aren't fast chips and doing more than one thing can be hard. Especially when you have to have precise timing to pulse an ESC. I reckon it would be fine though
 
Hey benj could this bean blue radio be used to pair with some other ble radios which transmit data from their cell sensing data. See flytron icell. So the icell normally transmits to an iPhone but i want to create a standalone arduino solution instead of the expensive phone on your handle bars idea. I hope you understand my question.
 
Hi, yep I understand. That iCell is pretty neat.

I don't think this is possible. The Bean is not able to act as a Bluetooth host so the iCell wouldn't connect to it. It might be possible in the future as the Bean is still being developed....fingers crossed.

I'm sure you could use the Bean and some other circuitry to do cell monitoring like the iCell. That's a bit beyond me right now but I don't think it would be too hard.
 
benj said:
Yep, indeed it could. It runs Arduino code and has pretty much the same pins as a standard Arduino and we've seen plenty of work here lately on getting ESCs working with that platform.

The only possible problem is that these aren't fast chips and doing more than one thing can be hard. Especially when you have to have precise timing to pulse an ESC. I reckon it would be fine though


PLEASE TELL ME THIS WILL WORK!

Zeemote JS1
9937-222424-Zeemote-JS1.jpg


The Zeemote JS1 is a Bluetooth joystick with a thumb joystick and 4 buttons with assignable actions. It looks like a Wii nunchuk. You can use it as two joysticks, for example, one to aim and one to move. Its battery life is excellent.

The Zeemote is compatible with any Android from 2.1. It also has a free app for setup and configure bluetooth on your smartphone.
source: http://www.techulator.com/resources/9937-Top-5-best-joysticks-play-games-your-Android-device.aspx

images



Bean-against-box-1024x597.jpg


images


MAYBE YOU DON'T EVEN NEED THIS BIT?
galaxy-s4.jpg


images


ANY SPEED CONTROLLER?
10370.jpg


069639-blue-metallic-orb-icon-alphanumeric-equal-sign.png


dv1752996.jpg
 
Back
Top