Laser cutting a ”ME” stamp

Ever since I built my little laser cutter I have been trying to find different uses for it. Today I decided to see if I could laser cut a stamp out of EVA foam.

Step 1, Prepare the image for laser cutting.

I decided to let my narcissistic side run loose and choose a picture of me to make a stamp out of. If you want more details about how to make a stencil from a photo check out this tutorial.

Step 2.

Generate the g-code from incscape using the laser plugin and cut the eva foam.

3. Glue the EVA foam stamp to a piece of wood and use a saw to make it a little bit more easy to use. Once the glue is dry the eva foam frame can be removed.

4. Stamp away! I used acrylic paint and a sponge to get the paint onto the stamp.

How to repair a Samsung LE40M87BD LCD TV

The other day my TV suddenly turned itself on. I turned it off again, but sure enough after about 30 minutes it was on again. It didn’t take long before the TV was unable to start at all. When I pressed the power button, the TV started to click and the red status LED flashed. I suspected that it didn’t get enough power to start. To me this sounded like some kind problem with the power supply, probably a bad capacitor. Sure enough, after opening the TV, I found three capacitors that were in bad shape, and after replacing them with new ones, the TV works perfectly again!

I suspect that this is a quite common problem, and this solution is probably applicable to more models starting with LE40. However, if you have a model that starts with LE40R*, then this solution might not be enough since there is a memory on the logic board that could have been broken when the capacitors failed. Since it is a quick, cheep and quite easy fix, it might at least be worth to open your ”broken” TV to see if it suffers from the same problem as mine. I payed 5$ for the capacitors, and you can probably get them even cheeper on eBay.


This is a pretty simple repair, and you don’t have to have any great soldering skills, but you do need a few tools and of course new capacitors to replace the broken ones with.


  • Screwdriver, PH2
  • Soldering Iron
  • Solder
  • Solder sucker
  • Wire cutter
  • 3 pcs of 1000uF 16 or 25V electrolytic capacitors

Step 1, open the TV.

Put the TV on a soft surface (like a bed) with the display facing down and remove all screws holding the back together. After all screws have been removed, you should able to lift the back cover right off.

1. back_open

Step 2, look for any bad caps on the power board.

The power board is the white circuit board in the middle of the TV, (the capacitors that were broken on my TV has been marked byd arrows in the picture above). You can tell if the capacitor is broken or not by looking at it. It should have a nice flat top. If the top of the capacitor is bulging, it is broken or damaged. If you are unsure, compare it with the other capacitors around it. They should look the same.

Step 3, Desolder the broken capacitors

Now it is time to remove the broken capacitors! Start by removing the power bard from the TV, unscrew all screws and and disconnect all wires to be able to remove the card from the TV. After removing the card, locate the solder joints for the bad capacitors on the cards backside, the green side. In my case the capacitors were CM811, CM812 and CM817. Use the soldering iron to heat the solder joints, when the solder turns liquid, use the solder sucker to remove the solder. If you have problems melting the existing solder, try adding some new solder on top of the existing solder joints. This might sound counter productive, but when we add more solder we create a bigger surface for the soldering iron to heat and this makes it easier to heat it. Once you have removed as much solder as possible with the solder sucker, you should be able to remove the capacitors by hand. Be a bit careful when you do this, since there is a risk that you will brake the copper conductors on the circuit board if you bend to much. It can help to add some more heat with the soldering iron while bending if you have problems to remove the bad capacitors.

Step 4, Mount the new capacitors

The existing capacitors that broke were 1000uF 10V capacitors. Since they broke, I suspect they were under-dimensioned. There for I replaced them with 1000uF 25V capacitors instead. What is important here is that the capacitor that you use is 1000uF and at least 10V, so anything above 10V is also ok. I would recommend using 1000uF 25V capacitors. I got mine from the local TV-repair shop but you can also easily find them on eBay.

These capacitors are what is called polarized, that means you have to connect them the right way. To see which of the capacitors legs is the anode (+) look at the length of it, the longest leg is the anode (+). Almost all capacitors are also marked with a (-) on the capacitor housing indicating which leg is the cathode (-). Thread the capacitors leg through the holes and make sure the anode is in the hole marked (+) on the circuit board. Now solder the new capacitors in place and clip the legs of the new capacitors close to the board to make sure they don’t cause any short circuits.

Hopefully you will now have a working TV again.

