Category Archives: #sensors

DropBOB Designs: learning a new skill!


So I’ve been wanting to do this for a few years now, but I’ve never had the patience to really devote some time to it … Until now.

Rendering of partially designed board (top view)

I’ve been learning circuit board design and component selection. I’m hoping to not only simplify the entire wiring design for my cold brewer. I’m trying to expand its capabilities tenfold.

Continue reading DropBOB Designs: learning a new skill!

Closed loop drop-BOB: the only cold drip coffee maker you can count on!


So I’ve completed my design. I’ve converted my 3d printable files to STL files and have sent them off to the printer: www.3dhubs.com. fingers crossed that everything comes back nice … you never know with these types of “compact” housings… Plus this is my first functional 3d print … Everything else I’ve done in the past was not as critical.

With this initial beta release, I can control my coffee maker from anywhere. I can check the progress of how it is doing. and I can adjust the flavor profile depending on how many drops per minute (DPM) & grind type I use. And I can know that it is always exactly where I want it because it’s a closed loop system with constant feedback.

Features:

  •  real-time drip-rate monitoring
  •  drip rate selection using micro servo
  •  fully functional wifi-enabled controller (hackable arduino) files shared on Github … 
  •  LiPO 850mAh battery for anywhere brewing
  •  5VDC battery charger (micro-USB same as your phone)
  •  fully customizable monitoring display (it’s your phone) Server & app run by Blynk
  •  use any of your favorite glasses or mugs.
  •  industrial pipe design
  • (planned feature) ETA
  • (planned feature) battery monitor

Drop-BOB – a better coffee maker – Cold Drip


I’ve been working on my software today. I think I have a good base that I will call this version V0.1 … an alpha release, since I know there are a few crashes and more bugs than I would allow in my beta software.
But overall, I’m happy with the result. I have my Arduino code working well with the Blynk platform. From top to bottom & left to right I can: 

  – monitor network connection
  – visually see the servo position
  – monitor up-time
  – see the real time DPM (drops per minute)
  – automatically tweet about making Coffee
  – see the desired drip rate (Set-point)
  – count drops
  – see a history of DPM
  – modify desired drip rate (set-point)
  – Manually adjust the servo position
  – restart when finished
  – simulate a drop
  – and pause the system
All while using a smaller package than when I was using an arduino with an LCD … remember that?
The next step right now is to CAD this “THING” (that’s the real name) … And then place it nicely into my drop-BOB (3d printed design to hold all these components) … It counts drops … and it just bob’s under the water holding thing … kinda sounds cute.

Oh, and also, since my idea is to eventually release this into the world with huge potential for modifications and improvements, I’ve shared my code on my GitHUB. Feel free to make improvements. make comments, or even suggestions that I can implement (note, I’m not a software guy … I juts do this for fun. So go easy on my code).

Hack-on!

Cold Drip Coffee Maker – New & Improved looks


Just a quick update. Not much to it, I had to tear the old design apart to take some steel I need to use for the side tables. But I really missed my cold coffee. So I gave it a much needed re-design. Now its much more compact & simple.

 Next step will be to upgrade the soda bottle to a glass bottle … but for me to do that, I’ll need a few new tools:

 – Glass scoring bit mounted to score a bottle around its base
 – diamond dremel bit … to drill small holes in glass

I may also work on a 3d printed structure to hold the servo & photo-interupter.

For now, I look forward to cold drip coffee tomorrow with the famillia. Happy family day.

Arduino GSM Expandable Vehicle Connection Project


Didn’t think I’d blog today but due to work circumstances I was nearer to home at the end of the day. Figured I might as well put a few hours in before school.

I managed to pick up an LCD kit from Lee’s. Solder it together, test it and incorporate it into my Arduino just in time for school.

And since I don’t really learn anything in school, I decided to bring Jenn’s laptop and do a little coding at school.

I got all the data now showing up on my LCD and I started working on the menu and UI.

Arduino GSM Expandable Vehicle Connection Project


Working late last night, I managed to figure out got to take apart my seat covers and insert my capacitance sensor.

Oh ya also, note to future self, don’t use 10 awg ground wire … I had to change all the wire routing in my car because it was to hard to work with.

I’ve also placed my Arduino in a protective case. Attached behind my rear view mirror with Velcro.

I’ve t-tapped into my constant-on 12v line from my ceiling light. This way I can have my vehicle constantly monitoring. I’ll be purchasing a lithium battery booster today until I can assess the power used by my system … I also haven’t setup any safeguards against battery drain in my code yet … I’ll have to look into that.

