Let see in more details how to put together the basic internet speed monitor contraption.
This article discuss setting up the Raspberry Pi.
Translate
Showing posts with label monitor. Show all posts
Showing posts with label monitor. Show all posts
Thursday, September 16, 2021
Internet Speed Monitor - part 2 - basic SW
Sunday, September 12, 2021
Internet Speed Monitor - part 1 - specifications
Recently my connection with the provider for internet, has some problems.
Running some speed tests from different computers shows really erratic results.
I should have something about 12 Mbit/s downstream and 2 Mbit/s upstream, some tests shows up to 15 Mbit/s-1.5 Mbit/s, others down to 1 Mbit/s-0.25Mbit/s
Not easy to pin point the nature of the problem.
Saturday, July 7, 2018
Designing an HVAC monitoring system
Ideas - things to do
The HVAC (Heating, Ventilation and Air Conditioning) system, as many other systems, has the bad habit to broke down when most needed.The idea is to design a monitoring system for HVAC capable to predict problems, with the less possible impact on the system, meaning that the monitoring system should be as much as possible independent from the HVAC itself.
Sunday, March 29, 2015
Monitoring health data - my way - #2
On this article I'll discuss how I track data related to the food.
A very important thing to do if you are dieting or keeping track of your health numbers, is to monitor the carbs and other nutrient intake, i.e. how many carbs you are eating.
In order to do so, it is important to know exactly what and when you are eating.
It seems easy but is not.
Why is not easy ? Well, let see some reasons (just a few) :
Here an example of entry:
Again, the main purpose of this document is to have a quick recap of the food I usually ate, in order to avoid to do the same research over and over.
On this document are also documented some "home made recipes", in order to calculate the nutrition info for that.
What I usually do, is to put down the basic nutrients of each component of the recipe, then calculate the total amount of carbs (and other nutrients) and then divide in cups or bowls.
Once you figure out how many carbs (and other nutrients) are in the food, the second step is to write down somewhere what you ate on a specific day.
This is the Food Journal document.
For each day there are 4 entries :
More details are put in this document, more is easy to calculate the carbs but there is always a trade between efficiency and time spent doing that.
Being too precise requires a lot of time, so know what to write as amount of information is something that is coming with the experience of doing that daily.
Note that the food journal reports mainly the carbs intake and not all the others nutrient,
This because the carbs intake is the main key in my case, however, other articles will explain how to use the nutrient information and create a daily journal.
In the end the goal is to come up with some carbs number to put in the spreadsheet I described in the previous article (Monitoring health data - my way #1).
The day is divided in 6 time areas :
A very important thing to do if you are dieting or keeping track of your health numbers, is to monitor the carbs and other nutrient intake, i.e. how many carbs you are eating.
In order to do so, it is important to know exactly what and when you are eating.
It seems easy but is not.
Why is not easy ? Well, let see some reasons (just a few) :
- not all the food you are eating is labeled
- the food is not "homogeneous", the same food can be present in different forms
- often a processed food have different characteristics than a less processed food
- often are indicated base chemical compost rather than more "human" description
- different companies label the food in different way
- all the companies who sell food, always try to hide or manipulate information in order to make more palatable the food they sell. The rule seems to be, if you can't be vague, obscure with chemistry and strange words
- hidden basic ingredients in processed food (like salt or sugar) often requires to "split" a food in it's basic elements
- etc.
So monitoring what you want to eat is not an easy business, it takes time and organization.
Here is "my way". Repeating myself, this is how I do that, I'm not stating it is the right way to do it.
It is good for me.
I maintain basically 3 documents :
- a "food information" document (word processor)
- a "food journal" document (word processor)
- the spreadsheet where I track also the sugar level and other measurements (spreadsheet)
Food information
The food information document contains information about the food I eat.
Usually I save a picture of the food or box, for an easy visual reference, and then some nutrient information.
Plus I add some notes to clarify how many carbs are actually present, just to simplify when I have to figure out quickly how much carbs I'm having.
The main problem is due by the fact that manufacturers give the information often in a very complicated way.
Plus I add some notes to clarify how many carbs are actually present, just to simplify when I have to figure out quickly how much carbs I'm having.
The main problem is due by the fact that manufacturers give the information often in a very complicated way.
For example, many "soups" containers contains 2 servings, but often the nutrient information are for about 1 serving.
Often you find 2.5 servings per container, other times 1 ... doesn't exists a standard.
Some manufactures express the "serving" in grams, other in oz, other per cup, other per bowl other as a generic "serving", or specific food description.
Often you find 2.5 servings per container, other times 1 ... doesn't exists a standard.
Some manufactures express the "serving" in grams, other in oz, other per cup, other per bowl other as a generic "serving", or specific food description.
So in order to figure out what you are eating, to calculate carbs and other measurement, you need to spend time researching information.
Thus I decided to "save" these researches, the results, in a document.
Each entry has a picture of the product, a copy of the nutrition chart, a thumb up or down to indicate that tastes good, and eventually some notes.
Each entry has a picture of the product, a copy of the nutrition chart, a thumb up or down to indicate that tastes good, and eventually some notes.
Here an example of entry:
Again, the main purpose of this document is to have a quick recap of the food I usually ate, in order to avoid to do the same research over and over.
On this document are also documented some "home made recipes", in order to calculate the nutrition info for that.
What I usually do, is to put down the basic nutrients of each component of the recipe, then calculate the total amount of carbs (and other nutrients) and then divide in cups or bowls.
Food journal
Once you figure out how many carbs (and other nutrients) are in the food, the second step is to write down somewhere what you ate on a specific day.
This is the Food Journal document.
For each day there are 4 entries :
- Breakfast
- Lunch
- Dinner
- Snacks
Each entry will collect information about what I'm eating. Quantity, food, estimated carbs, often divided by food.
With these info I can sum up the number of carbs for each "period" and transpose that value in the spreadsheet.
With these info I can sum up the number of carbs for each "period" and transpose that value in the spreadsheet.
Here an example of entry :
February 26, 2015
-
Breakfast
1 low carb tortilla (3g) with cheese, 4 slices capocollo (0g), eggs beaterCoffee -
Lunch
1 serving Chicken Enchilada bake (15g)
Pringles chip onion sour – single serve (10g)
Cornetti single serving (3 g) -
Dinner
Panera Bread – Chicken Kale and sweet potato soup – 1 cup (9g)
1 Morey's grilled salmon (1g) with zucchini (5g) -
Snacks10 am – 1 pouch Skinny zero popcorn (5g)3 pm - Chiquita – Bites juicy red apple (6g) with string cheese
9 pm – low carb cake (4 g)
Being too precise requires a lot of time, so know what to write as amount of information is something that is coming with the experience of doing that daily.
Note that the food journal reports mainly the carbs intake and not all the others nutrient,
This because the carbs intake is the main key in my case, however, other articles will explain how to use the nutrient information and create a daily journal.
Spreadsheet
In the end the goal is to come up with some carbs number to put in the spreadsheet I described in the previous article (Monitoring health data - my way #1).
The day is divided in 6 time areas :
- breakfast
- morning snack
- lunch
- afternoon snack
- dinner
- night snack
For each area the goal is to assign a value (if any).
See the previous document for details.
See the previous document for details.
Wednesday, March 25, 2015
Monitoring health data - my way - #1
Everybody should be aware about his/her health, using real time data, but of course only when an illness is developed we really starts to pay attention to that.
I started to measure the sugar level in the blood regularly and record these data on a spreadsheet.
It is relatively convenient to keep track on these data in this way, but it has many limits, especially when I started to collect other data as well, like the weight, my daily intake of carbohydrates, how much exercise I do, what medications I'm taking and when, and so on.
This article describes the way I started to collect/store/retrieve information using LibreOffice Calc.
I'm sure exists many other better ways to do so, but this is my way.
I'm using it in two flavors :
After March, three extra columns will be added, to save the blood pressure and the heart beat.
I started to measure the sugar level in the blood regularly and record these data on a spreadsheet.
It is relatively convenient to keep track on these data in this way, but it has many limits, especially when I started to collect other data as well, like the weight, my daily intake of carbohydrates, how much exercise I do, what medications I'm taking and when, and so on.
This article describes the way I started to collect/store/retrieve information using LibreOffice Calc.
I'm sure exists many other better ways to do so, but this is my way.
Software
The main tool used to store the data is LibreOffice Calc.I'm using it in two flavors :
- LibreOffice Calc 4.3.1.2 for Windows
- LibreOffice Calc 4.2.7.2 for Linux
The spreadsheet is divided in different tabs.
A tab for each month, a tab to recollect all the data, a tab to recollect only the fasting measurements and other tabs for the conversion (will be discussed in other articles).
Let see more in details the main tabs.
Let see more in details the main tabs.
Monthly tab
Each month of collected data has a tab, named with Month and Year, like "January 2015".
The data collected in the tabs are the carbs intake, the glucose reading, what medications are taken, the weight, the ketons and some notes.
Additionally in the notes field is reported what kind of exercise is done and other remarks.
Here the columns on this tab :
The data collected in the tabs are the carbs intake, the glucose reading, what medications are taken, the weight, the ketons and some notes.
Additionally in the notes field is reported what kind of exercise is done and other remarks.
Here the columns on this tab :
| Date | Meal | Carbs | Daily carbs | Glucose reading | Time | ml/dg | Medications | Weight (lb) | Notes | Ketons |
- Date
The date of the measurement.
Since the tab contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries (rows) with the same date. - Meal
Indicates a specific period of the day. It is used to record the intake of carbs in gram.
The values of this column are : - Breakfast
- Snack (morning)
- Lunch
- Snack (afternoon)
- Dinner
- Snack (night)
- Carbs
A value in grams of the net carbs for each specific period (see previous column) - Daily Carbs
A sum of the 6 previous field (see Carbs) - Glucose reading
A description associated to the glucose reading.
The three major measurements of glucose are done before breakfast, before lunch and before dinner.
There are three "fixed" descriptions, plus a random description (up to three) : - Before breakfast
- Before lunch
- Before dinner
- Random
- Time
Time of the glucose reading - ml/dg
Value of the glucose reading - Medications
List of the medication taken in the day - Weight (lb)
Weight measured. Usually once a day. not in a specific time. - Notes
Generic notes. Usually I put in here what exercise I do and how long or other notes, maybe associated to other fields - Ketons
Value of the ketons. I'm trying to mimic the colors used by the strips and putting an estimate value in one of the cell. - bpm (after March)
- Systolic
- Dyastolic
Here an example of a monthly tab, how is look (is a demo page, the values are fake):
After March, three extra columns will be added, to save the blood pressure and the heart beat.
Chart
In the end of the table, a chart is present to show the main collected data.
The chart is a linear one and shows the weigh, the glucose level, the daily carb intake and the carb intake.
The colors used and the scale are kept for all the monthly tabs in order to facilitate to compare them.
The chart is a linear one and shows the weigh, the glucose level, the daily carb intake and the carb intake.
The colors used and the scale are kept for all the monthly tabs in order to facilitate to compare them.
Here an example of the monthly chart (it's a demo - fake values):
There are two different scales on the Y axes.
On the left from o to 200 for the weight and ml/dg.
On the right from 0 to 400 for the carbs intake.
The reason was to leave more space between the carbs and the other two lines.
Using the same scale, sometime the lower part of the glucose line and the upper part of the daily carb intake, were mixing. The chart is important to show quickly the patterns, not reading specific values, so the two scales are just OK.
On the right from 0 to 400 for the carbs intake.
The reason was to leave more space between the carbs and the other two lines.
Using the same scale, sometime the lower part of the glucose line and the upper part of the daily carb intake, were mixing. The chart is important to show quickly the patterns, not reading specific values, so the two scales are just OK.
All times tab
This tab recollect all the data present in the monthly tabs.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
The reason to have an extra tab to recollect all the data previously collected, is to easily generate a chart.
| Date | Meal | Carbs | Daily carbs | Glucose reading | Time | ml/dg | Weight (lb) |
- Date
The date of the measurement.
Since the tab contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries with the same date. - Meal
Indicates a specific period of the day. It is used to record the intake of carbs in gram.
The values of this column are : - Breakfast
- Snack
- Lunch
- Snack
- Dinner
- Snack
- Carbs
A value in grams of the net carbs for each specific period (see previous column)
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.C2 = 0),"",'January 2015'.C2) - Daily Carbs
A sum of the 6 previous field (see Carbs) - Glucose reading
A description associated to the glucose reading.
It is used to divide the day. The three major measurements of glucose are done before breakfast, before lunch and before dinner.
There are three "fixed" descriptions, plus a random description : - Before breakfast
- Before lunch
- Before dinner
- Random
- Time
Time of the glucose reading
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.F2 = 0),"",'January 2015'.F2) - ml/dg
Value of the glucose reading
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.G2 = 0),"",'January 2015'.G2) - Weight (lb)Weight measured. Usually once a day. not in a specific time.
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.I2 = 0),"",'January 2015'.I2)
Chart
In the end of the table, a chart is present to show the collected data.
The chart is a linear one and shows the weigh, the glucose level and the daily carb intake like the monthly one, but it will include more months.
The chart is a linear one and shows the weigh, the glucose level and the daily carb intake like the monthly one, but it will include more months.
All time only fast tab
This tab recollect all the data present in the monthly tabs but only for the "Before breakfast" glucose levels.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
Originally the data were simply copied in this tab, since January 2015 some operations are automated, so that the update happens when the monthly tab is updated.
The reason to have an extra tab to recollect all the data previously collected, is to easily generate a chart.
Basically this tab is identical to the previous one (All times tab) but the glucose values copied are only the ones before breakfast.
Basically this tab is identical to the previous one (All times tab) but the glucose values copied are only the ones before breakfast.
| Date | Meal | Carbs | Daily carbs | Glucose reading | Time | ml/dg | Weight (lb) |
- Date
The date of the measurement.
Since the tabspreadsheet contains different data, there are at least 6 entries for each date, i.e. every day there are 6 entries with the same date. - Meal
Indicates a specific period of the day, used to record the intake of carbs in gram.
The values of this column are : - Breakfast
- Snack
- Lunch
- Snack
- Dinner
- Snack
- Carbs
A value in grams of the net carbs for each specific period (see previous column)
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.C2 = 0),"",'January 2015'.C2) - Daily Carbs
A sum of the 6 previous field (see Carbs) - Glucose reading
A description associated to the glucose reading.
The three major measurements of glucose are done before breakfast, before lunch and before dinner.
There are three "fixed" descriptions, plus a random description : - Before breakfast
- Before lunch
- Before dinner
- Random
- Time
Time of the glucose reading
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.F2 = 0),"",'January 2015'.F2) - ml/dg
Value of the glucose reading
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.G2 = 0),"",'January 2015'.G2) - Weight (lb)Weight measured. Usually once a day. not in a specific time.
Since January the value of this cell is copied automatically from the specific monthly tab.
Example : =IF(('January 2015'.I2 = 0),"",'January 2015'.I2)
Chart
In the end of the table, a chart is present to show the collected data.
The chart is a linear one and shows the weigh, the glucose level and the daily carb intake like the monthly one, but it will include more months.
More articles will follow in order to describe the system I'm setting up to deal with all these data.
More articles will follow in order to describe the system I'm setting up to deal with all these data.
Tuesday, August 26, 2014
Build an airflow sensor
For one of the projects I want/need to do, it was necessary to measure an airflow.
Here how I built a small sensor for that.
The simplest way to do so is to modify a computer fan.
I choose a small brush-less fan (for CPU), with ball bearings.
Probably the simplest and safest way to detect the rotation of the blade, is to use an Hall Effect sensor.
The sensor is placed inside the fan case, instead of the original motor circuit.
Below the bipolar Hall Effect sensor I used. No really need to have a bi-polar Hall Effect, actually a single pole Hall Effect it would work better, but this is what I had around at the time.
The first step was to split the rotor from the main case.
Usually there is a small groove that keep the rotor in place.
On the rotor, in this type of fan, there is the permanent magnet.
It need to be removed.
The motor is usually soldered to a PCB, just stuck in the plastic case.
With some force is possible to disconnect it.
3 wires, as the original configuration of the fan, are required for the Hall sensor.
Vdd, GND and the output.
Here some pictures of the conversion, starting from the original CPU fan I used (below)
The first thing was to take it apart, removing the motor and electronic.
Then I glued an Hall Effect sensor close to the shaft, on the base.
On the propeller, I attached two earth rare magnets (very small and very powerful), on the opposite sides.
I left the metal rim inside to facilitate the magnet attach (I also glued them) and to give a little bit weight to the propeller.
The magnets are attached with the poles in the opposite direction, because the Hall Effect sensor I used is a bipolar one, i.e. it needs to "see" a North/South pole change in order to go on, and a South/North pole change to go off.
Here the anemometer completed, attached to a simple circuit to test the Hall Effect sensor.
In the last picture, it is possible to see also the 1 wire temperature sensor (DS18S20) connected to the cable.
It is the sensor needed to detect the temperature of the air flow.
A simple first prototype , using an MSP430-2013, it was built to develop and test the firmware to read the anemometer and the temperature sensor.
Here how I built a small sensor for that.
The simplest way to do so is to modify a computer fan.
I choose a small brush-less fan (for CPU), with ball bearings.
Circuit
Probably the simplest and safest way to detect the rotation of the blade, is to use an Hall Effect sensor.
The sensor is placed inside the fan case, instead of the original motor circuit.
Below the bipolar Hall Effect sensor I used. No really need to have a bi-polar Hall Effect, actually a single pole Hall Effect it would work better, but this is what I had around at the time.
Hardware preparation
The first step was to split the rotor from the main case.
Usually there is a small groove that keep the rotor in place.
On the rotor, in this type of fan, there is the permanent magnet.
It need to be removed.
The motor is usually soldered to a PCB, just stuck in the plastic case.
With some force is possible to disconnect it.
3 wires, as the original configuration of the fan, are required for the Hall sensor.
Vdd, GND and the output.
Here some pictures of the conversion, starting from the original CPU fan I used (below)
The first thing was to take it apart, removing the motor and electronic.
Then I glued an Hall Effect sensor close to the shaft, on the base.
On the propeller, I attached two earth rare magnets (very small and very powerful), on the opposite sides.
I left the metal rim inside to facilitate the magnet attach (I also glued them) and to give a little bit weight to the propeller.
The magnets are attached with the poles in the opposite direction, because the Hall Effect sensor I used is a bipolar one, i.e. it needs to "see" a North/South pole change in order to go on, and a South/North pole change to go off.
Here the anemometer completed, attached to a simple circuit to test the Hall Effect sensor.
In the last picture, it is possible to see also the 1 wire temperature sensor (DS18S20) connected to the cable.
It is the sensor needed to detect the temperature of the air flow.
A simple first prototype , using an MSP430-2013, it was built to develop and test the firmware to read the anemometer and the temperature sensor.
Sunday, August 12, 2012
Set up WiFi monitor with Wireshark
Sometimes is necessary to be able to see the traffic generated, or directed to, a WiFi appliance.
There are many possible ways to capture packets from a WiFi appliance, especially if the appliance allows to install packet capture applications.
However not always such thing is possible and considered the nature of the WiFI appliance, it can change the performances.
This article describes how I did set up an external monitor for the traffic to and from a WiFi appliance.
The idea is to put a computer running wireshark between the router WiFi and the rest of the network.
The main constraint is to have a WiFi router SEPARATED by the rest of the network.
This a graphic representing the setting :
The key part is a laptop with two NIC cards. In my case the laptop is running Kubuntu 12.04
The first step, recognizing the extra NIC card, should not pose any problem.
In my case the LinkSys NIC was recognized and configured automatically by the OS as eth1.
The next step is to install Wireshark from the Kubuntu repository, and enabled it to capture packets from eth0 or eth1.
After preparing the hardware and tested both the ethx ports, it is necessary to set up the machine to act as a bridge, in order to have packets received from the eth0 port sent to the eth1 port, and viceversa.
Without such functionality, the two networks are isolated, i.e. the phone can not receive anything from the network.
In order to simplify the configuration, I forced on both the NIC a manual address.
After opening a terminal, I installed the brctl program (sudo apt-get install bridge-utils).
The bridge-utils are not installed by default in the Kubuntu 12.04 but are available in the repository.
At this point I created, configured and activated a bridge between the two NICs.
After creating the bridge, it has to be activated.
To do so, simply use the ifconfig command :
At this point the bridge should be working.
Note that after issuing these commands the eth0 and eth1 are not accessible anymore.
It is convenient to create a script with all the above commands to simplify the setting of the system.
After the bridge is activated is possible to run Wireshark.
Among the available interfaces to use to capture traffic, it will be present a wshark interface that is the bridge.
To capture data transiting the two inetrfaces, just choose that one.
There are many possible ways to capture packets from a WiFi appliance, especially if the appliance allows to install packet capture applications.
However not always such thing is possible and considered the nature of the WiFI appliance, it can change the performances.
This article describes how I did set up an external monitor for the traffic to and from a WiFi appliance.
Basics
The idea is to put a computer running wireshark between the router WiFi and the rest of the network.
The main constraint is to have a WiFi router SEPARATED by the rest of the network.
This a graphic representing the setting :
Shopping list
It is needed :- 1 laptop with Linux installed, with two ethernet ports
- 1 PCMCA NIC if the laptop has already an embedded NIC
- bridge utilities
- Wireshark
The environment
The machine used to build the monitor is a Gateway Tablet running Kubuntu 12.04, plus a LinkSys PCMCA NIC card.The first step, recognizing the extra NIC card, should not pose any problem.
In my case the LinkSys NIC was recognized and configured automatically by the OS as eth1.
The next step is to install Wireshark from the Kubuntu repository, and enabled it to capture packets from eth0 or eth1.
Bridge setting
Without such functionality, the two networks are isolated, i.e. the phone can not receive anything from the network.
In order to simplify the configuration, I forced on both the NIC a manual address.
- 192.168.2.71
for the eth0 - 192.168.2.72
for the eth1.
The bridge-utils are not installed by default in the Kubuntu 12.04 but are available in the repository.
At this point I created, configured and activated a bridge between the two NICs.
- sudo brctl addbr wshark
Creates a new bridge called wshark - sudo brctl addif wshark eth0
Adds the eth0 to the wshark bridge - sudo brctl addif wshark eth1
Adds the eth1 to the wshark bridge - sudo brctl stp wshark on
Enables the STP
After creating the bridge, it has to be activated.
To do so, simply use the ifconfig command :
sudo ifconfig wshark up
At this point the bridge should be working.
Note that after issuing these commands the eth0 and eth1 are not accessible anymore.
It is convenient to create a script with all the above commands to simplify the setting of the system.
Running Wireshark
After the bridge is activated is possible to run Wireshark.
Among the available interfaces to use to capture traffic, it will be present a wshark interface that is the bridge.
To capture data transiting the two inetrfaces, just choose that one.
Subscribe to:
Posts (Atom)