What can you cut with a 300mW DIY laser cutter?

I built this laser cutter after being inspired by this laser cutter and the design is almos identical, there for I will not go into details about my build but will instead focus on what you can do with it.

Since the diode (LPC-826) I have used is from a DVD burner and have an output power of 300-400 mW, it can’t be considered very powerful when it comes to cutting lasers. It should not be confused with a CO2 laser which have an output power of 50W, which is the type of laser that is normally is used in professional laser cutters.

The materials I have tried so far are:

  • Adhesive plastic (stickers) – Cuts right through
  • Art Foam/EVA foam – Cuts right through
  • Wood – It burns the wood but does not cut. Can be used for engraving.
  • Paper – Black copy paper can easily be cut but thicker paper does not work. White paper does not work.
  • ABS Plastic – The surface melts so it is possible to engrave but it can’t be cut.
  • Plexiglass – Not a mark.
  • Plasticard – The thinnest sheet I tried could be cut at low speed but only after having been painted black.

Adhesive plastic

This is what I find by far the most useful application for this laser cutter. So far it has been able to cut through any type and color of the adhesive plastic that I have tried. It is quite easy to cut stencils or stickers. I often use it for cutting custom drilling and cutting templates for other projects. If you want to know how to use photoshop to create stencils from pictures stencil revolution has a good tutorial.

I did some experimentation with masking off parts of a steel plate with laser cut stencils and then I created rust by using Hydrochloric acid and Hydrogen peroxide. It worked pretty well however I need to work some more on the proportions between the Hydrochloric acid and the Hydrogen peroxide to get a nice rust coating on the unmasked metall. A word of caution, do NOT do this inside. I did and now I have a nice rust coat on every un protected piece of metal in my lab. Also wear gloves and eye protection. If you want more details about on the method I used to create these look in the comments for the video.

Art Foam/EVA foam

I have not done much cutting in EVA foam, mainly because I have not had any use for it. But if you are building small models and need laser cut parts this laser will get the job done for you.


Wood can be burnt but not cut. So if you are the woodworking type you might have a use for it. Sometimes I have seen that the laser does not start to burn instantly and that it takes a darker part of wood for the laser to get started, once it has started to smoke it goes on burning from that point.

ABS Plastic


When it comes to hard plastics like ABS it can melt the surface but not burn through. So just like it is with wood it is possible to engrave on ABS. The picture shows a quick test and is not the most beautiful thing I have done but it gives you an idea what to expect.


If you are still interested in the hardware here is a quick rundown of the parts.


The whole frame is made from wood and the sliding tray slides on drawer sliders. Both x and y-axis are propelled by an M6 threaded rod.

The coupling between the frame and threaded rod consists of a M6 extension nut that I have incased in Polymorph plastic, Polymorph plastic softens enough to be molded by hand if you put it into boiling water and after it cools down it feels as hard as vinyl, very handy for motor mounts and this type of applications.


Both motors are NEMA17 stepper motors, 200 steps per revolution.


The laser is a MITSUBISHI/658nm-660nm 300-400mw CW Red Laser Diode/LPC-826 that I bought from eBay. It is mounted in a standard 5.6mm Laser Diode housing with a round heat sink. It is powered by a LM2596S based power module with built in current limitation. This way you will not risk feeding the laser to much power.

The LCP-826 diode should be run at an operation current <400mA and operation voltage <2.2V. To achieve this I started by connecting the 12V I use to drive the stepper motors to the IN on the DC-DC step down module. Then I connected a multimeter in Voltage measuring mode to the output on the board and adjusted the potentiometer closest to the input terminal on the card until I had 2.2V on the output. After I hade the desired voltage I changed the multimeter setting to Ampere measuring mode, remember to move the cable, and then adjusted the potentiometer closest to the output until I had a current output of 400mA. The middle potentiometer controls one of the diodes on the charger circuit and you can adjust it to set at what current the diod should light up.

LM2596S DC-DC Step-Down power supply. Picture made by coachlam.

LM2596S DC-DC Step-Down power supply. Picture made by coachlam.


The laser is turned on and off from the spindel on/off pin of the Arduino nano. Spindel on/off is connected to an Logic level Mosfet which enables me to control a 12V signal from the Arduino.

