Page 17 of 20

Re: Relay Module KY-019 5V

Posted: Sun Sep 16, 2018 8:30 am
by Brandon92
tlfong01 wrote:
Sat Sep 15, 2018 5:23 am
Brandon92 wrote:
Fri Sep 14, 2018 3:27 pm
Yup, you are correct. That's why I advised you to use a sensor with a I2C data bus interface. Or
does this sensor something that you really need?

DHT22 directly interrupting Rpi, bypassing stupid and slow MCP23017

Well, I actually have bought three other types of sensors to mess around (the most recent one is DHT12 which is similar to DHT22, but also I2C compatible).

But I really need this time wasting, trouble making, DHT22 for two reasons:

  • 1. I need to have 64 sensors for my small, 64 bed room castle (well, in the air) automation project.
  • 2. I need to show off that I can interrupt Rpi with 64 devices. :lol:
Now I am thinking of overcoming the slow and stupid MCP23017 interrupt thing by forgetting it altogether. Instead of using MCP23017 INTA, INTB, I will let DHT22 open drain output (already at the same time, connected to MCPO23017 GPIO pin) to itself directly interrupting RPi.

Appendix - DHT12

DHT12 Datasheet
http://www.robototehnika.ru/file/DHT12.pdf

Castle in the air - Don McLean - 2,295,059 views
https://www.youtube.com/watch?v=TTqi7iEZEWA
Okay, I think it is still cheaper to buy a dedicated sensor.

However, this will not work. Because when you sent a start plus. All the sensor are going to response to you. If you make a dedicated line for the sensors to your Rpi. I think it's a better idea to multiplex them on that single line. So, that you can talk directly to the sensor. You can buy dedicated multiplex chips. Remember that it's need to be bidirectional, or use a trick. An other options is to use a analog switch to enable one sensor on your data bus.

Re: Relay Module KY-019 5V

Posted: Wed Sep 19, 2018 2:46 am
by tlfong01
Brandon92 wrote:
Sun Sep 16, 2018 8:30 am
tlfong01 wrote:
Sat Sep 15, 2018 5:23 am
DHT22 directly interrupting Rpi, bypassing stupid and slow MCP23017

Instead of using MCP23017 INTA, INTB, I will let DHT22 open drain output (already at the same time, connected to MCPO23017 GPIO pin) to itself directly interrupting RPi.
However, this will not work. Because when you sent a start plus. All the sensor are going to response to you. If you make a dedicated line for the sensors to your Rpi. I think it's a better idea to multiplex them on that single line. So, that you can talk directly to the sensor. You can buy dedicated multiplex chips. Remember that it's need to be bidirectional, or use a trick. An other options is to use a analog switch to enable one sensor on your data bus.

Wiring OR 64 DHT22 outputs together

Ah, the last schematic has some wires wrongly connected and should have misled you. My apologies. I attach a debugged one now.

BTW, I think the 64 DHT22's wired or interrupt signal is one way ticket to the blue, never coming back. In other words it is a waste of money to get a return ticket. Of course (not in our case) Rpi can always read MCP23017 IntCAP A to find out which naughty DHT22 baby disturbs her sleep, ...

Wired logic connection - Wikipedia
https://en.wikipedia.org/wiki/Wired_logic_connection

PCA9616 - Bus Buffer, 3 Channel, SMBus/I2C TSSOP16 - element4
https://hk.element14.com/nxp/pca9616pw- ... g%2Fsearch

Neil Sedaka - One way ticket 1959 - 1,339,250 views
https://www.youtube.com/watch?v=xGGU-15Tt6M
https://www.youtube.com/watch?v=oQtmU8ZbDq0

Eruption - One Way Ticket 1979 - 5,782,318 views
https://www.youtube.com/watch?v=RC8ApqqKuAg

Re: Relay Module KY-019 5V

Posted: Wed Sep 19, 2018 6:37 am
by tlfong01
tlfong01 wrote:
Wed Sep 19, 2018 2:46 am
Wiring OR 64 DHT22 outputs together
BTW, I think the 64 DHT22's wired or interrupt signal is one way ticket to the blues, never coming back. In other words there is no need to use a bidirectional channel. Of course (not in our case) Rpi can always read MCP23017 IntCAP A to find out which naughty DHT22 disturbs its sleep, ...

Expanding Rpi Project Work Bench

The Rpi work bench is getting too small for more to come prototyping boards, so I am assembling a bigger bench to show off as many of my master pieces as possible, ...

Re: Relay Module KY-019 5V

