
PEO is a little energy device that limits your computer usage time to a value generated from the distance you traveled with your bicycle in advance. It raises awareness for the amount of time spent in front of computers nowadays and forces its users to seek physical exercise in compensation for their “screen hours”.
The Idea
The excessive use of computers is a common problem in todays connected world. Many jobs require the use of personal computers throughout the work day and also our spare time is frequently spent at home in front of computers or similar technical devices, whereas our time spent on physical activities decreases. This can lead to a lack of social interaction and can ultimately cause health problems.
While it is not possible to simply reduce the time of computer use for anyone, e.g. computer scientists, a way of mitigating this problem is to find the right balance between computer use and physical exercise. However, as is generally known, regular sportive activities require a certain level of self-control, therefore our idea was to create something that supports people with keeping that balance between computer use and being outside and doing sports.
The Scope
Following the topic of the course “outdoor electronics”, PEO is mobile and even encourages its users to go outside and rewards exercise with a raising energy level. Furthermore, PEO combines the two subtopics “distance” and “energy awareness”:
- Distance: The distance you travel with your bike has a direct impact as it increases your virtual energy level
- Energy Awareness: The virtual energy level serves as a metaphor for time as a limited resource that is wasted in front of a computer which should rather be used more consciously.
The Interaction
PEO allows no direct interaction, but can be influenced in two ways:
- By using the computer with PEO connected, PEO’s energy level is constantly decreased
- When riding your bicycle with PEO attached, its energy level can be increased again
Trough color and luminosity change, PEO provides visual feedback about its energy level as well as the mode it currently is in (for a detailed explanation, see next paragraph “Technical realization“). A more precise feedback on the energy level change can be achieved by using the PC application. When PEO’s energy decreases, it slows down the mouse speed of the computer it is connected to. At zero percent, the mouse speed is set to the slowest possible mouse speed on Windows computers. While at this speed it is not entirely impossible to work, operating your PC becomes so annoying that you will want to stop using your computer and recharge your PEO again.
Technical realization
PEO contains an Arduino (Uno) programmed to be in one of three states:
- Connected to the bike:PEO knows that it is connected to the bike thanks to a reed switch in its base plate. The bike mount holds three magnets that serve two purposes:
- They hold the PEO in place when attached to the mount
- They activate the reed switch connected to an input pin of the Arduino, so that it knows that the orb is connected to the bike.
When connected to the bike, PEO keeps glowing all the time. That serves as feedback that it is connected correctly and shows the current energy level so that changes can be seen without delay. Only in bike mode, the Arduino will listen to input from the revolution counter on the bike. The internal energy level is increased with every revolution of the wheel and PEO changes its color to represent the current energy level.
- Connected to the PC: When connected to the PC, PEO is powered by current from the USB port instead of its built-in battery. On the PC a little python program pings the Arduino in a short time interval over a serial connection. The Arduino checks for incoming messages and sends an answer back when it receives a ping. This ensures that Arduino and PC know that they are connected to each other. Both will switch to the “disconnected” state when they don’t receive messages for more than a few seconds. While the PEO is connected to the PC, the lights stay on all the time. The PC program sends a message to the Arduino every few seconds to decrease its energy level. The Arduino then sends back its updated energy level so that it can be shown in the energy level monitor application on the PC.
- Idle: PEO changes to this state when it’s neither connected to the bike nor to the PC. To save energy, the lights inside won’t stay on all the time, but will flash every few seconds to show the energy level.
To prevent a loss of your current energy level when the battery runs empty, PEO automatically saves its energy level to the non-volatile EEPROM of its integrated Arduino and restores it on restart.
The Circuit
The Code
Problems encountered
In its first draft, PEO was intended to consist of two orbs instead of one. One smaller orb should be kept attached to the bike and the bigger one to the PC at home. The idea was to only carry the smaller one to your PC to recharge the bigger one. Therefore we built two orbs at first, the first one with the bike logic integrated and the second one with the PC logic. We were looking into ways to transfer the data between both orbs without wires. That is why we chose to use XBees because they seemed like a good compromise between complexity and possibilities. Both Arduinos inside the orbs had XBee wireless transmitters connected to them to exchange the energy level.
While we were able to get the XBees and the energy level transmission working, it turned out to be impossible to use the serial connection of the Arduino for both the XBee transmission and the transmission to the python program on the PC at the same time, because the XBee constantly interfered with the serial communication to the PC. After over one day of trying we decided to drop the wireless aspect and put everything into one orb.
At the day of the final presentation, we got everything running right on time, but realized that two minutes before the presentation, PEO’s battery ran empty, although we exchanged it with a new one two hours before. Apparently the Arduino needs at least 7V when connected to the external power supply. Fortunately we could power it over USB instead, but still that was a pity, because we therefore needed to keep it close to the laptop and people could not drive around and try the recharging process as we intended.
Photos
Prototypes & Project Progress
- Finishing the bike wheel revolution sensor with a heat shrink tube
- Testing the revolution counter
- Testing the reed switch circuit for PEO’s base plate
- Programming and testing color changes with the RGB LEDs
- Drilling the hole for the USB port
- assembling the bike mount
Final Project
- PEO’s innards
- PEO disassembled
- PEO connected to the PC
- PEO connected to the bike mount
- bike mount for the PEO
- Recharging PEO
- PEO fully recharged
- PEO’s software causing slow mouse movements
Addendum:
Good looking Web interfaces for Arduino with Python
Designing a GUI for a project is always problematic. There are hundreds of different toolkits to create GUIs but learning them takes a lot of time. A very simple way to quickly create a nice looking interface to your Arduino project is pybottle.
Pybottle is a micro web-framework that simplifies creating a small website. Combined with pyserial to read Arduino output from the COM port this is a good way to prototype your GUI. We used it for PEO’s energy level monitor application in the PC.
import bottle
from bottle import static_file
@bottle.route('/')
def index():
return open('./html/index.html','r')
bottle.run()
This small peace of code already serves you the index.html file. The standard pybottle server starts on port 8080 so this page is accessible on http://localhost:8080/.
If your site contains images and other resources you should define a static_filepath:
@bottle.route('/html/')
def static(filepath):
return static_file(filepath, root='./html/')
@bottle.route also allows you to directly return JSON like objects by adding key, value pairs to a dictionary.
@bottle.route('/arduino/')
def getArduino():
dic = {}
dic['sensor1'] = sensor1
return dic
Now for the tricky bit. The Pybottle server is running in an endless loop this means that if we want to continuously read the sensor values from an Arduino we need
a separate thread.
First we need additional modules:
import sys, threading, time, os, signal, operator
And a little helper class:
class MyThread(threading.Thread): def __init__(self, target, *args): threading.Thread.__init__(self, target=target, args=args) self.start()
In this thread we have another endless loop that reads from the COM port and updates the sensor values.
def arduino_serial_connection(): global credits while running: try: serial_connection = serial.Serial(mySerialPort,9600) line = serial_connection.readline() print line except SerialException, e: print e time.sleep(1)
To update the value on the HTML page we can use a simple jquery javascript function.
<script type="text/javascript">// <![CDATA[
var allVals = []; function getArduinoValue(){ $.getJSON('/arduino/', function(data){ if(data.credits >=0) {
$('#value').html(data.sensor1);
}
});
}
setIntervall("getArduinoValue()",500);
// ]]></script>
Just add your favorite HTML-Template a little bit CSS magic and presto you have a nice looking web interface for your Arduino.
A complete example can be found here.


