Today, I have school. So tomorrow I’ll have to go to Lee’s again to get a new LCD display. I would have had this done by now but my first one burnt out during the original accidental short (read: blowup). Also, when I bought my second one I didn’t read that it was for the raspberry pi.

Arduino GSM Expandable Vehicle Connection Project


Today, since I’m pretty hung over, we decided to go grab lunch at our newest craft beer place. So many choices…

Using our newest member of the group, Luca, we tested the functioning of my device with a baby seat with baby and all.

We filmed him left in my car in the baby seat. He cried, I got a text saying that he may be in danger. It was awesome!

So not only did the project work beautifully, I got some feedback from some awesome friends who actually have a baby.

Now time to make the project nicer looking and “wife friendly”. What I mean by that is that you don’t want to install a device in you car that will create a constant nagging that you have wires sticking out everywhere.

And just a little advertisement for a new tool I just purchased. The 8pk-371 write stripper and crimper tool. This thing is amazing all metal construction. Made with quality and reliability in mind … All of this time I was stripping my wires with my front teeth. My dentist will appreciate.

Arduino GSM Expandable Vehicle Connection Project


So today I installed the remaining portion on the project in my car. I rooted the second wrote that goes to the driver seat. This was a little harder than the rear seat cable ad I had to take apart most of the car’s ceiling.

Now that all the routing is done, I will focus on adding an LCD display and mounting the Arduino in back of my rear view mirror. I also need to t-tap into my overhead light power source (i should also check to confirm that it is 12v).

Arduino LED light showing that I’m sitting in the driver seat.
Currently these aluminum on leather sensors are above the seat. I plan on placing them under the material.
One thing to note on this type of sensor. Since the Arduino measures the time it take the RC circuit to discharge after it is fully charged, the longer the cable that connects the sensor to the Arduino is, the longer it will take to circuit to discharge. This the sensor will take a little longer to register than during my initial tests.

Arduino GSM Expandable Vehicle Connection Project


So today I decided to start trying to take apart the insides of my car. The first 10 minutes were the hardest… Mostly head scratching hard. After pulling out my rear carseat I managed to find a weak spot in the armour… Got my tiny drill out and had my way with her. Turns out it wasn’t too hard after all. In about an hour I have routed a ground wire of relatively small gauge all the way from the baby seat location to the rear view mirror.

Next, I will tackle the driver seat. This one will be a little more tricky. It turns out that I can’t route 2 cables together without interference (maybe one day I will sit down and tackle this dreaded interference issue).

For the next part of today I will work on a solid capacitance sensor design that I can plug in and out for both the baby seat and the driver seat.

Arduino GSM Expandable Vehicle Connection Project


/* This sketch is created for use of a GSM board with an arduino. The sensors utilized are 1x DHT11 + 2x BOCHEN 3386 Potentiometer + 5k resistor +
5V solar Array + 2 aluminum foils connected to 10k OHM resistors.
Copyright: Bobby Lumia, may be used and modified for personal use only. No resale.
Please reference my project blog: http://bobbobblogs.blogspot.ca/ if useing this sketch in your work.
*/

#include // Library Needed for our capacitance readings
#include // Library Needed for the tempeature readings

dht11 DHT11; // Declare our sensor, I bid thee dht11 … the first

//============================= \/ DEFINE PINS \/ ==============

//Do Not use Pins A4 & A5 … reserved for LCD
//Do not use Pins 0 & 1 (digital pins) these are used for GSM data transmission

int LED_1 = 4;                 // BABY Led
int LED_2 = 9;                 // DAD Led

int sol = A0;         // analogue pin 0
#define DHT11PIN A1   // analogue pin 1
int pot1 = A2;        // analogue pin 2
int pot2 = A3;        // analogue pin 3

CapacitiveSensor   cs_DAD = CapacitiveSensor(11,12);    // 10M resistor between pins 11 & 12, pin 12 is sensor pin, add a wire and or foil if desired
CapacitiveSensor   cs_BABY = CapacitiveSensor(6,7);    // 10M resistor between pins 6 & 7, pin 7 is sensor pin, add a wire and or foil if desired

//============================= \/ DEFINE VARIABLES \/ ==============

int const SAMPLES = 5;                         // number of samples taken to average out capacitance
int s_val[SAMPLES];                            //array to store the 5 samples to average
int const Initial_SAMPLES = 20;                // number of samples to initilize capacitance with
float RAW_initializer_VALS[Initial_SAMPLES];   // Array to hold initial Capacitance Values