Posted: Wed Sep 19, 2018 8:10 am
by StevenP
Very impressive use of space on your workbench! I wish my own wiring was as neat! ;)

Re: Relay Module KY-019 5V

Posted: Thu Sep 20, 2018 9:03 am
by tlfong01
StevenP wrote:
Wed Sep 19, 2018 8:10 am
Very impressive use of space on your workbench!
I wish my own wiring was as neat! ;)

Marie Kondo: "The Life Changing Magic of Tidying Up"

Well, perhaps this pretty young lady can make your wish come true! :)

I couldn't concentrate much when watching the pretty lady speaking softly :) , though I still remember a couple of words that surprise me, such as spark joy, touching the thing, get rid of unwanted things, do it right now, but the key word that inspires me most is 'category'.

This "category" idea is perhaps simple or just common sense, but I think indeed it is very important and useful in my everyday organizing things and ideas, but also in computer hardware and software projects.

Marie Kondo: "The Life Changing Magic of Tidying Up" | Talks at Google - 1,756,171 views
https://www.youtube.com/watch?v=w1-HMMX_NR8

Re: Relay Module KY-019 5V

Posted: Thu Sep 20, 2018 1:17 pm
by tlfong01
tlfong01 wrote:
Thu Sep 20, 2018 9:03 am
Marie Kondo: "The Life Changing Magic of Tidying Up" - Google Talk - 1,756,171 views
https://www.youtube.com/watch?v=w1-HMMX_NR8
  • get rid of unwanted things
  • categorize

My Japanese 5S and KaiZen Style Rpi Work Bench

- all benches have wheels to facilitate moving.
-

/to continue, ...

Appendix - Japanese 5S and Kaizen Videos

TOYOTA 5S - 200,772 views
https://www.youtube.com/watch?v=nHutkkfUpDs

Kaizen The Secret behind Japanese Productivity - 90,531 views
https://www.youtube.com/watch?v=fcBXtwGexNc

Lean 5S in MSICU - 74,598 views
https://www.youtube.com/watch?time_cont ... MkXICM1-98

Japan 5S Methodology - Wikipedia
https://en.wikipedia.org/wiki/5S_(methodology)

Re: Relay Module KY-019 5V

Posted: Sat Sep 22, 2018 9:03 am
by tlfong01
tlfong01 wrote:
Wed Sep 19, 2018 6:37 am
Expanding Rpi Project Work Bench
The Rpi work bench is getting too small for more to come prototyping boards, so I am assembling a bigger bench to show off as many of my master pieces as possible, ...

Rpi Controlled Aquaponics Tank

Rpi Controlled Aquaponics
https://www.youtube.com/watch?v=SLMq0EI-EOA
https://www.youtube.com/watch?v=3AcsSn9ABK8

Re: Relay Module KY-019 5V

Posted: Tue Sep 25, 2018 1:13 pm
by tlfong01
tlfong01 wrote:
Sat Jul 07, 2018 8:00 am
tlfong01 wrote:
Fri Jul 06, 2018 8:34 am
tlfong01 wrote:
Thu Jul 05, 2018 9:17 am
Next step is to see if 5V signals can control the 4 relays.
Quad KY019 Relay Module Assignment
Relay 1 = 220VAC
Relay 2 = 12VAC
Relay 3 = 24VAC
Realy 4 = 12VDC
Now I am testing the relay box off power, with following setup.
1. 220AV power off
2. 12VDC power off
3. 5V power on
4. IN1, 2, 3, 4 manual connect to 5V power.
4. Ears to listen to relay on/off clicks
5. Multimeter to check if relay COM/NO open/short
Everything went well. Next step is to test the relay box with 220VAC power on.

Quad KY019 Relay Module Rack Mount Notes

Re: Relay Module KY-019 5V

Posted: Wed Sep 26, 2018 7:57 am
by tlfong01
tlfong01 wrote:
Tue Sep 25, 2018 1:13 pm
Quad KY019 Relay Module Rack Mount Notes

ky019x4v1 wiring notes

Re: Relay Module KY-019 5V

Posted: Thu Sep 27, 2018 5:03 am
by tlfong01
tlfong01 wrote:
Wed Sep 26, 2018 7:57 am
ky019x4v1 wiring notes

Portable RCBO Schneider Easy9 2P Wiring Notes

Portable RCBO Schneider Easy9 2P
RE: RELAY MODULE KY-019 5V Postby tlfong01 » 2018-Jul-07 Sat 11:13 pm
https://www.raspberrypi.org/forums/view ... 5#p1338021

