• Arduino,  Hardware

    Making my air conditioner smarter – Epilogue

    Making some maintenance in my house, I decided to fix the air conditioner in my living room, a Johnson MGE-30-BC, which has been non-working for a long time.

    I bought my house two years ago, and the air conditioner wasn’t working by then. I have always been delaying that repair project because I was expecting the worst possible outcome (maybe the gas escaped and I would have to find the leak, fix it and refill the circuit? maybe the compressor was broken, and I would have to replace it (and also empty and refill the circuit too), maybe more than one thing is faulty and I would have to replace the whole machine?… You know, that kind of repairs, which are not cheap), but… it turned out to be the easiest repair in a long time: the multi-wire cable that connects the inside and outside units has wires of the same color, and two of those wires were connected wrong.

    I don’t understand how that would happen… ¿the person who installed it didn’t try it? Maybe he/she thought it was faulty? Why didn’t he/she go to the store to retrieve his/her money? Was he/she just lazy? The only thing that I know is that I have a working aircon in the living room now 😂.

    Now that it is working, and being the owner of another aircon in my bedroom which I can control with my phone, I thought the living could not be less, and started once again decoding the remote IR codes, as I did some months ago with my bedroom unit.

  • Arduino,  Hardware

    Making my air conditioner smarter – Part 3

    << Continuation of Part 2

    Time to end this project and start thinking about the next one 😄.

    In the previous post, we ported our code to control the air conditioner to our small ESP-01. Now we need to install everything inside the air conditioner and make it work.

    First, we need the small board to power our ESP-01 and connect it to our IR LED. We do not need much: a small voltage regulator (in our case an LM317), a couple of resistors to configure it to 3.3v, a 2×4 female pin connector and a couple of resistors to put the ESP-01 into normal boot mode. The small schematic I came up with is below:

    Everything looks ok, let’s assemble it. The easiest and fastest is to use a perfboard, but in the future we try etching them with acid 😊

    What to do when you don’t have the exact resistor you need? You stack them in series 😊
  • Banner
    Arduino,  Hardware

    Making my air conditioner smarter – Part 2

    << Continuation of Part 1

    I come back from the shadows to continue my “smart air conditioner” 😄

    In the previous post, we got working a small test sketch that let us control our air conditioner with an arduino mega. Now it is time to port that sketch to an ESP-01 to make use of its WiFi connection and compact size, which is not much inside the air conditioner unit.

    As in my smart washing machine (that keeps working a year and a half later 😊), the idea here is to use MQTT for the communication between my small IoT server which has OpenHAB installed. For this MQTT communication, we will need the PubSubClient library.

    #include <ESP8266WiFi.h>
    #include <WiFiClient.h>
    #include <PubSubClient.h>
    
    .
    .
    .
    
    void reconnect() {
      // Loop until we're reconnected
      while (!client.connected()) {
        // Attempt to connect
        if (client.connect(mqttClientId, mqttUser, mqttPassword)) {
          // Once connected, resubscribe
          client.subscribe(mqttPowerCommandTopic);
          client.subscribe(mqttModeCommandTopic);
          client.subscribe(mqttTempCommandTopic);
          client.subscribe(mqttSpeedCommandTopic);
        } else {
          // Wait 5 seconds before retrying
          delay(5000);
        }
      }
    }

    For managing the WiFi connections, I found a library that lets us configure a new WiFi connection, in case we change our WiFi password, without having to reprogram our board, which is great. It is called WiFiManager. In this case, we choose to open a protected WiFi connection in case of not being able to connect to the saved WiFi connection, and retry after 3 minutes (180 seconds).

  • Arduino,  Hardware

    Making my washing machine smarter – Part 5

    << Continuation of Part 4

    The time is now .It is time to connect the new guts to my washing machine, and check if everything works as expected. Well, almost… I just remembered that when I prepared my washing machine for the modifications (part 1), I didn’t prepare the start button, which will be pressed using our relay, and this way, will start the washing program.

    The modification should be simple. To solder a couple of wires to the start button. We will see how it turns out 🙂

    First, we will open the top lid of the washing machine and find the way to unmount and disconnect the control panel. In my case, it was secured with four screws and some plastic clips. After disconnecting the cable connectors, I had the whole panel in my hands.

    Factory fingerprints included in the price
  • Arduino,  Hardware

    Making my air conditioner smarter – Part 1

    What’s better than working on a project for improving an electronic device (see Making my washing machine smarter)? Working on two projects!

    I have a Daitsu air conditioner in my bedroom. It is an old model, the DSG-07HRN2. My plans are: I want to control it from my phone, and be able to program it accoring to X criteria in the future (temperature, month of the year, if I’m at home or not…). I could use OpenHAB for this of course, as I did with my washing machine, but first, I need to connect my air conditioner to my OpenHAB server, which, being an old non-smart model, is not possible without modifications.

    I could use some king of magical (and probably expensive) thingy that externally sends the commands using infrared and uses a proprietary APP to control it (I know of their existance), but… where’s the fun there? 😜. My idea is to use another ESP-01 microcontroller, and send the infrared commands from inside the air conditioner unit itself. I’m sure this is going to be interesting 😊.

    First, let’s investigate which kind of protocol does the original remote use, I used the IRrecvDumpV2 example sketch from the Arduino-IRRemote library, created by Ken Shirriff and other contributors.

    When I tested my remote on my arduino MEGA, I was surprised it said the protocol used was SAMSUNG, which has nothing to do with Daitsu. Interesting.

    Samsung? Daitsu? Do they use the same protocol? Or is it an error from the sketch? Will we find out?
  • Arduino,  Hardware

    Making my washing machine smarter – Part 3

    << Continuation of Part 2

    Let’s start assembling the board that will control the state of the washing machine cycle. Four things are needed: the microcontroller, its power supply (the microcontroller works at 3.3 volts, and the power adapter we’re using works at 5v), the door lock detector and the actuation over the “start washing cycle” button.

    As stated above, the ESP-01 needs 3.3 volts to work, a ground connection and needs to have pulled high (using a resistor, like a 10kohm one for example) the GPIO0 and GPIO2 pins in order to boot correctly. Apart from that, an output pin will actuate the start button and an input pin will detect the door lock state.

    The 3.3 volts power can be obtained using, for example, an LM317T, a famous classic voltage regulator that, using a couple of resistors allows us to get a specific voltage. Using one of the many online calculators, we can calculate which resistors we need. In my case, I used this one.

  • Arduino,  Hardware

    Making my washing machine smarter – Part 1

    I like challenges, and I also like smart devices, what we usually call “gadgets.”

    What do I miss in my washing machine? Notifications to let me know when it is done washing my clothes. Yes, some models play a catchy little tune to make it clear that they are done, but not mine… Even if I had one of those singing washing machines… What if I’m listening to music with headphones? What if I am upstairs? Well I will have to be checking every little bit. Also, the washes are somewhat flexible in wash cycle duration (they do not have exactly X minute wash cycles, since depending on the clothes you are going to wash, it will be easier or more difficult to evacuate the water). I usually use the 60 minute wash cycle, unless the clothes are really very dirty, but the real time in my case is actually 63 minutes one day, maybe 75 the next…

    The victim

    Tired of this, I have decided to open my washing machine and figure out some way to detect when it ends, in order to launch a notification to my phone. And if I can make it possible to activate the wash cycle remotely at the same time, that would be even better (my poor low-cost washing machine does not even have the function of deferring the start of the washing cycle by X hours …).

  • Arduino,  Hardware

    A pinch of hardware – Makerbuino

    I would like to tell you about a different videogame console that is a bit different from the others. Why different? Does it have an even faster processor? Even more RAM? Can you play Crysis on it? No … It has an ATmega328 as a processor (you probably have heard about that chip, it is the one that comes with Arduino), 2KB of RAM and a screen… Full HD? 4K? Umm no… A black and white LCD with a resolution of 84 x 48 pixels. Yes, exactly, like the good old Nokia 3310.

    Ah, but I haven’t told you the best … It doesn’t come assembled, and that’s exactly what made me buy it. Assemble your own console that you can then play on? Interesting, right? 🙂

    Based on Gamebuino, another similar console project (although this one does come assembled, it is not necessary to dust off the soldering iron… Booring), this console promises to have fun both when assembling it, when playing and even when coding games for it (yes, it is Arduino after all. You have all the freedom to create games, applications and everything you can think of (even some hardware hacks, since it has a couple of I2C expansion ports)).

    The project itself is not new. It dates from the beginning of 2017, and was quite successful on Kickstarter, its launch platform. They are still selling copies from their website , so you still can get one. Why not?

Esta web utiliza cookies propias y de terceros para su correcto funcionamiento y para fines analíticos. Al hacer clic en el botón Aceptar, acepta el uso de estas tecnologías y el procesamiento de tus datos para estos propósitos. Ver
Privacidad