Device Blocks Computer Access Unless Users Have Gone Biking - PSFK
Aug 24, 2012 @ 18:08:18
PEO device doesn’t let you use your PC unless you are absolutely fit | TechTripper
Aug 25, 2012 @ 18:59:46
Personal Energy Orb, el Pepito Grillo Arduino que ralentiza tu ratón si no haces deporte | BestValueHost
Aug 26, 2012 @ 12:38:19
Personal Energy Orb Arduino project knows you haven’t been exercising, cripples your computer | tekifeed.com – Gadget Feeds, Gadget News and more!
Aug 26, 2012 @ 18:06:28
Personal Energy Orb Arduino project knows you haven’t been exercising, cripples your computer - The Review Blog
Aug 27, 2012 @ 00:35:29
Personal Energy Orb Arduino project knows you haven’t been exercising, cripples your computer | Technomania..
Aug 27, 2012 @ 02:06:25
Exchange exercise for computer time with the Personal Energy Orb « freetronicsblog
Aug 27, 2012 @ 03:49:11
Aug 27, 2012 @ 06:39:18
Very cool project, it’s a good starting point to think about the interactivity between the physical and digital world. I’d suggest for future iterations to develop an open API for PEO so websites (health trackers) and other devices (via bluetooth) can interact with PEO so it doesn’t have to be physically present with every interaction. Imagine, the Pebble smartwatch’s accelerometer acting as a Pedometer with a mini PEO on the screen slowly filling as you take extra steps.
Personal Energy Orb Arduino project knows you haven’t been exercising, cripples your computer « Kari's World
Aug 27, 2012 @ 15:13:35
Aug 28, 2012 @ 01:08:20
Do you ever intend to release step by step instructions, because I have an arduino and this looks downright awesome, I would love to build it and use it as often as possible. Great idea.
DIY ‘Personal Energy Orb’ Gets You Exercising By Slowing Down Your Mouse | Lifehacker Australia
Aug 28, 2012 @ 03:00:08
Torrent News » DIY "Personal Energy Orb" Motivates You to Exercise by Slowing Down Your Mouse [Video]
Aug 28, 2012 @ 04:59:37
PEO – Personal Energy Orb
Aug 28, 2012 @ 08:53:58
Arduino powered "Personal Energy Orb" - Hot Penguin
Aug 28, 2012 @ 10:57:16
Pas de PC avant un peu d'exercice - Bien-être, Gadgets, Santé
Aug 28, 2012 @ 13:37:16
Aug 28, 2012 @ 19:36:04
Servus!
Habe in meinem Blog http://www.radl-wadl.de auf Euch verlinkt. Wann gibts denn die Serienreife?
Personal Energy Orb, slows down your mouse — Arduino Passion
Aug 28, 2012 @ 21:20:11
Personal Energy Orb Arduino: Need Computer Time? Onya bike! — The Gadgeteer
Aug 29, 2012 @ 15:30:50
Personal Energy Orb Arduino: Need Computer Time? Onya bike! | Techno Gadget Feed
Aug 30, 2012 @ 07:53:14
Technology for a healthier tomorrow | Volved
Sep 09, 2012 @ 06:17:32
Nov 01, 2012 @ 18:02:07
PEO – Personal Energy Orb « Sketching with Hardware | The Humans' Resource
Dec 29, 2012 @ 22:39:08