##### Calculations

**FINAL, CORRECT CALCULATIONS:**

People need to enter their weight to calculate the right amount of calories.

**Calories burned** = (speed * time) * (1,05 * time) * 60 [average person weight]

**Energy produced** = time [in seconds] * 0.0008 [3W energy produced by the dynamo, divided in seconds]

**PREVIOUS CALCULATION ATTEMPTS, CONFUSION AND NUMBERS:**

Despite I graduated from a Second Level College of Science, math and physics have never been my favourite subject. So this is surely one of the most boring phases of the project, where I struggled the most. Here I reported some notes and calculations which I did arriving in the end to the final “correct” calculations written above.

I must say that also the formulas above are quite approximative, to calculate the right amount of energy produced the speed should be calculated as well, while to get the right amount of calories burned a person weight it’s not enough, other information are indeed needed to do such calculation. However, adding that I would just destroy the user experience of the interaction and, anyway, I do not need to be extremely precise, that’s not the point of my project.

Just to begin I found an example of someone using a reed switch, as per the (second) video showed in the previous post.

The Arduino code is the shared online and from that it’s possible to get three values *Rotation Per Minute (RPM)*, *LastSeen*, and *two ave* ( I still have to understand what the last value means).

I also started to look into stepper motor, to understand how they actually works. Eventually, the solution was suggested by my university tutor Tom, using hall effect sensor. I explained this in another post.

I found out how to calculate RPM with hall effect sensor:

The magnet passes by the hall effect sensor producing a pulse every revolution, then I’ll take the output of this sensor to a microcontroller and use it to trigger a timer and measure the time between pulses. So you get one pulse for every revolution and you can measure that time between pulses and you can figure out how fast the wheel is turning around and convert it to revolutions per minutes (RPM).

In the end, however, I didn’t even need RPM, I could calculate the speed in a much easier way, again this is explained in the other blog post.

**Calories consumed:**

To calculate the Kcal consumed I had a look online to many systems to calculate and eventually, probably one of the most simple was this treadmill calculator.

Being simple, it’s surely not the most precise, as most of the devices ask many information, such as gender and age. However I found an equation which takes in consideration only distance, time and weight, for a variable, 1.05.

So first of all in order to find the distance is to convert the speed from RPM to MPH so a rotational speed to a linear speed.

The formula is:

The RPM to Linear Velocity formular is :

**v** = **r** × **RPM** × **0.10472**

Where:

**v**: Linear velocity, in m/s

**r**: Radius, in meter

**RPM**: Angular velocity, in RPM (Rotations per Minute)

60*distance*1,05*time

d=distance in km, t= time in seconds, considering a weight average of 60kg and 1,05 which is simply the number resulting from the equation found on some treadmill calculator websites such as 345km

To calculate calories burned I need to know the weight of the person, the first ideal solution would be to measure the weight as soon as a person steps on the wheel. For this a load sensor it’s needed, however I but How do I measure the weight? Load sensor can measure up to 50kg.

**Energy produced:**

The bicycle dynamo used produces 3W per minute, so dividing it in seconds it would be 0.0008 * seconds.

0.0008 = 3kWh/3600 (kWh per seconds)

1 hour =3600 seconds

0.0008 * seconds = x kWh

I could write this in Joules to give a bigger number (0.05 kWh= 180000 J), but the idea is also to show people how difficult it is to generate energy and also a critic in it, showing how much they usually waste without giving any value to it. It is a bit the same discourse with calories, until when people didn’t know how difficult was to burn 100 calories, nobody was really caring at the calories content in a meal.

**Can I actually charge a phone?**

Finally, I wondered about another other (quite important) issue: whether I could actually generate enough energy to charge a phone with a bicycle dynamo, and besides there are some videos online of people charging phones cycling I preferred some scientific support, which I found in the paper of J. Sandhu, A. Edgington, M. Grant, N. Rowe-Gurney, University of Leicester. Power generation from cycling. This paper considers the possibility of power generation, using a bicycle dynamo, in order to recharge a mobile phone. The results showed that a cyclist would need to be travelling at approximately 1 mph in order to provide enough electrical power to charge a typical mobile phone