int HIGH_Thresh;     // Threshold to trigger Capacitace 1 HIGH
int LOW_Thresh;      // Threshold to trigger Capacitace 1 LOW
int HIGH_Thresh_2;   // Threshold to trigger Capacitace 2 HIGH
int LOW_Thresh_2;    // Threshold to trigger Capacitace 2 LOW

int i;              // loop counter
int triggered = 0;  // Baby text trigger … don’t want to send out too many texts

long start;         // Start the timer for performance monitoring
float Where_DAD;      // Start the Where’s DAD counter
float Cap_1;        // Capacitance Sensor – 1
float Cap_2;        // Capacitance Sensor – 2
float SolVolt;      // Solar Voltage value (0-5 Volt)
float Amb_Temp;     // Ambient temperature Variable
int chk;            // Checks the Temperature sensor status and possible faults
int pot1Value;      // Potentiometer 1 value — Used to calibrate Capacitor 1 Trigger sensitivity
int pot2Value;      // Potentiometer 1 value — Used to calibrate Capacitor 2 Trigger sensitivity
int T_multi = 4;    // Scaling factor for threshold (1 = 1024, 2 = 2048 MAX)

char str1[]={‘A’,’T’,’+’,’C’,’S’,’C’,’S’,’=’,'”‘,’G’,’S’,’M’,'”‘};  // AT+CSCS=”GSM”  — This sets:  GSM default alphabet
char str2[]={‘A’,’T’,’+’,’C’,’M’,’G’,’S’,’=’,'”‘,’1′,’7′,’7′,’8′,’8′,’8′,’2′,’1′,’8′,’6′,’7’,'”‘};  // AT+CMGS=”17788821867″  — This sets Phone number to Text
char hex1[]={0x1A};  // Stop Character used to signify the end of a Text Msg

void setup()                  
{
   Serial.begin(115200);
 
   pinMode(LED_1, OUTPUT);           // set pin to output
   pinMode(LED_2, OUTPUT);           // set pin to output
   pinMode(LED_1+1, OUTPUT);           // set pin to output
   pinMode(LED_2+1, OUTPUT);           // set pin to output
 
   Serial.println();
   Serial.println(“Starting GSM Communication…”); //Just an FYI … not really chacking anything
   Serial.println();
}

void loop()                  
{

    ReadSensors();               // All sensor readings grouped in a function
    Print_Sensor_Vals_Serial();  // Now print these values on the screen for all to see!
 
    if (Cap_2 > HIGH_Thresh_2) LED_1_ON();
    else LED_1_OFF();
 
    if (Cap_1 > HIGH_Thresh) LED_2_ON();
    else LED_2_OFF();
 
    delay(200); // no use reading less than half a second … it just confuses the sensors (mostly temp)
 
    if (Cap_2 > HIGH_Thresh_2){ // If Baby is in seat
      if (Cap_1 < LOW_Thresh) { // If daddy in not there
         if (triggered == 0){
           Where_DAD = millis(); // DAD, your timer has begin
           triggered = 1; // Level 1 trigger
           Serial.println();Serial.println();Serial.println(“Countdown Begins! Where are you dad?”);Serial.println();
         }
       
         if ((millis() – Where_DAD > (5.0 * 1000.0)) && triggered == 1){ // If daddy is still not there after 120 seconds
           Serial.println();
           SendTXT();  // Send dad a text to tell him that something is wrong
           triggered = 2; // Level 2 trigger
           Serial.println();Serial.println();Serial.println(“Baby on Board! Where are you dad? THIS IS AN ALARM”);Serial.println();
         }
      }
   
      if (triggered == 1){
         Serial.print((millis() – Where_DAD)/1000.0,1);Serial.print(” Seconds .. “);Serial.println();
         LED_1_OFF();
       }
     
       if ((millis() – Where_DAD > (5.0 * 1000.0)) && triggered == 1){ // If daddy is still not there after 120 seconds
         Serial.println();
         SendTXT();  // Send dad a text to tell him that something is wrong
         triggered = 2; // Level 2 trigger
         Serial.println();Serial.println();Serial.println(“Baby on Board! Where are you dad? THIS IS AN ALARM”);Serial.println();
       }
     
    }
 
    if ((Cap_2 HIGH_Thresh&& (triggered == 2 || triggered == 1))){ // Stop panic if, Baby is removed, or Dad has arrived … after an even was triggered
      triggered = 0;
      Serial.println();Serial.println();Serial.println(“Baby SAFE!”);Serial.println();
    }
}

void ReadSensors()
{
    start = millis();  
 
    Cap_1 = avg(); // DAD Read capacitor time constant 1
    Cap_2 = avg2(); // BABY Read capacitor time constant 2
 
    SolVolt = analogRead(sol) * (5.0 / 1023.0); // Read output voltage created by the SUN!
 
    pot1Value = analogRead(pot1);
    pot2Value = analogRead(pot2);
 
    chk = DHT11.read(DHT11PIN);
    Amb_Temp = DHT11.temperature;
 
    HIGH_Thresh = T_multi*pot1Value;
    LOW_Thresh = T_multi*pot1Value-100;
    HIGH_Thresh_2 = T_multi*pot2Value;
    LOW_Thresh_2 = T_multi*pot2Value-100;    
}

void Print_Sensor_Vals_Serial()
{
  if (triggered != 1){
    Serial.print(“performance:   “);
    Serial.print(millis() – start);        // check on performance in milliseconds
    Serial.print(“\t”);Serial.print(“\t”); // tab character for debug windown spacing

    Serial.print(“C1: “);
    Serial.print(Cap_1);Serial.print(“/”); // print sensor output 1 / Threshold
    Serial.print(HIGH_Thresh);
    if (Cap_1 > HIGH_Thresh) Serial.print(“*PROXI*”);
    else Serial.print(”       “);
    Serial.print(“\t”);                    // tab character for debug windown spacing
 
    Serial.print(“C2: “);
    Serial.print(Cap_2);Serial.print(“/”); // print sensor output  / Threshold
    Serial.print(HIGH_Thresh_2);
    if (Cap_2 > HIGH_Thresh_2) Serial.print(“*PROXI*”);
    else Serial.print(”       “);
    Serial.print(“\t”);                    // tab character for debug windown spacing
 
    switch (chk){
      case 0: Serial.print(“Temperature: “); Serial.print(Amb_Temp); Serial.print(” oC”); if (Amb_Temp > 38.0) Serial.println(“*TEMP*”); break;
      case -1: Serial.print(“Checksum ERR: data was received but may not be correct”); break;
      case -2: Serial.print(“Timeout ERR: communication has failed”); break;
      default: Serial.print(“Unknown ERR: this is the catch-all bucket … S.O.L. buddy”); break;
    }

    Serial.print(“\t”);                    // tab character for debug windown spacing
    Serial.print(“Solar Voltage: “);
    Serial.print(SolVolt, 2);
    if (SolVolt > 4.0) Serial.print(“*SUN*”);
    Serial.println();
  }
}

float avg()
{
  float sampleSum = 0;
  for(int i = 0; i < SAMPLES; i++) {
    s_val[i] = cs_DAD.capacitiveSensor(15);
    sampleSum += s_val[i];
    delay(1); // set this to whatever you want
  }
  float meanSample = sampleSum/float(SAMPLES);
  return meanSample;
}

float avg2()
{
  float sampleSum = 0;
  for(int i = 0; i < SAMPLES; i++) {
    s_val[i] = cs_BABY.capacitiveSensor(15);
    sampleSum += s_val[i];
    delay(1); // set this to whatever you want
  }
  float meanSample = sampleSum/float(SAMPLES);
  return meanSample;
}

void SendTXT()
{
      for(i=0;i<13;i++)
        Serial.print(str1[i]);//AT+CSCS=”GSM”  ==> It must be done this way due to double quotes
      Serial.println();
   
      for(i=0;i<21;i++)
        Serial.print(str2[i]);//AT+CMGS=”17788821867″  ==> It must be done this way due to double quotes
      Serial.println();
   
      Serial.print(“Baby may be in danger!”);
      delay(1000);
      Serial.print(hex1);
      delay(1000);
      Serial.println();
}

void LED_1_ON(){
  digitalWrite(LED_1, HIGH);       // turn on
  digitalWrite(LED_1+1, LOW);       //
}

void LED_1_OFF(){
  digitalWrite(LED_1, LOW);       // turn off
  digitalWrite(LED_1+1, LOW);       //
}

void LED_2_ON(){
  digitalWrite(LED_2, HIGH);       // turn on
  digitalWrite(LED_2+1, LOW);       //
}

void LED_2_OFF(){
  digitalWrite(LED_2, LOW);       // turn off
  digitalWrite(LED_2+1, LOW);       //
}