Leak Electricity Protection Plug CAA-19
RE: RELAY MODULE KY-019 5V Postby tlfong01 » 2018-Jul-12 Thu 2:31 pm
https://www.raspberrypi.org/forums/view ... 0#p1339896

Schneider Easy9 Air Breakder Home Main Breaker 2P10A~2P63A With Electricity Leakage Protection 2P 10A - ¥138
https://detail.tmall.com/item.htm?id=53 ... 36:3681680

Re: Relay Module KY-019 5V

Posted: Thu Sep 27, 2018 7:57 am
by tlfong01
tlfong01 wrote:
Thu Sep 27, 2018 5:03 am
Portable RCBO Schneider Easy9 2P
Schneider Easy9 Air Breakder Home Main Breaker 2P10A~2P63A With Electricity Leakage Protection 2P 10A - ¥138
https://detail.tmall.com/item.htm?id=53 ... 36:3681680

Rpi3B+ KY014 x 4 (220VAC, 12VAC, 24VAC, 12VDC) UPS Panasonic 6VDC x 4

Re: Relay Module KY-019 5V

Posted: Sat Sep 29, 2018 9:32 am
by tlfong01
tlfong01 wrote:
Thu Sep 27, 2018 7:57 am
tlfong01 wrote:
Thu Sep 27, 2018 5:03 am
Portable RCBO Schneider Easy9 2P
Schneider Easy9 Air Breakder Home Main Breaker 2P10A~2P63A With Electricity Leakage Protection 2P 10A - ¥138
https://detail.tmall.com/item.htm?id=53 ... 36:3681680
Rpi3B+ KY014 x 4 (220VAC, 12VAC, 24VAC, 12VDC) UPS Panasonic 6VDC x 4

Quad KY019 Relay Station

Re: Relay Module KY-019 5V

Posted: Sat Sep 29, 2018 1:25 pm
by tlfong01
tlfong01 wrote:
Sat Sep 29, 2018 9:32 am
Quad KY019 Relay Station

Mains meter wiring notes

Re: Relay Module KY-019 5V

Posted: Sun Sep 30, 2018 1:19 am
by tlfong01
tlfong01 wrote:
Sat Sep 22, 2018 9:03 am
Rpi Controlled Aquaponics Tank
https://www.youtube.com/watch?v=SLMq0EI-EOA
https://www.youtube.com/watch?v=3AcsSn9ABK8

Aquaponic Domestic Garden

Aquaponic Domestic Garden MagPi Issue 74 October 2018
https://www.raspberrypi.org/magpi/wp-co ... Window.png

MagPi Issue 74 October 2018
https://www.raspberrypi.org/magpi-issues/MagPi74.pdf

08 Aquaponic Domestic Garden
46 Laundry-saving rain detector

Re: Relay Module KY-019 5V

Posted: Thu Oct 04, 2018 12:41 pm
by tlfong01
tlfong01 wrote:
Sat Sep 29, 2018 1:25 pm
tlfong01 wrote:
Sat Sep 29, 2018 9:32 am
Quad KY019 Relay Station

Mains meter wiring notes 2

Re: Relay Module KY-019 5V

Posted: Fri Oct 05, 2018 7:49 am
by tlfong01
tlfong01 wrote:
Thu Oct 04, 2018 12:41 pm
tlfong01 wrote:
Sat Sep 29, 2018 1:25 pm
tlfong01 wrote:
Sat Sep 29, 2018 9:32 am
Quad KY019 Relay Station
Mains meter wiring notes 2

Mains meter wiring notes 3

Re: Relay Module KY-019 5V

Posted: Fri Oct 05, 2018 8:51 am
by tlfong01
tlfong01 wrote:
Fri Oct 05, 2018 7:49 am
Mains meter wiring notes 3

Mains meter wiring notes 4

Re: Relay Module KY-019 5V

Posted: Tue Oct 09, 2018 3:48 am
by tlfong01
tlfong01 wrote:
Sun Sep 30, 2018 1:19 am
tlfong01 wrote:
Sat Sep 22, 2018 9:03 am
Rpi Controlled Aquaponics Tank
https://www.youtube.com/watch?v=SLMq0EI-EOA
https://www.youtube.com/watch?v=3AcsSn9ABK8
Aquaponic Domestic Garden
Aquaponic Domestic Garden MagPi Issue 74 October 2018
https://www.raspberrypi.org/magpi/wp-co ... Window.png
MagPi Issue 74 October 2018
https://www.raspberrypi.org/magpi-issues/MagPi74.pdf
08 Aquaponic Domestic Garden
46 Laundry-saving rain detector

