Is controlling an home outlet or device connected to the outlet possible with the Pioneer Kit

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I have the Pioneer 4 dev Kit (CY8CKIT-044)

   

And i am working on a project for work using similar setup and thought about how i could use it at home. I have a need to be able to turn off or kill the power to an outlet based on sound. Since we are using a 2 relay module for out project, i was trying to find out if i could do the same thing for myself.

   

This is the relay we are using and wanted to see if it would work for my project.

   

http://www.amazon.com/SainSmart-2-CH-2-Channel-Relay-Module/dp/B0057OC6D8

   

What im trying to accomplish is the following:

   

Turn off /kill power to a 240v outlet in my garage if sound is detected during certain hours of the day/night. I have an air compressor that is connected and requires the user to flip the switch to kick on the motor to fill the tank(automatic when left on and being used) being that the human factor comes into play, it has happened(not often) that i use it all day and forget to turn it off, since the motor only comes on when the tank is low, of course you dont know its on until its to late. So what happens is if left on, and the tank runs low, it will kick on to refill and in some cases will trigger the safety valve which then releases the air, so then the motor continues to run all night long..

   

So far i havent gotten any complaints, but rather not. So as a back up to me forgetting, i want to setup something to monitor the compressor and kill the power if the motor kicks on. I already have a sound detector board i picked up from sparkfun(https://www.sparkfun.com/products/12642) and have created a project in the past to detect sound.

   

So basically between the hours of say 10pm and 9am, if sound is detected (within a certain range) kill the power to the compressor, if not with the sound detector, maybe something to sense vibrations that i can adhere to the motor itself so i know its on and it wasnt just something else.

   

And the power would need to stay off during the time, maybe even go without a sensor and just kill power to it daily between those hours.

   

Im open to suggestions, and modules/devices i could use to accomplish this project.

0 Likes
8 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You could use a photo coupler watching a white dot on the compressor belt,

   

that eliminates some of the environmental problems with a sound detector.

   

If there are pulses coming from belt then motor is on, just use a logic level

   

isolated power relay to control motor on / off.

   

 

   

Or a hall effect device with magnet cemented to compressor pulley.

   

 

   

Regards, Dana.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Cubangt: You need a current sensor around one of the wires of the motor supply. I am sending you a PDF of such a device and you can get it at Sparkfun. Take the output of this current sensor and feed it into the  CY8CKIT-044 PSoC board you could use a AD converter component  to read the voltage or a opamp set up as a Comparator set to trip when the motor was running next you need an RTC component to determine the time of day and it it is in the time window then turn off the power using a relay or solid state relay. You could also set an alarm led to let you know.  If you where using a PSoC Ble you could send a notice to your cell phone. You would only need two external components the Current sensor and your external relay or Solid state relay.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

RTC Component -

   

 

   

http://www.cypress.com/knowledge-base-article/real-time-clock-rtc-psoc-4-kba96934

   

 

   

Regards, Dana.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Cubangt:  Here is an outline of the program additional code and debug may be necessary.

0 Likes
Anonymous
Not applicable

Everyone, thank you for the suggestions, links, files and sample code, i hope to work on this as time permits this week. I went to our local computer super store and picked up a SainSmart 2-Channel 5v Relay Module tonight (http://www.sainsmart.com/sainsmart-2-channel-5v-relay-module-for-arduino-raspberry-pi.html) def cheaper at my local store than online. After posting, i was thinking about it, i could go even more simple with this project and just control the power to the unit(compressor) based on a time schedule.

   

Basically during late night hours, kill the power from 9pm til 8am.
But after talking with the other embedded guys at work, setting something up to actually trigger based on the compressor coming on would be the way to go just because this is more of a "exception" project, meaning that if i turn it off manually then there is no need to cut the power during the night.. so only cut it off if it comes on during those hours..

   

 

   

I really appreciate the help, im trying to learn more and more of the cypress boards, cause i also have the 5LP dev boards to try and work on a CAN Bus project to interface with my truck..

0 Likes
Anonymous
Not applicable

I found this current sensor on spark fun

   

https://www.sparkfun.com/products/11005

   

I was also considering a vibration sensor adhered to the compressor

   

https://www.sparkfun.com/products/9196

   

im going to try all the suggestions and see what i can accomplish, maybe take it to another level and do more, once the basic is working.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The relay module you purchased, is its contact ratings adequate to handle your

   

compressor startup load current rating ? Also does it have snubbers built into

   

board for inductive loads, so that your conytacts are not burned due to L transients ?

   

 

   

Google "relay coil snubbers" for further info.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Well the relay i bought to have, if i can use it on this project, great. Im still researching what actual modules and such i need.

   

I should have some time to pull some information off the compressor itself later tonight when i get home.

0 Likes