Remember that you should always wear laser eye protection when using this kind of lasers. When I started to build this laser cutter I decided to buy a pair of laser protection glasses. After doing some reading I decided on a pair from called LSG08. The LSG08 are designed to block light at the frequency 190-450nm and 598-752nm which covers this laser. I am no expert but from what I found after some reading I wanted a pair that was OD5-6 certified. OD stands for optical density and each step on the scale is a factor of ten. So OD1 will reduce the amount of light of a specific frequency by 10, OD2 would reduce it by 100 etc. Here is a diagram of the LSG08 light blocking properties.

LSG08 OD diagram

I am not saying that the really cheap glasses that you can buy of e-bay for around won’t work but I didn’t want to take that chance. The ones I got from dragon lasers does seem to work very well since I can still see! What is important is that the laser protection glasses are designed to block the frequency of your laser. If you are using a infrared laser then this is extremely important since the light is not visible to the naked eye.


The stepper motors are controlled by two Easy driver stepper motor drivers. The Easy drivers are connected to an Arduino nano which is running grbl 0.8. They are connected as described on the grbl wiki page. Power to the laser is turned on and off using a logic level mosfet.

Limit switches

I have connected two micro switches to both sides of the x-y table, the limit switches as they are called serve two purposes.
1. Stop all movement if the end of the x-y table is reached.
2. Serve as indicators for the homing sequence.
The homing sequence is used when starting up the cutter to find the starting point every time you start. When you initiate the homing sequence the machine will run both motors until both switches in the negative directions are triggered. Then the motors will reverse direction and run slowly until the switch is released and that is the starting point. The homing sequence is initiated by sending the command $H to the controller and most G-code sender applications has a button to initiate the homing sequence.
One very very important thing to have in mind when using grbl as a base for a laser engraver is that you have no z-axis. However the homing mechanism used in grbl expects the limit switches for all three axis to trigger, there for you have to wire a pushbutton to serve as your z-axis during the homing sequence. If you don’t have the faked z-axis limit switch, which you manually push, the homing sequence will never finish. An option to get around this would be to wire one of the x or y axis limit switches to the z-axis pin so that it serves as switch for both.
The limit switches are simple normally open micro switches that you wire from ground to pin 9 (x), 10 (y) and 11 (z) on the Arduino.


For software I use UniversalGcodeSender-v1.0.6 to send the gcode to the Arduino that has been loaded with grbl 0.8. To create the gcode from an image I use Inkscape together with the LaserEngraver plugin. The whole procedure is very well documented in this instructable written by Groover.

Ketosense – An Arduino based ketosis detector

In this post I will go through the hardware and software of the instrument I have made. If you are curious to why I have made it, I would recommend that you start reading the other posts I have done about this project and work your way forward. Just click on Ketosis detector under categories.


The instrument´s purpose is to detect the amount of acetone gas that is present in a persons breath.

By measuring the amount of breath acetone gas present in a persons breath, it should be possible to determine wether or not a person is in a state called ketosis. Ketosis is, very simplified, when the body runs on fat rather then carbohydrates. If you eat a ketogenic diet, your ketone levels will be elevated. Currently, the only way to monitor your ketone levels are either to take a blood based test or a urine based test, with test strips that changes color depending on the amount of ketons that are present. Both methods work fine but the blood method is very expensive, about 2$ per test, and the urine method is not very precise. Being the curious type of person, and getting inspired by a podcast where Steve Gibson was talking about building an instrument like this, I decided to give it a shot myself.

On a very high level, the instrument consists of an electrochemical gas sensor that is sensitive to various types of gases, a combined hygrometer/thermometer and an Arduino Uno board. The electrochemical gas sensor and hygrometer/thermometer has been placed in a plastic case that serves as a ”gas chamber” that you blow into to collect the gas sample. If there is gas present in the air, the resistance of the sensor will decrease. The decrease of resistance is dependent on three factors; gas concentration, humidity and temperature. If these values are known, it is possible to calculate the gas concentration in PPM (parts per million) using the data sheet provided by the manufacturer.

Does it work?

I don’t normally eat a ketogen diet, but in the name of science and curiosity I gave it a shot. Over the last two weeks I have and taken measurements with the Ketosense and compared them to the results from urine test strips. During the first 10 days, I ate a strict ketogen diet consuming less then 50 grams of carbohydrates a day. I took a reading each morning before breakfast, and one right before going to bed. However, the urine test strips does not have a very granular scale, so it is difficult to say what the exact concentration is  when you go above 1,5 mmol/l. The steps of the Keto-Diastix are 0, 0.5, 1.5, 4, 8 and above 16.

The measurements taken with the Ketosense actually correlates a lot better then I expected to the reference measurements from the Keto-Diastix. This means that the hypothesis that it is possible to calculate ketone levels based on the amount of acetone present in a persons exhalation, seems to be sound. One realization I had was that you have to eat very large amounts of fat to really get the ketones going, it was not until I started to eat a few spoons of 100% coconut fat a day that I reached higher levels of ketones, (witch can be seen around measurement 17 in the graph).


Main Unit


Total price for the components is about 30$.

TGS822 – Electro chemical gas sensor

This sensor works like a resistor, the higher the gas concentration is, the lower the resistance gets. It has 6 pins, the two middle pins are the power to the internal heater and the other are the resistor connections. There are two pairs of resistors connectors called ”A” and ”B”, but they are essentially the same so I just soldered them together. It is very important that the power provided to the internal heater is exactly 5 Volts, or else you risk damaging the sensor. I used an LM7805L voltage regulator to provide the power for both the TGS822 and the DHT11 sensor.

This sensor is far from ideal to be applied in an application as this, it is slow to start, sensitive to humidity and temperature, sensitive to many other gasses other than acetone, and almost impossible to calibrate without special equipment. A wisdom I can pass on, is that one of the gasses the TGS822 is sensitive to is ethanol so don’t try to demo or measure your breath acetone during a dinner where there is wine served. The sensor is so sensitive that it goes bananas if you just have a glass of whine next to it.

The TGS822 is connected to the Arduino on analog pin 0 in parallel with a 10k resistor to create a voltage divider circuit.

DHT11 – digital temperature and humidity sensor.

I added the DHT11 sensor because the characteristics of the gas sensor changes depending on temperature and humidity. Since a persons breath is both humid and warm, it was necessary to factor that in when trying to determine the gas concentration. At first I had placed both the gas sensor and the temperature and humidity sensor close to each other. This turned out to be a mistake since the heater in the gas sensor heated the air around it, thus drying out the air and elevating the temperature. To avoid this, I moved the temperature and humidity sensor to sit as far away from the gas sensor as possible.

The DHT11 is not very fast, especially when it comes to humidity. It can take about 2-3 minutes before the humidity reaches it’s max value. This presents a bit of a problem when it comes to scaling the reading from the gas sensor, depending of humidity from the DHT11. The gas sensor reaches it’s max value just seconds after you finished blowing into it. So if you read the DHT11 at the same time as the gas sensor reaches it’s max value, the humidity value will be to low because the DHT11 is slow.

After blowing into the instrument a couple of times I noticed that the temperature and humidity of a persons breath was stabile at around 60% humidity and 28-29ºC. After realizing this I hardcoded the temperature and humidity to those values to get the scaling right without having to wait for the DHT11.

The DHT11 sensor is connected to digital input pin 10.

16 x 2 Character LCD Display Module

The display is wired as such:

RS: Pin 2
EN: Pin 3
D4: Pin 4
D5: Pin 5
D6: Pin 6
D7: Pin 7

I used the LCD crystal library by David A. Mellis, Limor Fried,  and Tom Igoe to control it.


There are three switches on the Ketosense. One to trigger a reset cycle of the gas sensor, one to reset read max value and one to toggle between the result being displayed as PPM or mmol/l.

resetMaxSwitchPin = 13;
resetSensorSwitchPin = 12;
toggleModeSwitchPin = 11;

Mouthpiece case

When choosing a case to use as a mouthpiece, make sure it is easy to open to be able to ventilate all gas in between readings.

Breadboard view of the whole circuit



This is my first time doing anything with an Arduino so I learned as I went along, the code is not very pretty and I am sure that there are many better ways to get it done, but this way works good enough for me. The code is available at my Github, it is perhaps not super clean but I will try to explain the concepts in words here to perhaps make it a bit more understandable.

Initiation and reset sequence

As I mentioned in the hardware section, the TGS822 sensor is quite slow. When you power on the Ketosense it can take up to 10 minutes before the sensors resistance is stabile, so to determine if the sensor is stabile, readings are taken continuously every second and compared. If the reading changes less then 5 steps over 20 seconds, the sensor is determined to be stabile otherwise the sequence restart.

After a person has blown into the Ketosense it takes a few minutes for the sensor to reset, so the same method as described above is used to determine if the sensor is able to do another reading. This is triggered by pushing one of the buttons.

On the left you can see the Ketosense while it is in startup mode waiting for the sensor to become stabile. On the top row H = current humidity, T = current temperature and i = what step in the 20 second cycle the algorithm that determines if the sensor should be considered stabile is at. On the bottom row the Max and Min value detected on when reading the voltage from the sensor, if the sensor is to be considered stabile and ready to use to take a measure the difference between these two values has to be less then 5. After the sensor has been considered stabile the user is prompted to start the measurement by blowing into the mouthpeice.

Making sense of the readings from the TGS822

The only info I had about the TGS822 was what was written in the datasheet. I wrote a post a little while back called ”Calibrating a Figaro TGS822 sensor, by drawing…” so take a look at that if you want to know more about my thoughts on how to use the info in the data-sheet.

Since I feed 5V to the sensor and it is connected in a voltage divider circuit with a 10k resistor the voltage going into the A0 port of the Arduino is between 0-5 volts. The Arduino then divide it into 1023 parts so the value I actually read from the sensor is a voltage where every step is a change of 5/1023 = 0,0048V.

To get the resistance of the corresponding to the voltage read use this formula:


To find the relation between resistance and gas concentration I did some regression analysis using libre office. I found out that a reasonable approximation to the ppm vs voltage can be achieved with the functions:

if resistance is between 50kΩ & 3600Ω
logPPM = (log10(tempResistance/R0)*-1.5512)+2.5911
PPM = pow(10, logPPM)

if resistance is below 3600Ω
logPPM = (log10(sensorResistanec/R0)*-0.9768)+2.4906
PPM = pow(10, logPPM)

How I went about calculating my sensors R0 is described in the post called ”Calibrating a Figaro TGS822 sensor, by drawing…” I noticed that in the graph for gas vs resistance in the datasheet, it stated that in Air the resistance is ≈ R0 * 19, so I simply divided the startup resistance of the sensor  after it had stabilized with 19 and went with that.

calculated value vs datasheet graph


I applied the same reasoning for temperature and humidity graph and there the function is:

scalingFactor = (((Temperature * -0.02573)+1.898)+((Humidity*-0.011)+0.3966))

The last thing to do is to convert from PPM to mmol/l since that is the most common unit when talking about ketone levels. Im not entirely sure that I got it right but it seems to give reasonable results.

float ppmInmmol = (((float) PPM / 1000) / 58.08);
ppmInmmol = ppmInmmol * 1000;

58.08 is the molar weight of acetone.

Fine tuning the scaling function

After doing the 14 day journey into ketosis I had enough data so tune my original scaling functions to fit the reference of the Keto-Diastix.

logPPM = (log10(sensorResistance/R0)*-2,6)+2.7
PPM = pow(10, logPPM)

I also updated the R0 from 3000 to 4500.


Collecting the measurement

After the Ketosense has started and is stabile, the display prompts to the user to blow into the mouthpiece to start. Actually the measuring has already started, even before that point, however the screen is only updated once the sensor is reading changes and thus indicating that someone is blowing into the mouthpiece. The samples are taken three at a time with 5ms between them and compared to each other. For a measurement to be considered valid, all three samples has to have the same value. This is to minimize the risk for an unexpected voltage rise that would give a false indication as a max value. If a sample is considered valid it is then scaled based on humidity and temperature. As I wrote in the hardware part, the humidity is hardcoded to 60 and the temperature to 28 due to the DHT11 sensor being much slower then the gas sensor, thus causing the scaling to be wrong if both sensors are being read at the same time.

Ketosense_measuringEvery time the collected value is valid, (3 samples after each other that are the same), the screen is updated. The current reading is displayed on the bottom row as ”Now:” If the current value is greater then the last one, the ”Max:” is also updated. Typical behavior is that during the first 30 seconds after someone has blown into the Ketosense mouthpiece the max value keeps increasing, therefor the gas collection chamber is crucial to give the gas sensor time to react. It is possible to tell when the actual max value has been reached since the ”now value” is decreasing and is lower than ”max value”.

To reset the instrument to make it ready to use for another measurement, remove the cover of the mouthpiece to ventilate the current sample and then push the reset button to trigger the same sequence as during startup to detect when the sensor has been reset. The reset button is actually the little nut (button) in the middle beneath the dispalay, (the microswitch was not tall enough to reach out of the case, so I extended it by gluing a nut on top of the switch). The nut on the left is to switch between displaying the result as PPM or mmol/l and the one to the right to reset the current max value.


I would not go as far as to claim that my instrument works, It is tricky to decide if it does since I don’t have a reliable way to get a reference other then the keto-diastix, (and those are not exact enough). But I will go so far as to say it looks promising.


If I had access to an instrument reading blood ketone levels, it would be possible to further improve the scaling functions relative to that. Take one measurement of blood ketone levels, and then blow into the Ketosense and write down the raw voltage from the TGS822 rather than the scaled value. Do this for a couple of different values and do some regression analysis on the results and I would have a function that was entirely adapted to my sensor and to displaying ketone levels. However I am not prepared to spend money on a blood ketone level measuring device, but perhaps someone else will after having being inspired by this post.

Another application for this device is actually a breath alcohol detector, since the sensor is actually sensitive to ethanol as well as acetone.

Sources and additional information

I found three different data sheets for the sensor while searching:


Yesterday I received some EL-wire I had ordered. If you don’t know what EL-wire is it is a plastic coated flexible wire about 1 mm thick that glows with a neon glow and runs of a small battery pack. I have not figured out what to use it for but I was curious about it and decided to get some and figure out what to do with it later. I took some nice long exposure photos of it to start with.

DIY graphene videos

In the recent days videos from people who actually made some DIY graphene has started to pop up on youtube and in this post I will introduce you to a few of them.

Robert Murray-Smith

One of the very first people who I think deserves a mentioning is Robert Murray-Smith. Robert is a MacGyver of DIY chemistry and he would of course not be doing something as trivial as buying graphite oxide when you can make it your self from graphite. Robert has posted a whole series of movies where he makes graphite oxide and components necessary for making your own DIY super capacitor. The first videos have terrible sound picture and sound quality but along the way Robert has bought a new camera and more recent videos look and sound much better. Robert has also written some books you can buy online at kobobooks.

Additional videos about graphene and super capacitors from Robert.


Super capacitors

Eric Goeken

Eric Goeken is the first DIYer to post a video where he successfully produce some light scribe graphene the same way I discussed in my first post about DIY graphene. He bought some graphite oxide powder online and went from there.

Additional videos about graphene from Eric.


The user behind unitedstatesgraphene doesn’t go out with his real name in public but he seems to be on his way to make light scribe graphene all the way from graphite as described by Robert. He has gotten to the point where the graphite oxide is drying on the CD-substrate waiting to go into the light scribe burner.

I wish them all the best of luck and I look forward to follow their progress.

Calibrating a Figaro TGS822 sensor, by drawing…

After consulting with the boys and girls at about how to produce an ethanol gas with a 300 ppm without having to buy a lot of fancy gear and thus finding out that it was more difficult then I initially thought I have reluctantly decided that I don’t think I will be able to pull it of. There for I have decided to work with what I got. What I got is air and a datasheet.

The data sheet provided by Figaro for the TGS822 only goes down to 50ppm, however the graph looks pretty logarithmic linear to me so I decided to add the 10-50ppm part my self making a bold assumption that it will be logarithmic linear in that interval as well.

From the data sheet we get the relation between RL and RS which is a voltage divider circuit.

Rs_vs_RlFrom the graph in the data sheet we can also see that the resistance of the sensor in air is RS (air) = R0 * 19.

If we combine these two facts we can express R0 as a relation of RS (air) and the value of RS (air) can be deduced by reading the voltage of the sensor and using the voltage divider formula.

RS (air) / 19 = R0 in my case RS (air) = 78kΩ. => R0 = 4105Ω

When we have R0 we can make a table to relate resistance (RS) to ppm by reading the scaling factor of RS/R0 from the graph for different gas concentrations.

Rs in air = 78000 Ro = 4105,26315789474
ppm Scaling factor Rs = Ro * Scaling factor
0 19 78000
10 15 61578,947368421
10 10 41052,6315789474
20 9 36947,3684210526
20 7 28736,8421052632
30 6 24631,5789473684
30 5,7 23400
40 4,7 19294,7368421053
50 4 16421,0526315789
60 3,5 14368,4210526316
70 3,2 13136,8421052632
80 3 12315,7894736842
90 2,7 11084,2105263158
100 2,5 10263,1578947368
150 2 8210,5263157895
200 1,6 6568,4210526316
300 1,2 4926,3157894737
400 0,9 3694,7368421053
500 0,75 3078,9473684211
600 0,67 2750,5263157895
700 0,58 2381,052631579
800 0,52 2134,7368421053
900 0,47 1929,4736842105
1000 0,4 1642,1052631579
2000 0,2 821,0526315789
3000 0,15 615,7894736842
4000 0,1 410,5263157895

The TGS822 sensor is affected by both temperatures and humidity and it should be complemented with a thermistor and hygrometer so that it is possible to compensate for temperature and humidity. I don’t have any thermistor or hygrometer yet but if we use the ”calculate R0 from RS (air)” every time we start the sensor then perhaps we will also compensate for temperature and humidity, this is something further experimenting will tell.

Hi, I’m Ketosense


During the weekend I have managed to put together a first very early prototype of my ”Ketosense”. It does register when a person is blowing in to the ”gas chamber” where the sensor is located and something that feels encouraging is that my wife gets significantly higher readings then me. Since I’m still a carbohydrate junky and she is not that is exactly what we want. However we do have some hurdles to cross before this thing is useful.


  • Calibrate the sensor
  • Determine sensor characteristics for gas concentrations between 0-50 ppm
  • Build a better moth piece

Calibrating the sensor

Calibrating the sensor is the major thing that needs to be done. In the sensor data sheet there is stated exactly how the resistance of the sensor behaves at different gas concentrations but everything relates to one calibration point, the sensor resistance Rs = Ro at 300 ppm of ethanol. Based on this value we can calculate the relation between sensor resistance and gas concentration for all other gas concentrations. Further in the data sheet it is stated that Rs at 300 ppm of ethanol is between 1-10 kΩ and that is quite a wide range and I don’t want to make a generalization of 5k before I even tried to calibrate it. Right now I don’t rely have a clue how to create a 300 ppm ethanol gas mix but hey, thats just another problem to solve.

Sensor characteristics for gas concentrations between 0-50 ppm

The datasheet for the TGS822 doesn’t have any data for how the sensor behaves at low gas concentrations between 0-50 ppm. In the graph displaying the Rs/Ro relation it looks like the function for the sensor resistance follows a Log-linear model so if I can determine the Ro (Rs at 300 ppm ethanol) of my sensor and also have the Rs for < 10 ppm of gas, which I presume is the ethanol content of normal room air, then I should be able to deduce some info for how the sensor should behave in that range as well.

Moth piece

I quickly understood that to get a good reading you needed to give the sensor some time to take the reading. This means we have to trap the gas around the sensor in some sort of chamber for a while to get a good reading. Right now I have a plastic cup with a tube and some tape over the opening and it does the job. However it is actually to air tight and I have to remove the tape from the opening to vent out the gas after getting a reading for the sensor to be able to reset it self. Another issue with the cup design is the condensation. Breath has quite a high moisture level and after just a few readings with this moth piece you start so see condensation on the inside of the cup and readings from the same person are different from time to time which they obviously shouldn’t be. Both humidity and temperature affects the sensor resistance so I am thinking of getting a humidity/temperature and add that so I can compensate for those factors but I believe that a better design of the moth piece can be just as or even more effective.

Measured sensor characteristics MQ-3 and TGS822

The 48 hour burn in of both sensors has now been completed and I have been able to do some initial measurements of the sensors characteristics. So far both the sensors does seem to react to acetone but that is not rely surprising. The sensor resistance range (Rs) does vary a lot between them, the TGS822 has a span of 300Ω – 78 kΩ while the MQ-3 has a more narrow resistance span of 22.6 – 1.5 kΩ. Since I am interested in low concentrations of gas I want to have as wide range as possible and have therefor selected to go on working with the TGS822 sensor first.

One aspect of the sensors that makes the them a bit annoying to work with is that they have a warmup period of 3-5 minutes before the resistance has stabilized it self and they also take quite a long time to return back to the initial value after a measurement has been done. The time it takes for the sensor to reset is related to how high the gas concentration was.IMG_3363

Figaro TGS822

  • Rs = 78 kΩ, 22 degrees C, 20% Humidity, normal air.
  • Rs = 300 kΩ when blowing into the sensor.
  • Rs = 300 kΩ after ail polish remover puff.

A good value for voltage divider resistor with the TGS822 should be 10k. A 10k resistor would give an output to the Arduino of just above 0.5 V at no gas detection up to a full 5 V for high gas concentrations.

