Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. fifipil909
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by fifipil909

    • Ultrasonic essential Oil diffuser

      Hi,

      my wife like to use essential oil in the house, but basic humidifier use a lot of water and increase the ambiant humidity in the room.
      I notice also that the smell of the oil is not really intense.

      So the idea, modify a cheap ultrasonic humidifier and create an oil diffuser without dealing with water.

      The start, a cheap Donut humidifier 6$ on ebay.

      http://www.ebay.com/itm/Donut-Shaped-Ultrasonic-USB-Humidifier-Air-Essential-Oil-Purifier-Aroma-Diffuser-/301652283655?hash=item463be09107:g:vrwAAOSwBahVbrHo

      then, I decide to build a wood enclosure with a removable top for easy oil bottle changing and put everything together.

      0_1456867650174_20160301_220334.jpg

      The top is maintain by 2 small magnet, and the ceramic caps just touch the top of the Bottle wick.

      0_1456867796260_20160301_220513.jpg

      0_1456867820284_20160301_220905.jpg

      0_1456867846543_20160301_220937.jpg

      Regarding the Sketch, Its like a dimmer, V_status for the On/Off state, V_percentage for the frequency.

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       */
      
      //#################
      // INCLUDE
      //#################
      #include <SPI.h>
      #include <MySensor.h>
      #include <Time.h>
      
      //#################
      // OPTION
      //#################
      
      #define DEBUG
      #define MIN_DELAY  10   
      #define MAX_DELAY  90 
      bool  Diffuser_status;
      uint8_t   Diffuser_Freq;
      
      int delaytowait;
      unsigned long lastUpdate;
      int nbseconds = 0;
      
      //#################
      // CHILD ID
      //#################
      #define CHILD_ID_DIFFUSER 0
      
      
      //#################
      // PIN DEF
      //#################
      #define DIFFUSER_PIN A3
      
      
      //#################
      // VAR
      //#################
      MySensor gw;
      
      //#################
      // Messsage Settings
      //#################
      MyMessage IntensityMsg(CHILD_ID_DIFFUSER, V_PERCENTAGE);
      MyMessage StatusMsg(CHILD_ID_DIFFUSER, V_STATUS);
      
      void setup()
      {
        gw.begin(incomingMessage, AUTO, false);
        pinMode(DIFFUSER_PIN, OUTPUT);
        digitalWrite(DIFFUSER_PIN, HIGH);
      
        //#################
        // Info
        //#################
        gw.sendSketchInfo("Difuser", "1.0");
      
      
        //#################
        // Send Presentation
        //#################
      
        gw.present( CHILD_ID_DIFFUSER, S_DIMMER );
      
        Diffuser_status = gw.loadState(5);
        Diffuser_Freq = gw.loadState(8);
        gw.send(StatusMsg.set(Diffuser_status ? true : false), true);
        gw.wait(200);
        gw.send(IntensityMsg.set(Diffuser_Freq),true);
      }
      
      void loop()
      {
        unsigned long now = millis();
      
        gw.process();
      
        if (now - lastUpdate > 1000) {
          nbseconds++;
          lastUpdate = now;
        }
      
        float delaytowaittmp = ((MAX_DELAY - MIN_DELAY) / 100.0) * Diffuser_Freq;
        int delaytowait = delaytowaittmp;
      
        if ((Diffuser_status == true) && (nbseconds > delaytowait)) {
         
          digitalWrite(DIFFUSER_PIN, LOW);
          delay(100);
          digitalWrite(DIFFUSER_PIN, HIGH);
          delay(100);
          digitalWrite(DIFFUSER_PIN, LOW);
          delay(100);
          digitalWrite(DIFFUSER_PIN, HIGH);
          delay(100);
          nbseconds = 0;
        }else if(nbseconds > delaytowait)
        {
          nbseconds = 0;
        }
      
      }
      
      void incomingMessage(const MyMessage &message) {
      
        if (message.type == V_STATUS || message.type == V_PERCENTAGE) {
      
          int req_status = -1;
          int req_percentage = -1;
      
          if (message.type == V_STATUS)
          {
            req_status = message.getBool();
            Diffuser_status = req_status;
            gw.saveState(5, Diffuser_status);
          }
      
          if (message.type == V_PERCENTAGE)
          {
            req_percentage = message.getByte();
            Diffuser_Freq = req_percentage;
            gw.saveState(8, Diffuser_Freq);
          }
      
        }
      }
      
      
      
      
      

      Now, you can have good smell in every room for some dollars when you arrived from work, when you start cooking, when going to sleep or entering in your Bat Cave !

      posted in My Project
      fifipil909
      fifipil909
    • Your Multi Room Audio System

      Hi Everybody,

      This thread is not related to Mysensors, but I would to take advantage of having great comunity to share idea arround Multi Room audio.
      My original idea was to have abilities to play any music anywhere with a multi room option.
      My goal was to have this for a good price without sacrifice the sound quality.

      After some reseach I decide to go with the Squeezelite environement running on a Pi, and adding an I2S audio Dac.
      it was pretty straight forward, and tons of tutorial available did helps a lot.

      • On the main room, I wanted to have a powerfull speaker with a touch screen interface to manage all speakers.
        So I build mine, and after couple of hours a woodworking I get something like this:

      0_1464876239129_2016-04-10 18.42.09.jpg

      0_1464876243536_2016-04-10 18.42.33.jpg

      0_1464876249608_2016-06-02 15.55.24.jpg

      0_1464876253767_2016-06-02 15.55.38.jpg

      I'm very happy of this "Main" speaker. it work like a charm, it run a modify Raspbian for touch screen support, and squeezelite/Jivelite.
      So after that, I wanted to have smaller version for all others rooms.
      I decide to buy some cheap bluetooth speaker and add a pi inside with a Dac.

      0_1464876536881_2016-06-02 16.06.54.jpg
      0_1464876541289_2016-06-02 16.06.50.jpg
      0_1464876546266_2016-06-02 16.07.07.jpg

      Small speaker satisfy me also, they run PiCoreAudio, the sound is defenetely worst compare to the main one, but it's really acceptable for me.

      Regarding the budget, all included the main speaker cost me less than 100€ and the small one 50€ each. Very cheap for a multiroom solution that can be control by any device included the Home Automation Controller.

      So next step could be sound input for the voice regonition.
      Did you guys have some background on it ? I would like something very responding and I don't want to use any external STT engine.

      I read some post regarding the Jasper project. what do you think about it ?
      Regarding sound input do you suggest special mics ? is any STT engine exist with Client/Server mode ?

      posted in General Discussion
      fifipil909
      fifipil909