Aquaponic Dometic Garden - MagPi 2018oct
https://www.raspberrypi.org/magpi/aquap ... ic-garden/
https://twitter.com/braghettos

Growing veggies indoors when you’re not always there is easy when you have a Raspberry Pi and a guard fish. Rob Zwetsloot

“Living in a big city has pros and cons,” Diego Braga tells us. “One of the cons I suffered most is not having a small organic garden.”

Diego lives in Milan, in a small apartment with a smaller balcony that he spends a lot of time away from. That didn’t stop him wanting to grow some fresh veg for himself, though, and he looked at hydroponic gardens to see if that was a solution.

A prototype setup for the system using IKEA parts

Building an aquaponic garden with live fish

“One of the cons of this approach is that you need to feed fertiliser in the water, and that’s something that, even if it can be automated, is not self-sufficient,” Diego explains.

“In 2015, EXPO Italy took place and in a pavilion there was an aquaponics system in which plants and fishes were living close and feeding each other. I started to study the aquaponics system and it blew my mind: two different ecosystems (the aquarium with fishes and plants in the solid earth) can feed each other.

The waste of one is the nourishment of the other. That was what I wanted.”

Diego figured all he’d then have to automate is the cleanliness of the aquarium, and decided to do it and collect sensor data via IBM Watson’s IoT platform. It took him a while to figure out how.

“First of all, I had to study a solution to keep the aquarium clean. The fish waste is the perfect nourishment for the plants and this waste lies on the bottom of the aquarium. One night I had an inspiration: use an X-Y plotter and, instead of writing on a surface, use a submersible pump to collect all the waste and deliver it to the plants.”

There are a lot of sensors required to keep the system working well

Aquaponic domestic garden pump and waste

Using an IKEA shelf with the aquarium at the bottom and pot on the shelf above, the waste water is pumped up to the plant, which then uses it and pH-balances the water, while gravity allows nutrients to drop down to the fish.

To get data from the sensors so he could keep an eye on it, Diego used a Raspberry Pi:

“I already worked with Raspberry Pi devices in previous projects, but in this case the availability of the Node-RED orchestration that can interact with the GPIO pins and the availability of a Watson IoT node library was perfect to connect my aquaponics system to the cloud.

The Raspberry Pi was the perfect piece to complete the puzzle.”

After so long, what does Diego think of his creation? “It works really well. It’s wonderful and reassuring to see plants growing in the living room next to the sofa. Up to now, I’ve planted basil and tomatoes and they’ve been really tasty. When I’m sitting in the living room, I can also smell the vegetables.”

Re: Relay Module KY-019 5V

Posted: Fri Oct 12, 2018 7:07 am
by tlfong01
tlfong01 wrote:
Tue Oct 09, 2018 3:48 am
“I already worked with Raspberry Pi devices in previous projects, but in this case the availability of the Node-RED orchestration that can interact with the GPIO pins and the availability of a Watson IoT node library was perfect to connect my aquaponics system to the cloud.

After so long, what does Diego think of his creation? “It works really well. It’s wonderful and reassuring to see plants growing in the living room next to the sofa. Up to now, I’ve planted basil and tomatoes and they’ve been really tasty. When I’m sitting in the living room, I can also smell the vegetables.”
[/i][/color]

220VAC Pump with no ground wire

I found that my AC220V pump has not ground wire. I wonder if the electricity leaking out would kill my fish. Perhaps I should find a mains ground wire and immerse into the fish tank, ...

Re: Relay Module KY-019 5V

Posted: Fri Oct 12, 2018 7:25 am
by rpdom
If it doesn't have a ground wire, then it shouldn't need one. Putting a ground wire in your tank would be more likely to kill the fish if there was a leak as the electricity would flow through the water from the pump to the ground.

Re: Relay Module KY-019 5V

Posted: Mon Oct 15, 2018 3:34 am
by tlfong01
rpdom wrote:
Fri Oct 12, 2018 7:25 am
1. If it doesn't have a ground wire, then it shouldn't need one.

2. Putting a ground wire in your tank would be more likely to kill the fish if there was a leak as the electricity would flow through the water from the pump to the ground.

Well, I very much agree with you on point 1.

But for point 2. I am not very sure.

I am using the amazing Amazon's waterproof electric shaver that works under a shower. But I always worry one day the shaver leaks AC 220V electricity and the shock shaves all the hair on my head in a split second! :mrgreen:

Amazon WaterProof Electric Shaver
https://www.amazon.com/WATERPROOF-Elect ... B01LY3XZPY

About the product

... Get a shave that’s fast and close , ... in just a few strokes

... 5-Direction Flex Heads - heads independently move in 5 directions for a faster and closer shave

... With the Wet and Dry seal, you can shave even under the shower ...

Re: Relay Module KY-019 5V

Posted: Mon Oct 15, 2018 5:22 am
by rpdom
tlfong01 wrote:
Mon Oct 15, 2018 3:34 am
I am using the amazing Amazon's waterproof electric shaver that works under a shower. But I always worry one day the shaver leaks AC 220V electricity and the shock shaves all the hair on my head in a split second! :mrgreen:
I don't know about where you are, but here in the UK there are very strict rules about electrical sockets in bathrooms.

1. No standard (3-pin) sockets allowed at all.

2. Only two-pin transformer isolated sockets may be fitted.

3. Any sockets must be a certain distance from a bath or shower (I can't remember the distance without looking it up).

Because the sockets are completely isolated from the normal mains circuit by a transformer, if electricity did try to "leak" out, it would have nowhere to go. There is no path from the power to ground because it is isolated from ground, unlike the standard fittings where the Neutral wire is normally grounded at some point. The only way you should be able to get a shock from a faulty device in this scenario is if you came into contact with both wires from the socket.

Also, I can see on that shaver that it has a power supply on the plug end that probably supplies something like 12V DC to the shaver and will be fully isolated from the mains supply.

Re: Relay Module KY-019 5V

Posted: Mon Oct 15, 2018 5:42 am
by Brandon92
I have also a electric shaver from Philips that I can use in the shower. However when I charge that device, I can not use it. (It will not turn on when connected to the charger).

So, Is there something written in the manual about this. And also your picture is different than the provided link.

Re: Relay Module KY-019 5V

Posted: Mon Oct 15, 2018 8:27 am
by tlfong01
rpdom wrote:
Mon Oct 15, 2018 5:22 am
I don't know about where you are, but here in the UK there are very strict rules about electrical sockets in bathrooms.

1. No standard (3-pin) sockets allowed at all.

2. Only two-pin transformer isolated sockets may be fitted.

3. Any sockets must be a certain distance from a bath or shower (I can't remember the distance without looking it up).

4. Because the sockets are completely isolated from the normal mains circuit by a transformer, if electricity did try to "leak" out, it would have nowhere to go. There is no path from the power to ground because it is isolated from ground, unlike the standard fittings where the Neutral wire is normally grounded at some point. The only way you should be able to get a shock from a faulty device in this scenario is if you came into contact with both wires from the socket.

5. Also, I can see on that shaver that it has a power supply on the plug end that probably supplies something like 12V DC to the shaver and will be fully isolated from the mains supply.

Just a short comment on point 5

Sorry, I carelessly forgot that my shaver is not like the 220VAC input fish tank water pump. It has a 220VAC input 15VDC output adapter to charge the battery inside the shaver.

Philips Series 3000 Wet & Dry Men’s Electric Shaver - S3580/06 £54
https://www.amazon.co.uk/Philips-Electr ... B01N2TJ7O8

UK 2-Pin Bathroom Plug, 4.4 out of 5 stars, 764 customer reviews, 59 answered questions

* 4 directional flex head to adjust to every curve of your face and neck.
* 50 minutes of cordless shaving time from a one hour charge.
* shave wet or dry: 100% waterproof shaver for use in the shower.

* Input : 100~240VAC 9W
* Output: 15V DC 5.4W

Re: Relay Module KY-019 5V

Posted: Mon Oct 15, 2018 9:58 am
by tlfong01
Brandon92 wrote:
Mon Oct 15, 2018 5:42 am
I have also a electric shaver from Philips that I can use in the shower. However when I charge that device, I can not use it. (It will not turn on when connected to the charger).

So, Is there something written in the manual about this. And also your picture is different than the provided link.

Philips Series 3000 Wet and Dry Electric Shaver Instruction Manual
https://www.argos-support.co.uk/instruc ... t89906.pdf



Note - The shaver cannot be used directly from the mains.

Charging

2. When you charge the shaver for the first time or after a long period of disuse, let it charge until the charging light lights up continuously. See the table below for the charging time of your shaver.

Charging time 1 hour/8 hours

...

Shaving minutes 60 min/50 min/45 min/40 min.

...