Measuring ketosis with an Arduino

key

A bit of biology and nutrition before we roll into this: Ketosis is when your body runs on fat reserves instead of carbohydrates. This is the basis of diets such as Atkins, and despite the connotations of eating hamburger patties and butter, you can actually lose weight on these diets. One problem with a keto diet is the difficulty of measure how many ketones your liver is processing; this can be done with a urine sample, but being able to measure small amounts of acetone in your breath would be the ideal way to measure ketosis. [Jens] came up with a device that does just that. It’s called Ketosense, and it will tell you how well your keto diet is doing by just having you blow into a sensor.

[Jens]‘ device consists of an Arduino, LCD display, and two sensors – one for acetone, and another for temperature and humidity. By carefully calibrating a TGS822 sensor, [Jens] was able to measure the acetone content of an exhaled breath along with temperature and pressure. This gave him a reading in parts per million, and with a short bit of math was able to convert that into something that made sense when talking about ketosis, mmol/l.

Without access to a lab that can measure blood ketone levels, it’s difficult to say if [Jens] device really works as intended. If he were to find his way into a lab, though, it would be possible to correlate his sensor’s values with blood ketone results and improve the accuracy of his sensor.

Comments

  1. sonicdude10 says:

    I could use this being a type 1 diabetic with really finicky blood sugar levels.

    • Alex Rossie says:

      Why? You shouldn’t be ketotic unless you’ve stopped taking insulin completely in which case silly you!!

      • Nathan Piper says:

        Wiki “Diabetic ketoacidosis” as a symptom of being unable to use the sugar present in the bloodstream leading to Ketosis which over time will severely lower the pH and that will mess you up something fierce, like Diabetic Coma severe.

        • Devilbunny says:

          Not exactly. I am not a diabetologist, but I am an American physician who has adopted a low-carb way of eating and has been in ketosis (excluding a few planned cheat days) for over a year.

          Diabetic ketoacidosis (henceforth DKA) is a syndrome that results from the absence of insulin. Because no insulin is present, the body cannot use glucose for energy despite the fact that it’s being consumed (as bread, potatoes, sugar, etc.). It thus accumulates until it starts spilling into the urine, which rapidly dehydrates the body (as each glucose molecule takes water with it). Ketones are an alternative fuel source for the body when carbohydrates cannot be utilized – either because they are absent, or because the insulin is absent. In DKA, they are produced despite high glucose levels because the body cannot effectively detect and use glucose in the absence of insulin. In simple ketosis, they are produced because there is little or no glucose present. In both cases, the ketones are merely a symptom, not the disease; they are a response to low carbohydrate ability. Ketones are not responsible for DKA in any fashion.

          • type1 says:

            You are not entirely correct : It is not “in the absence of insulin”, but “in the absence of *enough* insulin”.

            This is an important differentiation, because Type1 diabetics will hardly have entirely enough insulin (or else risk many Hypoglycemia-attacks), as a result they’ll always burn a little fat, resulting in Ketosis.

            As such, the ketosis-levels is one of the indicators for how well the patient is dealing with the Diabetes. As such, together with the HBA1C, it are the most important indicators as to how “healty” you are as a type1 (obviously, the patient’s feeling well or not are most important inidcators).

            Source: I am type1

  2. Chris C. says:

    Monitoring ketone levels is important for treating some forms of diabetes and epilepsy. Ketostrips weren’t invented just for diets! Worth mentioning since no one else appears to have yet.

    I don’t know if any other electronic monitoring solution exists, but this could actually be a lifesaver, not just a diet aid.

    • James says:

      Ketone levels are something to be concerned about mainly only in acute untreated (or very poorly treated) type 1 diabetes.

      As I recall, when there is no insulin in the blood, your body assumes therefore that there is no glucose either, since it’s the insulin’s job to deal with glucose, so it starts churning out ketones instead from your fat stores (evolution clearly didn’t take the direct route of looking at the glucose in the blood to determine if ketones are required!)

      In the acute diabetic they have no insulin, but they have piles of blood glucose, (precisely because there is no insulin to get rid of it), the body sees no insulin and starts producing ketones until there is insulin again, which never happens. Worse, the body uses the surplus blood glucose ahead of the produced ketones, so what you wind up with is a complete run-away ketone production, with your blood becoming more and more saturated with them (Diabetic Ketoacidosis).

      In a normal non-diabetic, there is no run-away situation, the body uses the ketones normally because there is no/low blood glucose, and once they ingest glucose the insulin kicks in and the ketone production stops, so there is no dangerous run-away situation.

      I have not had to use ketone testing since I was dx as type 1 about 20 years back, I think it took about 2 weeks for my blood ketones to fall away as I remember (after some days in hospital on continuous insulin infusion and potassium drip ).

      • Alex Rossie says:

        The ketones themselves aren’t super problematic even though they cause a acidosis as you say. It’s the dehydration, these people can have lost 5-10kg of water (along with vital salts). So you could say ketone levels are never really that important.

        Thats why doctors use urine testing sticks which just give results of negative, +, ++, +++.

        But what about dieters? I firmly believe diets are pointless. You need to make a change you can maintain forever. Hitting the atkins for 2 weeks is great but the weight will likely return in similar time. You need sustainable changes to your eating habits and these almost nessesarily shouldn’t make you particularly ketotic.

        Alternate day starvation seems interesting though.

  3. Chris says:
  4. dALE says:

    I’m just going to say, When I was in the Navy and struggling with weight control, I would have appreciated a tool like this.

  5. Blunts Moke says:

    >Without access to a lab that can measure blood ketone levels, it’s difficult to say if >[Jens] device really works as intended.

    Drink a known amount of some ketone (…10ml acetone, yum!) and watch it appear on the sensor. This is called “spiking” and it’s how “actual labs” get quantitative results from a GC trace.

  6. Jeff says:

    I am doing a Ketogenic diet for weight loss and this would certainly be handy.

    For the record, i am down 40lbs.

  7. vonskippy says:

    “and two sensors – one for acetone, and another for temperature and pressure”

    and another for temperature and HUMIDITY (not pressure).

  8. Mike says:

    O.k. Ketoacidosis is a very real problem for people with type 1 diabetes. Having said that, a sick day, where you can’t eat normally and reduce your external insulin intake can cause your body to burn fat instead of use the carbohydrates. The ability to measure Ketones by blood meter is readily available, for example the Precision Xtra which we use for monitoring my oldest child’s ketone levels as needed. This however is not as accurate as blood drawn ketone tests, however the meter method still uses a finger poke to draw blood and interstitial fluid. You could use a meter to get a closer representation without the need to exact large amounts of blood/lab time to do a closer rough calibration. So a non-invasive meter(read NO Finger blood draws) would be a welcome addition to most people with diabetes that already do a lot of blood glucose checks, just to have that sanity of mind that they are not rising too fast or that their body has become flooded with ketones and starts shifting the pH balance of the body. The dehydration isn’t the only worry with Ketoacidosis, the pH shift can eventually lead to a coma and organ shutdown. Hence why DKA is such a big worry with people stricken with Type 1 diabetes.

  9. RandyKC says:

    Using a breath-analyzer for ketones would be good to help correlate to blood levels. The problem with the urine sample for ketones is that it tells you after the fact when you are already in trouble. Maybe could integrate/average the breath-analyzer result to correlate to urine sample results?

  10. Mark says:

    I feel I should post a warning about ketogenic dieting, based on personal experience…take from it what you will:

    First the good news: While dieting using ketosis as a method to promote weight loss, I was able to drop a significant amount of weight (~50 lbs.)

    Now the not so good news: I found it difficult to transition back to anything approaching a normal diet and maintain the weight loss…i.e. it was very easy to gain the weight back and return to my start weight.

    The even less good news: The side effects of ketogenic dieting can be significant. At the time I was unaware, but a few years after dieting I started doing some digging and found a number of studies about ketogenic dieting that matched my personal experience. The most significant, to me, was a study done by the Canadian Army (during WWII) to determine the effects of using pemmican as an emergency ration. A number of additional studies have been done, demonstrating and attempting to ameliorate the results that ketogenic dieting can have a severe consequences in producing lack of energy, listlessness, irritability and depression. It does appear that careful maintenance of sodium and potassium levels may lessen such effects.

    My personal experience with lack of energy, irritability and depression were significant and had lasting personal consequences.

    So, props for the hack! However, like many other interesting devices, be warned that it warrants thoughtful application.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 91,933 other followers