element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
element14 presents
  • Challenges & Projects
  • More
element14 presents
e14 presents blogs Build Inside The Box - Sump Pump Alarm
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join element14 presents to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kmikemoo
  • Date Created: 5 May 2021 6:46 PM Date Created
  • Views 7095 views
  • Likes 17 likes
  • Comments 23 comments
  • 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
image
Upload Preview
image

 

Vishay TCST1103TCST1103 Photo Interrupter

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

  imageimageimage

 

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).

imageimage

 

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.

  imageimageimage

 

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.

  imageimageimage

 

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.

  imageimageimage

    imageimageimage

.

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.

  imageimageimage

 

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.

image

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
  • Sign in to reply

Top Comments

  • baldengineer
    baldengineer over 4 years 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 4 years 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 than pressing…
  • jw0752
    jw0752 over 4 years 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
  • kmikemoo
    kmikemoo over 4 years ago in reply to mayermakes

    mayermakes  Thanks.  I was trying to channel my inner Clem. image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mayermakes
    mayermakes over 4 years ago

    Incredible execution! Practiacal to the max, very practical indeed...I should build me one of those ....
    my favourite part is  the multiplicity of safety features. And the humorous intro!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jc2048
    jc2048 over 4 years ago in reply to kmikemoo

    what is your recommendation?

     

    Like any component, it depends on what you want to do with them.

     

    The 2N7000 and the BS170 are both TO-92, so work fine with a plug-in breadboard. The specs are very similar, so personally I wouldn't bother with both [I've got a dozen BS170s that I use for experimenting with]. They are cheap and cheerful: in quantity, they sell for a few cents each.

     

    The BSS138 has a lower threshold voltage and a lower on resistance but it's SMD (SOT23), so more appropriate for a pcb, though there's nothing to stop you soldering leads on and using them with a breadboard as though they were conventional parts.

     

    Those are all n-channel parts. Don't know if I've got any small p-channel parts.

     

    I actually have zero MOSFETs

    Doesn't have to be a MOSFET. Do you have any small NPN transistors? Maybe use a Darlington pair to reduce the loading on the op-amp output, rather than just a single transistor.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 4 years ago in reply to kmikemoo

    "...Hmmm... I'm starting to sense a ML application...."

    Hmmm... I'm starting to sense an opportunity for 3D printed ice sculptures here...  image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • kmikemoo
    kmikemoo over 4 years ago in reply to jc2048

    jc2048  Very cool.  I really like the duty cycle.  I've copied the schematic and put it into the "Circuits to try" folder. 

    I actually have zero MOSFETs in my stash o' stuff.  I keep meaning to change that, but then I overthink things and it never winds up coming to pass.  So... if I was going to have a few laying about, what is your recommendation?

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube