TheSalkku3.0 – News for 2016 season

Since winters are pretty long and dark here in Finland there’s plenty of time to do some more or less useful things. This time it got to be useful :)

Fuel gauge to monitor generator’s fuel level

Since we have very few fields with electricity here in Finland practically all of us have an generator to charge on the field. That is surely one thing I always forget, to refuel before it shuts down. So. Something had to be done for that issue.

After some studying what could be done I ordered a fuel-sensor, some arduino-stuff and now I have an generator with WiFi.

The sensor can be seen next to filling-cap and the WiFi-antenna on the background. The generator of choise, Kipor IG2000 conveniently has also an 12VDC output so just a 7805 is needed to get the adruino and HLK RM04 cards to work. The sensor is 12V model. (Actually 10-30V.)


Idea is pretty simple, since the F330 fuel sensor was ordered as 0-5V model arduino mini reads the value and outputs it as serial data to HLK RM04 serial-to-wifi card everytime the www-interface in HLK RM04 get’s a read, so there really is no www-server involved, practically it’s the arduino acting as a server. Wifi card is connected to the wireless network TheSalkku3.0 already has. After that the software reads the value and makes a real-time gauge in to bottom of the interface.

The arduino-code is easy:

// Arduino sketch created by Tero Salminen 2016
// For F330 Fuel Sensor with 0-5V configuration
// Based on Nikos Georgousis Wireless_Temp from

float analogVal;
float fuel;
float referenceVoltage;
void setup() {                
  referenceVoltage = 5.00;

void loop() {
  boolean has_request = false;
  if (Serial.available()) {
    while(Serial.available()) {
      char c =;
    has_request = true;
  if (has_request) {
    Serial.println("HTTP/1.1 200 OK");
    Serial.println("Content-Type: text/html");
    Serial.println("Connection: close");
    Serial.println("Refresh: 5");
    String //sr = "\n";
    sr = "";
    int analogChannel = 3;
    for(int i = 0; i < 25; i++) {
	    analogVal += analogRead(analogChannel);
    fuel = analogVal/25;
    fuel = (fuel * 100) / 1023;
    sr += fuel;
    Serial.print("Content-Length: ");
    Serial.println(fuel, 0);
    has_request = false;

The result is a webpage with just the value of fuel level in 0-100 without any formatting. That value is then read by the software in TheSalkku3.0 and the gauge is generated to the bottom of the interface:


Since the generator is not running all the time I wanted it to be seen that it is offline so I made the fuel-pump picture gray when generator is offline.


Now I just need an audio to shout “Fuel up you moron!” when fuel-level drops too low :)


The complete features of my charger-case is readable on it’s own page here, the hardware has an own page found here.

5 thoughts on “TheSalkku3.0 – News for 2016 season

    1. Yes, it's this one:

      You need to contact them and ask for price, remember to mention that you need 0-5V version, calibrator and a model that you can cut to lenght. (Some materials cannot be cut by end-user)

  1. Hi there,
    I am a fan of DIY projects. I have a i4010 and i308 charger; I would like to monitor their function using bluetooth or wifi network to my android celular. Is it possible?


  2. I got to this site by accident! I am impressed with what you accomplished! I have a 308 duo charger so my obvious question is if your system would ruin on windows and if so, fo you perhaps sell your software.
    Cape Town
    South Africa

    1. In theory yes, in practice no. It's really ugly code and a mess of different languages used.

Leave a Reply

Your email address will not be published. Required fields are marked *