Australian Demo Jam as part of the Mastering SAP Technologies conference is all wrapped up for another year and I don’t mean to boast but WE WON!!!

Once again some great entries from all the teams and everyone approached the contest quite differently.

This was our second foray into demo jam and follows up on our SAP Cannon concept from 2 years ago. Check out my cannon blog from last time.

SAP. Air Cannon. Together? (and we won!!)

I’m not sure that we’ll ever have more fun that building and playing with cannon but it was time to send it to the shed and come up with something new!

This year’s entry was a bike race! The bike race was basically the old daytona car race but for bikes (and using Hana).

You’ll notice a theme to our Demo Jam entries in that they involve technology and the real world. We believe technology should be an enabler and it should be used in clever and practical ways.

South Australia (where we live) has a professional cycling race called the Tour Down Under and so we’ve invented the Tour Down Hana. We’ve simulated a 4 kilometre bike race with synchronised video footage and real time analytics. The faster the teams ride, the faster the video moves.. As the team of riders move through the race, we also simulate the ups and downs based on the current elevation and apply pressure to the bike using linear actuators.

Looks firstly talk high level….

  • Using embedded electronics (which we built and programmed) we counted the bike wheel revolutions
  • Revolutions are sent to our Hana system every second
  • Based on the revolutions, we’d either speed up or slow down the video
  • The bikes distance is calculated and then we determine the gradient and return it to the embedded electronics
  • Gradient is applied to bikes using a linear actuator
  • Near real time analytics provides an overview of the race – distance, speed, position on google map

/wp-content/uploads/2015/05/approach_710852.jpg

Lets talk through how we put all this together.

1. The Track

/wp-content/uploads/2015/05/ui_710659.jpg

We’ve recorded the 4 km track using a go-pro to provide the video file for the race and compressed it into an OGG file. Simultaneously, we data logged the elevation and Lat/Long every second.

2. The Bikes

The bikes were mounted to bike trainers that had the ability to apply resistance. We attached linear actuators to the bike stands that would pull the resistance cable or release it in order to apply the resistance. A photo interrupter was attached bike and we used that to count the revolutions – a little like a normal bike computer. Our custom electronics, electronically identified a revolution and it was recorded by the embedded controller ready to be sent to Hana.

bike.JPG

3. Embedded Web Server & Controller

Once again we’ve used a Parallax Spinneret embedded Web Server (parallax.com). The Propeller chip that can run 8 parallel processes (cogs) and we use these to run a real time clock, counts the revolutions, move the actuators and run the embedded web server. My colleague John Schultz is now a guru of Spin, the development language used to program the controller. Spin is a very low language and so John had to take care of everything, DNS, DHCP, web server, sockets etc. Its been a huge learning curve to program the controller to post to our Hana XSJS services and manage inputs and outputs. The call to Hana is a simple HTTP Post but not simple when you’re no far above machine code. The controller, tracked the revolutions from both bikes in memory, and every second would post the results using JSON format into Hana.


/wp-content/uploads/2015/05/electronics_710887.jpg

(sorry about the Think180 plug but its the only photo I have of the electronics box)


4. Hana

Hana is the heart of the solution as the only information that we have from the bikes are the number of revolutions in a second. Hana provides storage of the revolution data. We also store the race details including elevation, lat and long. The data is sent to hana via an xsjs service and we found this to be very fast as we don’t have time to mess around when we post every second. Our service also returns the gradient based on calculated distance of the bike (to apply force on the linear actuators). We deliberately tried to keep the service payload as small as possible.


Demo Jam should be about crowd participation and so we provided a simple UI5 registration page on hana for the rides to sign-up.The riders were divided into two teams of 8 in the code..


Hana was the source for our analytics and we developed a number of analytic and calculation views.



5. User Interface

The race user interface was built with SAP SAPUI5. SAPUI5 Table controls for the riders were connected to an OData Service. The clock was a JavaScript Clock (flipclock.js) has a interval call back (every second) which called a HANA XSJS Service to get the current speed every second. The videos were embedded in screen and java script controlled the speed. The UI called back via service to the database to determine the distance and every second and applied the necessary changes to the speed of the video (via javascript)


/wp-content/uploads/2015/05/ui_710659.jpg



6. Analytics

The analytics were delivered using SAP Design Studio looking to hana for the data. We had a few false starts in this space as we found that deploying graphs on to the Hana platform did not work well and was not the same as executing locally. Apparently 1.4 does not have full charting functions when executed off Hana….very frustrating. We quickly had to deploy a SAP BO server and run the design studio analytics off their. Worked very well in the end! We used the new real time components which provide the ability to fresh the data every second from the source without re-rendering the whole page. Version 1.4 doesn’t provide the quality of mapping the required and so we developed our own custom google maps component using the flight path API. The mapped looked pretty impressive in the end.




To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply