element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
element14 presents
  • Challenges & Projects
  • More
element14 presents
Blog Build Inside The Box - Sump Pump Alarm
  • Blog
  • Forum
  • Documents
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
Author: kmikemoo
Date Created: 5 May 2021 6:46 PM
Views: 1872
Likes: 16
Comments: 23
  • buildinsidethebox
  • build inside the box
  • bitb
Related
Recommended

Build Inside The Box - Sump Pump Alarm

kmikemoo
kmikemoo
5 May 2021

Thank you Christopher Stanton and element14 for the opportunity to Build Inside The Box!  It was great fun.

 

Getting the box was a moment of great joy and great panic as the reality of "I've got to build something!" really hits home.  I retreat to my basement lair and begin to think.

  Think.  Think.  Think.  THUMP, Thump, thump.  Argh!  Silly sump pump.  I don't remember it being so loud.

  Think.  Think.  Think.  THUMP, Thump, thump. ARGH!!!  That's it!  I'm buying one of those silent check valves!

  What integrates temperature, a switch and something with an op amp?  What can I make with the op amp?  THUMP, Thump, thump.

So... I'm not quite sure how I came up with this as an idea.

 

As the title indicates, the plan was to use the components to make a monitoring system for my sump pump to alert me of abnormal conditions and to give an indication of how often the pump runs.  "All the time" and "I can't remember the last time" are not very accurate time measurements.

The write-up should be a shortened version of the video.

 

You don't have permission to edit metadata of this video.
Edit media
x
Upload Preview

 

Vishay TCST1103TCST1103 Photo Interrupter

The photo interrupter as part of a high water level float switch just made sense.

 

 

Microchip MCP9701-E/TOMCP9701-E/TO Temperature Sensor IC

By living in a house with a sump pump, I've learned a few of the quirks of the system - like when the outlet freezes, the water doesn't go anywhere - so the pump just keeps on running.  In this scenario, the sump water acts as a heat sink for the long running pump.  This, of course, warms the water - quite a bit, from the two incidents that I can remember.  It wasn't until I did some experimenting for this build that I discovered how slow the water temperature rises - which is a good thing for the longevity of my sump pump.  0-1023 analog in.  It moves about 25 in 30 minutes, worst case (zero flow, almost no water added to the sump during the 30 minutes).  To get to the bath water temperature that I remember, my pump must have been running for hours.

 

Moving ahead, I just needed to place the temperature IC in the water near the pump and read the output.  I attached leads to the IC, put on some heat shrink to prevent shorting, stuffed it into a plastic tube and sealed the end with hot glue.

I will use the analog in value for processing as the actual temperature doesn't improve the functionality.  I do not plan to display it - because the system will sit in the corner of a basement, unattended, alone (most of the time).

 

Microchip MCP604-I/PMCP604-I/P

My plan was to use this quad op amp as my non-contact voltage sensor.  I tried a number of circuits, but most did not function as advertised.  I decided to try a very simple circuit and it worked better than the rest.  It did not behave on the Arduino as it did on the test bench.  On the test bench, I got about a one volt swing between output with power on and output with power off.  On the Arduino, the readings cycled between 1023 and 0 on the analog input when power was ON, usually in sets of three.  The input remained at 1023 when power was OFF.  To detect this, I took 10 samples and looked for a 0.  Other than that adjustment in code, the circuit performed as expected.  I could detect loss of AC power.

 

 

ST Range/Gesture Sensor 53L0-SATEL-I1

This is a VL53L0x sensor and the board is an I2C device.  I chose to use the Adafruit library and the sensor worked reasonably well.  I say "reasonably well" because one must have realistic expectations when bouncing a laser off of water.  I wound up using the fluctuations in distance readings to my advantage in triggering the begin and end of a fill/drain cycle.  Average 6 readings.  If four of these average readings in a row are increasing, the pump must be draining the sump.  The time difference between cycles is divided up to display in weeks, days, hours or minutes.  I probably should have added seconds as well - in retrospect.

 

One of the two sensors in the kit seemed a little finicky - until it stopped working.  It won't initialize.  The other one is still performing as expected.

 

 

Midas MDOB128032EV-WS OLED Graphic Display

This display has an SPI interface even though the screen printing would lead someone to assume I2C.  The [Buy Now] button said the interface was SPI so that was what I ran with.  I connected SDA to MOSI (D8) and clock to clock and it worked.

 

   

.

Overall Project

Again, the vision was to use all of the above components in a sump pump monitoring system.  I chose to use a more graphic build plan.  You can see some of the notes and corrections (like adding the resistors on the photo interrupter circuit).

 

The "as built" isn't quite as neat.  Vcc is the upper string of WAGO connectors.  Ground is the WAGO in the white mount and a 3-pack just to the right of the Vcc buss.

 

The third picture is the completed project.  I'm still waiting for that inspirational moment around the "packaging".  The case is functional, but I want something cooler.

 

 

MULTICOMP PRO Portable USB High Capacity Power Bank - 10000mAh

Finally, the device that powers it all... the power bank.  In an ironic twist of fate... this one confounded me for a bit - and I was one of the folks that recommended putting it in the box.

I had completely forgotten about the Auto OFF feature of large power banks.     Serves me right.

I did a little experimenting to see how low a current draw I could get away with to keep the bank alive, but had to opt for a 100mA draw as a balance between enough draw and hearty enough on-hand components.

I do want to build a 555 controlled pulse draw device to decrease battery drain, but that is for another day.

 

Conclusion

This challenge was amazing!  It really helped me dust the cobwebs off of some skills that I thought I still had.  I made fewer mistakes in the coding as time went on.  I spent most of my bench time trying to get a decent AC detection circuit.  I spent most of my coding time trying to get a reasonably accurate cyclic timer system.  A current sensor would have been easier, but the time of flight sensor is cooler.  I really must figure out if I can recover the one that won't initialize.  With that, maybe I could add a detection circuit that only turned on the display when someone was within range.

 

Thank you again to element14 for allowing me to play along.

 

UPDATE May 8th, 2021:  As I read some of the other builds, I see some folks received a SD card.  I did not but I thought I addressed this in the blog.  I did not.  Must have been one of those fat-finger oops edits.  They happen.  If I needed to use the SD card, it would simply have been used as a data logger.  The next evolution would have been to play audio clips for an alarm instead of using the buzzer.  "Hey!  Hey!  I'm flooding here!"  - Mike

Attachments:
BITB_Main.txt.zip
Anonymous

Top Comments

  • baldengineer
    baldengineer over 1 year ago +7

    Great project kmikemoo!

     

    I think you came up with a clever use for the photo-interrupter.

     

    This display has an SPI interface even though the screen printing would lead someone to assume I2C.  The [Buy Now…

  • kmikemoo
    kmikemoo over 1 year ago in reply to fmilburn +5

    fmilburn  I found the post you mentioned just after publishing this - and now can't "re-find" it.  I think it was from 2018.  There's not much more effective for releasing a flood of information…

  • jw0752
    jw0752 over 1 year ago in reply to fmilburn +5

    Hi Frank,

     

    I think this is the post you were mentioning.

     

    https://www.element14.com/community/groups/test-and-measurement/blog/2018/10/15/on-using-a-usb-battery-for-a-portable-project-power-supply

     

    John

Parents
  • shabaz
    shabaz over 1 year ago

    Hi Mike,

     

    Great project & video! (& Scarface reference : ).

    The Range/Gesture sensors look quite versatile, if they had both worked, I was thinking maybe one of them could have been used for the float switch too, instead of the photo-interruptor. But it all worked out since you had the photo-interruptor to use anyway!

    It's really annoying that power banks have that auto-off feature : )

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
Comment
  • shabaz
    shabaz over 1 year ago

    Hi Mike,

     

    Great project & video! (& Scarface reference : ).

    The Range/Gesture sensors look quite versatile, if they had both worked, I was thinking maybe one of them could have been used for the float switch too, instead of the photo-interruptor. But it all worked out since you had the photo-interruptor to use anyway!

    It's really annoying that power banks have that auto-off feature : )

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
Children
  • kmikemoo
    kmikemoo over 1 year ago in reply to shabaz

    Thanks, shabaz!  I was definitely amazed when the range sensor responded correctly to water level.

    There has to be some way to defeat the auto-off feature on a power bank that doesn't consume all those milliamp-hours.  Maybe there's someone in the Community that know that circuitry enough to help us crack the code.  That would really be handy.

    • Cancel
    • Up +3 Down
    • Reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 1 year ago in reply to kmikemoo

    There was a post, I think by jw0752 , where the auto-off feature for power banks came up.  I remember the pulsed current idea came up but cannot remember if it worked and couldn’t find it just now.  Great use of items in the basket by the way!

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
  • kmikemoo
    kmikemoo over 1 year ago in reply to fmilburn

    fmilburn  I found the post you mentioned just after publishing this - and now can't "re-find" it.  I think it was from 2018.  There's not much more effective for releasing a flood of information than pressing [Publish].

     

    From what I read, the pulsing works.  I'd like to know where the sensing is.  Is it in the chip?  If it's a sensed value across an external component, the chip can be tricked.  MUCH harder if it's all internal.  I'm just not at that point where I'm willing to buy one just to tear it down.  AND... I don't think there's enough there for David Edwards (a531016).

    • Cancel
    • Up +5 Down
    • Reply
    • More
    • Cancel
  • jw0752
    jw0752 over 1 year ago in reply to fmilburn

    Hi Frank,

     

    I think this is the post you were mentioning.

     

    https://www.element14.com/community/groups/test-and-measurement/blog/2018/10/15/on-using-a-usb-battery-for-a-portable-project-power-supply

     

    John

    • Cancel
    • Up +5 Down
    • Reply
    • More
    • Cancel
  • fmilburn
    fmilburn over 1 year ago in reply to jw0752

    Hi John and thanks!  That was a good post with lots of great comments below it.

    • Cancel
    • Up +4 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube