How to log 2 different rotating movements

Thread Starter

susannah

Joined Feb 14, 2010
87
During this project i have learned already alot about Arduino programming while searching forums.

>For starters, it would be best to get an exact overview of which parameters
>are to be measured, like RPM, torque/tension, pulse rate and whatever.
>So, what sensors are needed and what functions would be nice to have?
>It would be good to get a single post summing them up in a concise form.

At first i was just thinking logging RPM and torque/tension, but if it can take pulse rate from ear that would be nice and Reloadron mentioned temperature. I don't know if there is anything else what would be useful.

>make contrasting stripes/patches along the edge of the main wheel and use
two opto-reflex sensors or a single one rather, whichever way it's spun
>gives exercise and only if Susannah want's to logfront leg muscle exercise
>separate from back leg muscle ditto will the direction info be needed.

I plan to only cycle forwards with this bike. Maybe opto-reflect or something similar would be simplest. I was thinking putting sensors outside of bike and put black stripes to circle shape transparent plastic sheet so light gets thru, blocked, thru....

>Then, we can discuss what secondary data that can be drawn from those,
>like calories burned, a work harder or slow down indicator based on the
>peak pulse rate that is calculated from age, weight and general fitness
>minus some percentage IIRC (such can be found when we're there) and
>whatever else can be calculated from the data at hand, involving the RTC as well.

I didn't think to get that fancy stuff, but if it's doable then why not.

Store i like is lipoly.de and they have this:
Grove - Ear-clip Heart Rate Sensor SeeedStudio MED03212P [SEE-MED03212P]
http://www.lipoly.de/index.php?main_page=product_info&products_id=251794

I think this is same as opto-reflex sensor?
Photo Electric Counter [ELE-SMS38491S]
http://www.lipoly.de/index.php?main_page=product_info&products_id=277628
 

Reloadron

Joined Jan 15, 2015
7,501
Soeren, this I found humorous and true:

[RANT]
My take? I'll gladly help out where I can, but risking an immense amount of flak, I'll have to admit that I see the Arduino as a toy controller board (akin to paint-by-numbers), where only a select few have made anything unique and 99.9% of users feed of the aforementioned. Just call me pedantic, but in my circles, a sketch is something involving pencil, paper and an idea and a shield is something protecting you from swords and other medieval weaponry - too much cuteness factor when we already have good and descriptive words like programs and extension modules.

Sorry, just my take on the Arduino and the rest of the world, calling anything something-duino, like there was nothing but Atmel controllers, which aren't too high on my list either, or I wouldn't have left them behind about 15 years ago. So, I've never even held an Arduino in my hand. Locally, a RasPi is much cheaper than an Arduino btw.
[/Rant]
Personally I view the Arduino as well as PICAXE and similar as toys well suited for the hobby enthusiast or possibly a starting point for some students. They do serve a purpose as I do not know many hobby enthusiast who can afford to go out and buy some of the more advanced data acquisition hardware available from companies like National Instruments or similar or the nice software suites available. Fortunately I worked for a company with deep pockets prior to my retirement. :) The Arduino and PICAXE stuff I have laying around was gifts from sales representatives from assorted distributors. Maybe someday I'll dig out that Raspberry Pi.

Anyway, back to the hobby enthusiast...

Susannah, the heart rate sensor you linked to would likely work. There are also units that clip onto a finger. The photo-electric counter sensor is another story. If you look at that board it is a "slot" type sensor. It generates a pulse when an object passes through the slot on the board. A reflective sensor is different. Generally a piece of reflective material, such as a small foil strip, is mounted to a wheel or shaft. A light beam is aimed at the target and each time the reflective strip passes a pulse is generated as the light source is reflected back to a photo sensor.

As I and Soeren have mentioned, when selecting sensors, for any application, you want a sensor that will obviously produce a signal you can work with as well as a sensor that can easily be mounted. This is where we all wish we could see the internals (guts) of this exercise machine. While we have a good idea of what is in there it would be nice to see the actual guts. For example if there is a wheel that allows easy mounting of some reflective tape (foil tape) a few pieces spaced equidistant around the wheel could be used with a reflective sensor. Generally two or four pieces are enough for a project like this.