Reset time, Resistance in kΩ/time after acetone puff.

  • 32 kΩ after 7 minutes
  • 41 kΩ after 10 minutes
  • 51 kΩ after 13 minutes
  • 54 kΩ after 15 minutes
  • 58.4 kΩ after 18 minutes
  • 62 kΩ after 21 minutes

MQ-3 sensor

  • Rs = 22.6 kΩ, 22 degrees C, 20% Humidity, normal air.
  • Rs = 15 kΩ when blowing into the sensor.
  • Rs = 1.05 kΩ after ail polish remover puff.

Reset time, Resistance in kΩ/time after acetone puff.

  • 10.5 kΩ after 8 minutes
  • 14.5 kΩ after 16 minutes
  • 17.9 kΩ after 26 minutes
  • 18.9 kΩ after 31 minutes

Blowing at the sensor with clean air did not seem to have any effect on the reset time.

DIY Graphene

I came across a much inspiring video about some scientists at UCLA who successfully made some graphene and using only commercially available equipment doing it.

After watching this I just had to look in to what it would take to make some graphene and perhaps a super capacitor or two of my own. Graphene is a fascinating material and I believe there are hundreds of uses for it yet to be discovered, but again to be able to discover something to use it for I need to have some. So what do I need to rustle up some graphene?

Shopping list for DIY graphene

  • Graphite oxide
  • Light scribe capable DVD burner 
  • Light scribe DVD
  • Substrate
  • Sonicator
  • Pippette

Additional items for super capacitor

  • Ion-porous separator
  • Electrolyte

Graphite oxide

In the report written by Maher F. El-Kady & co they stated that they used a mix of 3.7mg graphite oxide in 1 mL water.

I did some empirical testing on how much water it takes to cover an area as large as a CD and it was around 10ml. So to make a piece of graphene the size of a CD we need 37 mg graphite oxide.

I have found one supplier, although it wasn’t easy, that sells graphite oxide for 120$ per gram and is willing to ship it to me. The price for the graphite oxide per CD would be somewhere around 0.12 * 37 = 4.4$.

Light scribe capable DVD burner / Light scribe DVD

This is probably the object on the list that would be the easiest to get a hold of. A Light scribe capable DVD-writer cost about 40$ here in Sweden and the Light scribe media is about 1$ a piece.


Although it would be possible to make the graphene straight on to the DVD media it would not be very practical since one of the properties of graphene is that it is thin and flexible and a DVD is pretty far both from thin and flexible. What makes a bit more sense is to have some material between the DVD and the graphite oxide that acts as a carrier and also perhaps as an electrode. Maher F. El-Kady & co tried a bunch of different substrates and here I belive there is plenty of room to experiment.

Substrates tried by Maher F. El-Kady & co

  • polyethylene terephthalate (PET)
  • aluminum foil
  • a porous nitrocellulose membrane
  • regular photocopy paper


To state that the researchers at UCLA used only commercially available equipment while making their Light scribe graphene (LSG) is a bit of a stretch. Although graphite oxide is water-soluble you can’t just put some graphite oxide powder in water and give it a stir like it was a cup of Nescafé, that would not disperse it good enough. What you need to do is to smash the graphite oxide powder with ultrasound using a sonicator probe and that is not something everyone has in their kitchen drawers at least not me.

The EpiShear™ Probe Sonicator

However using a proper sonicator probe might not be rely necessary in this case it might suffice using a ultrasonic cleaner instead and those are both much easier to obtain and also a lot cheeper (around 45-55$).


Perhaps not so hard to get but I have to remember to get one. It might be possible to get the graphite oxide solution on to the substrate using some other thing but I think a pipette is a good investment.


So far it feels like making your own graphene is far from impossible but at the same time it is not super easy. I would have to make some investments as well. 0.5 g of graphite oxide would in theory allow me to make 13 ”graphene DVDs” but I would say that a more reasonable number is 8-10 DVDs.

0.5 g graphite oxide, 60$

Light scribe DVD writer, 40$

Light scribe DVD (10 pieces), 10$

Ultrasound cleaner, 50$

Pipette, 5$

A total of 165$ and then add some stretch to that budget brings it to a grand total of 200$.

Update: To see videos where the process described in this post is put into practice check out my another post ”DIY Graphene Videos” about some of the other people online who are working hands on with DIY Graphene experiments.


Klicka för att komma åt El-Kady-SOM.pdf