Ron
 

Søren

Joined Sep 2, 2006
472
At first i was just thinking logging RPM and torque/tension, but if it can take pulse rate from ear that would be nice and Reloadron mentioned temperature. I don't know if there is anything else what would be useful.
I'm not sure why Ron thinks body(?) temperature is worth measuring, but then again, what do I know, fitness training is overrated in my book (and good old Albert Einstein did agree, not sure of the exact wording, but when he was asked about it, he answered something like "My brain is only around 3 pounds and my body is just for carrying it around", or as I read somewhere else "Why go for a six-pack, when you can have a whole keg" ;))

If body temp. is useful (Ron?), why not measure transpiration rate as well? That would be another measure of whether you're working hard (nahh, while it would be easy to measure, it wouldn't be consistent, as it would depend on state of hydration and a lot of other uncontrollable factors).

If anything, a blood pressure monitor would be a whole lot more useful, to log the pressures before training and again after a set time of full on exercise, to show progress over time - and yes, you can get a BP-cuff to interface to your Arduino.
The pulse itself is also a very good indicator of fitness used the same way.


I plan to only cycle forwards with this bike. Maybe opto-reflect or something similar would be simplest. I was thinking putting sensors outside of bike and put black stripes to circle shape transparent plastic sheet so light gets thru, blocked, thru....
Not sure where you'd put it? On the pedals or...?
Judging from photos of the machine, it seems that the side panels are held by only 4 bolts/screws. It seems that it could be worked over the pedal arm if the pedal is removed and you will have full access. At the lower front there might be plenty of room for a this and that, but if we can urge you to remove one of the panels and snap some sharply focused photos, this will help tremendously!

The main wheel driven directly by the pedal isn't very large, or the pedal crank would be lower, so I imagine that there's plenty of empty space to fill.
Sensors would be well protected inside the machine, on the outside, you'd kick them sooner or later, but if you are adamant about outside sensors, it can be done of course - How do you like duct tape/gaffa tape? :D


I didn't think to get that fancy stuff, but if it's doable then why not.
"then why not"?
Doesn't sound very enthusiastic - we're not trying to pull anything over your head here, just trying to maximize what can be drawn from the data. If you're more set on doing just what you asked for, it's solely your choice :)


Store i like is lipoly.de and they have this:
Grove - Ear-clip Heart Rate Sensor SeeedStudio MED03212P [SEE-MED03212P]
http://www.lipoly.de/index.php?main_page=product_info&products_id=251794

I think this is same as opto-reflex sensor?
Photo Electric Counter [ELE-SMS38491S]
http://www.lipoly.de/index.php?main_page=product_info&products_id=277628
That ear-clip should be fine. I'm not sure what goes on in the box it's plugged into, but digging around some example code, I'm fairly certain that the output is digital (from the box).
Using this will relieve you off making the electronics - the ear clip itself is just an LED (red or infrared) and a photo transistor (I have such a clip myself, from an exercise bike a neighbor threw out - most people realizes, sooner or later, that it takes up too much place, for a clothe rack ;)).

If you want to go with that one, it is cheaper to buy directly from SeeedStudio http://www.seeedstudio.com/depot/grove-earclip-heart-rate-sensor-p-1116.html?cPath=197

Ron already told you about the reflex sensor, that measures reflected light, but the one you link to (or perhaps a similar smaller version), would be the choice for the "slotted" disk you mentioned.
Here is a slotted optocoupler (gabellichtschranke) without the comparator chip http://www.conrad.de/ce/de/product/...-Omron-EE-SX1106-Gabel-Lichtschranke?ref=list
and here's an example of a reflex sensor http://www.conrad.de/ce/de/product/...ite-Max-60-mmmit-IC-APDS-9700-020-20?ref=list

Judging from your choice of shop, I'd guess you're south of me around 300..400 clicks and if so, you may consider http://www.conrad.de/ for some of your purchaces.
While I've only been in the Berlin branch, they are everywhere, from Kiel to Munich - ha, just found the one in Kiel and I have in-laws close by, so I know what to spend my time on the next time around :)
Conrad components are low(-ish) priced and the shop keepers are usually very helpful.

If at all possible for you, please, pretty please, rip off one of the side panels and post some nude photos (of the machine of course ;))
 

Reloadron

Joined Jan 15, 2015
7,501
Well you won't find me on an exercise machine. :) I just tossed temperature out there. Yeah, blood pressure would be sweet to look at along with heart rate I guess. You can look at and record whatever you want I guess. I also would love to see the inside of this thing so some ideas can be drawn as to sensors.

Ron
 

Søren

Joined Sep 2, 2006
472
[...] They do serve a purpose as I do not know many hobby enthusiast who can afford to go out and buy some of the more advanced data acquisition hardware available from companies like National Instruments or similar or the nice software suites available.
Sure they have a purpose, but I think the main reason they're helpful to newbies is the huge code base present.
However, the MSP430 Launchpad, to just name one, is cheaper and eminent for low power stuff and it has got a free IDE, so why wasn't it that one that "won the race"...
Arduino is marketed on cuteness factor and a LEGO approach to electronics and programming and it's much easier to learn nothing at all, when you just click on the modules you need and rip the code from somewhere else. Same thing with most RAD software suites.

I'm not saying there's no place for it, or for the PICAxe(a µC running an interpreter running your code, yeach) for that matter and I'd never tell anyone to stop using it. It's up to each what they want from a µC of course and I have even suggested the Arduino on occasions, when helping members of the original target audience; artists that have no clue and no reason to learn more than the absolute minimum to automate a bit of their art pieces.


Fortunately I worked for a company with deep pockets prior to my retirement. :) The Arduino and PICAXE stuff I have laying around was gifts from sales representatives from assorted distributors. Maybe someday I'll dig out that Raspberry Pi.
It would be impolite to thank no when offered ;)
You should try out the Pi, much more powerful than the Arduino, or if you got a ChipKit semi-Arduino clone (or rather an Arduino on steroids) in your goodie-bag, give that a spin (quickly done, it's 80MHz IIRC)
Then there's the Beagle Bon, I might be wrong here, but I have a vaque recollection of an ARM core and rather cheap as well.
But I digress...
 

Reloadron

Joined Jan 15, 2015
7,501
Soeren, I keep thinking I should find that Raspberry and do some playing around with it. I have read a little but time to dig that thing out of wherever I put it. When I retired I set most electronics aside and started to focus on my shooting hobby. :)

Ron
 

Søren

Joined Sep 2, 2006
472
Just for a sum up and a bit of brain storming/mental scratchpad...

Inputs needed:
  1. Time
  2. Rotation of wheel
  3. Torque setting of wheel
  4. Pulse (maybe)
If I forgot any, just shout and I'll edit this post to keep it up fresh.


From these inputs, possible output could be, immediate and/or average (just toying with what's possible, not necessarily what's wanted or needed):
  1. Time (obviously)
  2. Instantaneous torque setting (plus logged over time)
  3. Pedal RPM
  4. Equivalent distance (although I'm not sure on what wheel size to base it)
  5. Work done (might be a tad difficult to get absolute values without some way of calibration)
  6. Pulse rate and whether to increase or decrease speed, to stay at the sweet spot
  7. Statistics based on the above, but perhaps not until transferred to a PC, which can then pull the weight.
  8. What else?
The casual bicycle rider should aim for an average cadence of around 60 (i.e. one full pedal revolution per second), while experienced riders usually have their cadence around 80..90 and the semi-pro and pro riders go somewhere in the 90..120 area, sometimes higher, it depends a lot on the length of the pedal arms, leg length and personal preference, but a relatively stable cadence is the reason for having lots of gear ratios, to make it possible to pedal at a consistent speed up- as well as downhill.
In the exerciser, the torque setting is used to emulate up- and downhill.

Thoughts anyone?
 

Reloadron

Joined Jan 15, 2015
7,501
I sense a Pi driven bullet chronometer might be on the way :)
LMAO, I actually have a very good Chronograph but the subject of home brew chronographs comes up all the time. The biggest issue is the "sky screens". Getting two optical sensors spaced that can trigger off a bullet in flight can be difficult. :)

Ron
 

Søren

Joined Sep 2, 2006
472
[...] The biggest issue is the "sky screens". Getting two optical sensors spaced that can trigger off a bullet in flight can be difficult. :)
"sky screens" are they the detectors?
Couldn't the sensor part be mounted on the muzzle (like a bayonet mount) for proper alignment? - 1 small LASER, 1 PIN photo diode and 2 small mirrors 100mm apart shouldn't be too intrusive.
Or perhaps a LASER line and measure the dips in received light.

(Haven't fired a gun since my military career - an M1, which probably tells you it was a while ago :))

Oh, we probably should get back on topic... It's so easy to get carried away :)
 

Thread Starter

susannah

Joined Feb 14, 2010
87
Sorry, i little bit lied to you guys. I don't have it yet but i will get that bike monday. For some reason this bike got lost for long time while it was riding to my place from shop in England. ;-)

When i get it i open it and check it out.

Not sure where you'd put it? On the pedals or...? Judging from photos of the machine, it seems that the side panels are held by only 4 bolts/screws. It seems that it could be worked over the pedal arm if the pedal is removed and you will have full access. At the lower front there might be plenty of room for a this and that, but if we can urge you to remove one of the panels and snap some sharply focused photos, this will help tremendously!
It's okay to me to put sensors inside if there is space. If sensors are attached to outside of bike, it would be more universal and would work in all bikes and when others want to use our Arduino app/sensors, it's would be easier them to do so.

Doesn't sound very enthusiastic - we're not trying to pull anything over your head here, just trying to maximize what can be drawn from the data. If you're more set on doing just what you asked for, it's solely your choice
Actually if it's not too much trouble to do these things then i'm very enthusiastic.

Ron already told you about the reflex sensor, that measures reflected light, but the one you link to (or perhaps a similar smaller version), would be the choice for the "slotted" disk you mentioned.
Here is a slotted optocoupler (gabellichtschranke) without the comparator chip http://www.conrad.de/ce/de/product/...-Omron-EE-SX1106-Gabel-Lichtschranke?ref=list
and here's an example of a reflex sensor http://www.conrad.de/ce/de/product/...ite-Max-60-mmmit-IC-APDS-9700-020-20?ref=list
Reflex or pretty much anything is okay to me. I found these. It has 2 in 1. What do you guys think:

2-Channel Opto Distance Sensor [ELE-SPS21211S]
http://www.lipoly.de/index.php?main_page=product_info&products_id=273087
 

Thread Starter

susannah

Joined Feb 14, 2010
87
I got it! It was hard to open the case. When i got that open then crank arm prevents from taking case off so i cannot see in at all. I tried everything to remove it. There is no screws and i cant pull it out etc.
 

Søren

Joined Sep 2, 2006
472
Come on, we want to see the beast ;)
Photos of the outside may reveal how to open it (perhaps the crank needs to be undone.

The knob may not move in/out on the outside, but it moves a bar or similar on the inside, to move the magnet assembly.

Photos, photos, photos!
 

Thread Starter

susannah

Joined Feb 14, 2010
87
Good news guys. The display can be removed and it is connected to bike with 2 wire cable and once per revolution bike sends some kind of pulse! There must be some kind of button which is closed once a turn.

I used generic multi meter and turned multi meter setting to 2000k Ω. When i rotate bike crank one full circle, number 1 in multi meter screen turns to much bigger number.

That don't solve the knob problem, but i noticed that the knob is hollow so maybe part of our hardware could be inside it.

The knob don't move smoothly but moves about 1-2 mm then keeps really loud sound like some metallic pin jumps over gear teeth. Maybe this jumpy movement could be recorded? Maybe wibration sensor, accelerometer or encoder which touches inside of knob? There probably is some kind of sensor which could do this. This small jumpy movement clearly is most accurate way to get tension.
 

Thread Starter

susannah

Joined Feb 14, 2010
87
Still no photos?

The knob may well be detected on the ratchet mechanism, but we're blind without photos.
I again tried to open it and i got my camera lens between the left and right side of the case so i got some kind of pictures.

IMG_5773.JPG IMG_5771.JPG IMG_5780.JPG IMG_5786.JPG IMG_5776.JPG IMG_5774.JPG IMG_5783.JPG IMG_5781.JPG IMG_5782.JPG
 
Last edited:
Top