profbit
Posts: 45
Joined: Fri May 05, 2017 4:34 am

How to use Solenoid Lock 12V DC

Thu Jan 03, 2019 5:31 am

Hello, I'm new to this and I can't figure out how am I going to control the solenoid lock using raspberry (The wirings). I have an 8x AA Battery which is in total of 12V. I don't know where am I going to connect the black and red wire of solenoid lock. And the black and red wire of battery component. Wish you could help a newbie

boyoh
Posts: 1717
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: How to use Solenoid Lock 12V DC

Thu Jan 03, 2019 11:54 am

profbit wrote:
Thu Jan 03, 2019 5:31 am
Hello, I'm new to this and I can't figure out how am I going to control the solenoid lock using raspberry (The wirings). I have an 8x AA Battery which is in total of 12V. I don't know where am I going to connect the black and red wire of solenoid lock. And the black and red wire of battery component. Wish you could help a newbie

You need a basic understanding of basic electronics before starting this project, You will be
Switching two different levels of voltage and current , that must be isolated from each other

The Pi is not PLUG & PLAY, a understanding of how to interface with the Pi is a must
If using relays and solenoids protection from back EMFmust be delft with, So check
On this, Learn Well Work safe Do your research, The forum will give you a lot of help
But you must meet the forum half way ( I see you have had your Pi since 2017 )

Regards BoyOh
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Thu Jan 03, 2019 12:52 pm

boyoh wrote:
Thu Jan 03, 2019 11:54 am
profbit wrote:
Thu Jan 03, 2019 5:31 am
Hello, I'm new to this and I can't figure out how am I going to control the solenoid lock using raspberry (The wirings). I have an 8x AA Battery which is in total of 12V. I don't know where am I going to connect the black and red wire of solenoid lock. And the black and red wire of battery component. Wish you could help a newbie
You need a basic understanding of basic electronics before starting this project, You will be Switching two different levels of voltage and current , that must be isolated from each other The Pi is not PLUG & PLAY, a understanding of how to interface with the Pi is a must If using relays and solenoids protection from back EMF must be delft with, So check On this, Learn Well Work safe Do your research, The forum will give you a lot of help But you must meet the forum half way (I see you have had your Pi since 2017 )
Regards BoyOh

DC12V Solenoid Learning Notes

1. I am learning home automation and using DC12V solenoid to switch on/off door lock, water pipe tap.

2. I agree with BoyOh's very good professional advice:

... Learn Well, Work safe, Do your research.

3. I know very well how to use Rpi to blink a LED, drive a 6V DC motor using motor driver modules. But controlling a solenoid is another thing.

4. I know 8 x AA batteries = 12VDC is not reliable. If my batteries run out, solenoid does not work, fish tank pump not working, my fish will die, or plant thirsty. And if I come back home midnight, found my automatic door lock does not work, because batteries run out, and I could not find the spare key under the door mat, :( .... So you should consider using a reliable AC110/220V to 12VDC wall wart.

6. I think you need to use a 3V/5V relay to drive your 12VDC solenoid.

5. Solenoids and relays usually take large peak current (50mA to 100mA) Errata: My relay 50 to 100 mA, my solenoid 6V 400mA, and as BoyOh warns you, the scary back EMF thing might kill your solenoid driver transistor and you Rpi.

6. You might like to browse the following two threads to get a rough idea of the precautions to take when playing with 12/24V DC/AC solenoids.


(12VDC Soldnoid) RE: GPIO.INPUT VOLTAGE LEVELS VS EDGE DETECTION - tlfong01 2018aug31

viewtopic.php?t=219744&start=125#p1359855

(youtube) https://youtu.be/agcqxM9_tt4

(24V Solenoid) RE: RELAY MODULE KY-019 5V Postby tlfong01 2018oct16

viewtopic.php?t=77158&start=425#p1381259

Happy Learning! :)

Update 2019jan04hkt1429

My research results below! :mrgreen:

PS - My solenoid has two black wires, no red, why? Your research homework! :mrgreen:
...
Attachments
solenoid_test_2019jan0402.jpg
solenoid_test_2019jan0402.jpg (167.58 KiB) Viewed 7396 times
Last edited by tlfong01 on Thu Jan 10, 2019 2:16 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 5:36 am

tlfong01 wrote:
Thu Jan 03, 2019 12:52 pm
DC12V Solenoid Learning Notes

12V DC Solenoid for Cat Feeder and Cat Door Projects

I am starting to make an automatic cat feeder and a cat door, both using the 12VDC solenoid. I will start with the components below.

Very briefly:

1. 220VAC in 12VDC 1A out, short circuit protected PSU for both 5V PSU and 12V solenoid

2. 12VDC in, 5V 3A out short circuit protected PSU for 555 timer and KY019 relay

3. KY019 no optical protection, highly Rpi frying risky, 5V relay to switch on/off 12V DC solenoid

4. 12V DC solenoid to open/close cat feeder and cat door.


All the above are cheap things you can easily get from AliExpress or Amazon.

To start testing the basic operation of the solenoid cat feeder, I am using the 555 timer's high low pulse, instead of the Rpi's GPIO, for two reasons:

1. It is quick to apply the 555 timer signal using my hand to switch on/off, comparing to Rpi's python program.

2. 555 timer is cheaper to fry! :mrgreen:

You can find the tedious and boring details (and safety precautions) of using KY019 and 555 from the threads I mentioned earlier.

As part of my project documentation, I am here doing a quick and dirty walkthrough that might hopefully help jump start and fast forward your solenoid lock project (and fry your Rpi sooner!).

Over-Engineered Raspberry Pi Outdoor Cat Feeder - Jeremy S Cook 2018dec20
https://blog.hackster.io/over-engineere ... 532162c7fe

Feline Feeder Station - krakenabyss 2018dec20
https://imgur.com/a/wmLsGkd#vWhZsQW

Raspberry Pi Pet Detector Camera Using Python, TensorFlow, and Twilio - Edje Electronics 2018dec18
https://www.youtube.com/watch?time_cont ... GqVNuYol6o
...
Attachments
solenoid_test_2019jan0501.jpg
solenoid_test_2019jan0501.jpg (178.05 KiB) Viewed 7388 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 7:08 am

tlfong01 wrote:
Thu Jan 03, 2019 12:52 pm
DC12V Solenoid Learning Notes

AC 200V Mains Safety Measures

1. BS Standard 5733 Plug 250VAC 13A fused

2. 200VAC in, 12V DC out 1A PSU short circuit protection

3. Mains cable terminal shrink wrapped insulation, ring tagged, cable tied.


...
Attachments
psu_220ac_12dc_2019jan0501.jpg
psu_220ac_12dc_2019jan0501.jpg (177.88 KiB) Viewed 7376 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 8:11 am

tlfong01 wrote:
Sat Jan 05, 2019 7:08 am
DC12V Solenoid Learning Notes

5V PSU Wiring Notes

1. AC 220V Line / Neutral wire exposed parts shielded.

2. LM2956 12V 1A in 5V out 3A wires with Tamiya W plugs securely cable tied.


...
Attachments
psu_12v_in_5v_out_2019jan0501.jpg
psu_12v_in_5v_out_2019jan0501.jpg (194.2 KiB) Viewed 7369 times
I am an electronics and smart home hobbyist.

User avatar
davidcoton
Posts: 7121
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 11:12 am

tlfong01 wrote:
Sat Jan 05, 2019 7:08 am

AC 200V Mains Safety Measures

1. BS Standard 5733 Plug 250VAC 13A fused

2. 200VAC in, 12V DC out 1A PSU short circuit protection

3. Mains cable terminal shrink wrapped insulation, ring tagged, cable tied.
The plug top fuse should be rated to suit the mains cable, so probably 3A rather than 13A.

One more important one to add:
4. The mains PSU MUST be enclosed so that the mains terminals are inaccessible until a tool is used. Preferably in a plastic box (screw down lid), otherwise in an earthed (grounded) metal box.

Nit pick: input is 230VAC +10%/-6% (CENELEC standard) allowing a range of 216-253V, which covers British (240V) and other European systems.
Location: 345th cell on the right of the 210th row of L2 cache

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 1:16 pm

davidcoton wrote:
Sat Jan 05, 2019 11:12 am
tlfong01 wrote:
Sat Jan 05, 2019 7:08 am

AC 200V Mains Safety Measures

1. BS Standard 5733 Plug 250VAC 13A fused

2. 200VAC in, 12V DC out 1A PSU short circuit protection

3. Mains cable terminal shrink wrapped insulation, ring tagged, cable tied.
The plug top fuse should be rated to suit the mains cable, so probably 3A rather than 13A.

One more important one to add:
4. The mains PSU MUST be enclosed so that the mains terminals are inaccessible until a tool is used. Preferably in a plastic box (screw down lid), otherwise in an earthed (grounded) metal box.

Nit pick: input is 230VAC +10%/-6% (CENELEC standard) allowing a range of 216-253V, which covers British (240V) and other European systems.

CENELEC? Never heard of it

Ah, never heard of the CENELEC thing up to 253V? I always thought the whole world will be following the Great Country Standard of 110VAC.
The plug top fuse should be rated to suit the mains cable

It took me 2 minutes to guess why you said 3A. I first thought that you saw my high class elegant orange main cable and recongize it rating is a delicate 3V. After a couple of trials and guess the following might be what you are thinking.

1. You worked backwards at the far end of the 5V 3A power supply unit.

2. By Thevnin's or Norton's Theorem - what goes in, must come out, so the current at the 12V 1A section must also be 3A.

3. By the same token, at the mains side, also 3A, (3A 200V?, but my 5V 3A PSU is only 15W, or you mean instantanous power?)

4. As usual, I had a full weekend dinner and not enough blood in my dizzy head. Need to think again tomorrow.

PS - Guess who is German.


Errata/Update 2019jan06hkt2039

Earlier I tried to use the Kirchoff, Norton, and Thevin theorems to find the current at the beginning and end of the circuit. This is completely wrong, because it is not a complete circuit, so current in is not necessarily equal to current out.

For example, if there is a transformer converting the mains 220VAC to 12VAC, then the current at the 12VAC side is not equal to the current at the 200VAC side. But one thing is [almost] equal, ie, the power sends out at the 220VAC side is [almost] equal to the power received at the 12VDC side.

So I now know that while current is not equal, but power, or energy consumed, is [almost] equal.

This is the law of conservation of energy which I learnt in middle school. I thought this law is discovered by Einsteain, but it is not. It is actually discovered by Noether and the theorem is called Noether's theorem.

Noether's Theorem
https://en.wikipedia.org/wiki/Noether%27s_theorem

...
Attachments
thevnin_norton_kirchoff_2019jan0501.jpg
thevnin_norton_kirchoff_2019jan0501.jpg (96.04 KiB) Viewed 7330 times
Last edited by tlfong01 on Sun Jan 06, 2019 12:58 pm, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 2:38 pm

tlfong01 wrote:
Sat Jan 05, 2019 8:11 am
DC12V Solenoid Learning Notes

555 Timer + 5V KY019 Relay + ZYE-10837ZP DC12V 10mm 0.1N Soldnoid


Amazon NE555 Timer Square Wave Signal Generator 5V -15V Power US$6
https://www.amazon.com/WINGONEER-NE555- ... B06XHJDDGP

NE555 LM358 Frequency and Duty Cycle can be independently adjusted ¥5 ?????
https://item.taobao.com/item.htm?spm=a2 ... t=6#detail

555 timer IC - Wikipedia
https://en.wikipedia.org/wiki/555_timer_IC

The 555 timer IC is an integrated circuit (chip) used in a variety of timer, pulse generation, and oscillator applications. The 555 can be used to provide time delays, as an oscillator, and as a flip-flop element. Derivatives provide two (556) or four (558) timing circuits in one package.[2]

Introduced in 1972 by Signetics, the 555 is still in widespread use due to its low price, ease of use, and stability. It is now made by many companies in the original bipolar and in low-power CMOS technologies. As of 2003,

it was estimated that 1 billion units were manufactured every year.

The 555 is the most popular IC ever manufactured.
...
Attachments
timer_relay_solenoid_2019jan0501.jpg
timer_relay_solenoid_2019jan0501.jpg (153.64 KiB) Viewed 7317 times
Last edited by tlfong01 on Sat Jan 05, 2019 3:07 pm, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
davidcoton
Posts: 7121
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: How to use Solenoid Lock 12V DC

Sat Jan 05, 2019 2:50 pm

A few minor clarifications:

CENELEC is the European_Committee_for_Electrotechnical_Standardization.

253V is the permitted maximum operating voltage (for example, when the load suddenly reduces), AFAIK the highest conforming nominal voltage is UK's 240V.

In rating the fuse, it is only the cable that is considered. If the current using device (in this case the PSU) needs protection on its input, this should be provided at the equipment. Looking at the photos, the cable is made of conductors with 0.75mm2 cross section, which is normally rated at 6A. But since the current required is much less (~100mA), a standard 3A fuse is suitable. 1A, 2A or 5A could also be used but are less well accepted than the primary standard values of 3A and 13A. Of course I may have mis-identified the cable....
Location: 345th cell on the right of the 210th row of L2 cache

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 3:53 am

davidcoton wrote:
Sat Jan 05, 2019 11:12 am
The plug top fuse should be rated to suit the mains cable, so probably 3A rather than 13A.

One more important one to add:
4. The mains PSU MUST be enclosed so that the mains terminals are inaccessible until a tool is used. Preferably in a plastic box (screw down lid), otherwise in an earthed (grounded) metal box.

Nit pick: input is 230VAC +10%/-6% (CENELEC standard) allowing a range of 216-253V, which covers British (240V) and other European systems.

Professional CENELEC Standard PSU Chassis Design Notes

I see. So CENELEC is backward compatible to BS. And from 2019 on, my PSUs are EN and no more BS.

I searched the under my bed the divers goodies storage device (actually a big worn out paper carton box with junks) and found a couple of chassis (from 2019 on, I will no longer use the low class people's word 'box')

One metal chassis is big enough to hold one PSU and one transformer. The polyvinyl base with acrylic glass top (I neither use the word 'plastic' which sounds cheap) fits one PSU well.


Chassis > Electronics - Wikipedia
https://en.wikipedia.org/wiki/Chassis

In an electronic device, the chassis consists of a frame or other internal supporting structure on which the circuit boards and other electronics are mounted.[7]

In some designs, such as older sets, the chassis is mounted inside a heavy, rigid cabinet, while in other designs such as modern computer cases, lightweight covers or panels are attached to the chassis.

The combination of chassis and outer covering is sometimes called an enclosure.

...
Attachments
aluminium_plastic_box_2019kjan0601.jpg
aluminium_plastic_box_2019kjan0601.jpg (184.55 KiB) Viewed 7288 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 4:25 am

tlfong01 wrote:
Sat Jan 05, 2019 2:38 pm

Yellow is Beautiful

Yellow Submarine - The Beatles - 27,688,258 views

https://www.youtube.com/watch?v=m2uTFF_3MaA

Giant Rubber Duck
http://www.thecuriosityworkshop.com/cur ... bber-duck/

We’re huge fans of Dutch artist Florentijn Hofman’s giant rubber duck. What’s not to like? One look at the yellow inflatable and we can’t help but feel happy. Quite simply, the duck makes us smile.

The giant rubber duck (appropriately called Rubber Duck) is part of a global art installation that has the oversized art jet setting to cities all over the world. This well traveled duck has passport stamps that include Osaka, Sydney, Sao Paolo and Amsterdam among many others. The photo above was taken in Hong Kong, where the duck turned majestic Victoria Harbor into its own personal salt water bath tub.

A few duck facts: it’s more than 54 feet tall and is considered the world’s largest rubber duck; it weighs in at about 11 tons; it’s inflatable and isn’t a fan of strong winds; it’s always in a good mood; and perhaps most importantly –– it’s a great reminder that art doesn’t have to be inside a frame or in a museum, it can be giant and rubber and yellow.

So why a five-story tall bath toy? Why not, we say.


/ to continue, ...
...
Attachments
little_duck_2019jan0601.jpg
little_duck_2019jan0601.jpg (154.14 KiB) Viewed 7280 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 8:38 am

tlfong01 wrote:
Sat Jan 05, 2019 1:16 pm
The plug top fuse should be rated to suit the mains cable
It took me 2 minutes to guess why you said 3A. I first thought that you saw my high class elegant orange main cable and recongize it rating is a delicate 3V. After a couple of trials and guess the following might be what you are thinking.
1. You worked backwards at the far end of the 5V 3A power supply unit.
2. By Thevnin's or Norton's Theorem - what goes in, must come out, so the current at the 12V 1A section must also be 3A.
3. By the same token, at the mains side, also 3A, (3A 200V?, but my 5V 3A PSU is only 15W, or you mean instantanous power?)
4. As usual, I had a full weekend dinner and not enough blood in my dizzy head. Need to think again tomorrow.

Confusing Electrical Circuit Theorems

When I studied electrical circuits theorems last century, I only half understood the guys Kirchoff, Thevnin, and Norton (I could only spelled correctly two of the three!), no wonder I messed up all three last evening.

Now I found the following good tutorial clarifying three things in one go. This century I have been playing only with digital circuits, and miserably helpless me don't have Maple or MathLab, so I have a big excuse to mess up things! :mrgreen:

Analog Electronics Tutorial
http://physics.wm.edu/~evmik/classes/Ph ... slides.pdf
...
Attachments
electrical_circuit_theorems_2019jan0601.jpg
electrical_circuit_theorems_2019jan0601.jpg (61.13 KiB) Viewed 7236 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 9:51 am

tlfong01 wrote:
Sun Jan 06, 2019 4:25 am
Yellow is Beautiful

Yellow Chassis

(youtube) The Yellow Rose of Texas - 1,793,288 views
https://www.youtube.com/watch?v=IpHiURKkY0Q

...
Attachments
yellow_psu_ chassis_2019jan0601.jpg
yellow_psu_ chassis_2019jan0601.jpg (193.05 KiB) Viewed 7222 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 1:58 pm

tlfong01 wrote:
Sun Jan 06, 2019 9:51 am
tlfong01 wrote:
Sun Jan 06, 2019 4:25 am
Yellow is Beautiful
Yellow Chassis

Yellow 5V PSU
...
Attachments
yellow_5v_psu_2019jan0601.jpg
yellow_5v_psu_2019jan0601.jpg (172.93 KiB) Viewed 7203 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Sun Jan 06, 2019 2:40 pm

tlfong01 wrote:
Sun Jan 06, 2019 1:58 pm

NE555 Timer Driving KY019 Relay Test OK

So I checked out if NE555 timer can click KY019 relay.

1. Power on NE555 Timer, set jumper to lowest frequency range, the red LED blinks happily.

2. Power on KY019, connect input to NE555 output. KY019 clicks and green LED blinks happily.

3. I smiled happily. :)

4. I call it a day.


NE555 Driving KY019
(youtube) https://youtu.be/VG9N94o-BgE
...
5V Relay KY019 Research
RE: RELAY MODULE KY-019 5V Postby tlfong01 » 2018-Jun-02 Sat 10:10 pm
viewtopic.php?f=37&t=77158#p1323061
Attachments
ne555_ky019_2019jan0701.jpg
ne555_ky019_2019jan0701.jpg (110.49 KiB) Viewed 7149 times
Last edited by tlfong01 on Mon Jan 07, 2019 4:32 am, edited 1 time in total.
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 4:07 am

tlfong01 wrote:
Sun Jan 06, 2019 2:40 pm
NE555 Timer Driving KY019 Relay Test OK

Research Notes on ZYE1 12VDC, 10mm, 0.8N Solenoid

Now that I know how to use the cheapest, and most popular timer IC NE555 to drive the cheapest but most dangerous relay KY019. Nex fun is to play the also very cheap, but not sure if dangerous DC12V, 10mm, 0.8N solenoid ZYE1.

The immediate problem is "What the hell is 0.8N?"

I vaguely remember my middle school physics teacher saying that one pound mass has one pound weight. But I forgot if he said the English pound or the Metric kilogram.

Also confusing that the he seemed to say mass is equal to weight x acceleration, that the acceleration for everything on the Earth is 32ft/sec/sec. So one pound must equal to 32N.

Now my fat cat weighs 2 kg, ie 4.4lb, so should be 4.4 x 32 ~= 4 x 30 = 120N.

I need to first clarify everything before designing the cheap solenoid to push the RpiZ IoT smart cat feeder and the ESP8266 WiFi smart cat door.

So first thing first to find out what the hell is N.
:mrgreen:

And here we go, ...

Newton (unit) - Wikipedia
https://en.wikipedia.org/wiki/Newton_(unit)
...
Attachments
isaac_ newton_portrait_2019jan0701.jpg
isaac_ newton_portrait_2019jan0701.jpg (50.28 KiB) Viewed 7151 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 5:05 am

tlfong01 wrote:
Sat Jan 05, 2019 2:38 pm
DC12V Solenoid Learning Notes
555 Timer + 5V KY019 Relay + ZYE-10837ZP DC12V 10mm 0.1N Soldnoid
[/color]

ZYE1 Solenoid Wiring Notes

(KY019 Schematic with error!) RE: RELAY MODULE KY-019 5V tlfong01 2018jun05
viewtopic.php?f=37&t=77158#p1324294

(KY019 Schematic with circuit analysis) RE: RELAY MODULE KY-019 5V tlfong01 2018jun07
viewtopic.php?f=37&t=77158&start=25#p1325269
...
Attachments
zye1_wiring_2019jan0702.jpg
zye1_wiring_2019jan0702.jpg (163.67 KiB) Viewed 7129 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 6:57 am

davidcoton wrote:
Sat Jan 05, 2019 2:50 pm
1. In rating the fuse, it is only the cable that is considered. If the current using device (in this case the PSU) needs protection on its input, this should be provided at the equipment.
2. Looking at the photos, the cable is made of conductors with 0.75mm2 cross section, which is normally rated at 6A. But since the current required is much less (~100mA), a standard 3A fuse is suitable. 1A, 2A or 5A could also be used but are less well accepted than the primary standard values of 3A and 13A. Of course I may have mis-identified the cable....

Fake Mains 220VAC Power Cable Usage Notes

The cheap orange cable has no markings. I guess it is low quality one. For heavy duty home appliances (induction cooker, heater, air conditioner), I usually use good brands, such as FYM, ...
...
Attachments
fym_power_adapter_2019jan0701.jpg
fym_power_adapter_2019jan0701.jpg (173.67 KiB) Viewed 7116 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 8:49 am

tlfong01 wrote:
Mon Jan 07, 2019 5:05 am
tlfong01 wrote:
Sat Jan 05, 2019 2:38 pm
DC12V Solenoid Learning Notes
555 Timer + 5V KY019 Relay + ZYE-10837ZP DC12V 10mm 0.1N Soldnoid
[/color]
ZYE1 Solenoid Wiring Notes
(KY019 Schematic with error!) RE: RELAY MODULE KY-019 5V tlfong01 2018jun05
viewtopic.php?f=37&t=77158#p1324294
(KY019 Schematic with circuit analysis) RE: RELAY MODULE KY-019 5V tlfong01 2018jun07
viewtopic.php?f=37&t=77158&start=25#p1325269


ZYE1 Test Setup and Results Notes

1. NE555 blinking, KY019 blinking and clicking happily, suggesting everything OK, except the relay COM, NO contact switch to be tested.

2. PSU 12VDC output goes to input of DC12V PSU/Relay adapter (gry = gnd, ylw = raw +12V).

3. PSU/Relay adapter gnd (gry) goes to Switched Power Connector (SPC) gnd (gry).

4. PSU/Relay adapter ylw (raw +12V) goes to KY019 COM. KY019 NO org (switched +12V) goes to Switched Power Connector (SPC)

5. Ready to switch on/off solenoid or explode!
:mrgreen:

Note - text description too messy. Should draw a schematic.


Update 2019jan07hkt1658

1. Solenoid rod (don't know its name) repeatedly pulls with a loud noise, when KY019 activates (green light on), and releases rod when KY019 deactivates (green light off)

2. So far so good, supper time.

NE555 + KY019 + ZYE1 Operation
(youtube) https://youtu.be/kYSmZUaBNzA
...
Attachments
solenoid_test_step_2019jan0701.jpg
solenoid_test_step_2019jan0701.jpg (190.75 KiB) Viewed 7107 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 12:35 pm

tlfong01 wrote:
Mon Jan 07, 2019 8:49 am
NE555 + KY019 + ZYE1 Operation
(youtube) https://youtu.be/kYSmZUaBNzA

DC12V Solenoid Basic Testing Summary

So far I have done the following.

1. Test if 5V NE555 timer can slowly blink, or actually generating a low frequency 5V square signal.

2. Test if the above square signal can click or activate/deactivate the 5V KY019 relay.

3. Test if the KY019 relay switch (COM and NO) can switch on/off 12V DC power.


The above is only a newbie level test. I am thinking of doing middle level, and advanced level tests.

Middle level tests might include checking out how fast can the solenoid operate. For the KY019 relay, I vaguely remember that it can only operate up to 20Hz, or 20 cycles per seconds. So I usually tested the relay at 10Hz.

For the solenoid, I also would like to know the highest frequency. Another thing I would like to know if the current need to activate and deactivate the solenoid. For KY019, I remember the activate current is 35mA and saturate to 50~70mA, and deactivate at 10mA (but I forgot the exact figure). So I would also like to check the same thing for solenoid.

/ to update, ...
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 1:25 pm

tlfong01 wrote:
Mon Jan 07, 2019 12:35 pm
The above is only a newbie level test. I am thinking of doing middle level, and advanced level tests.
Another thing I would like to know if the current need to activate and deactivate the solenoid.

ZYE1 12VDC Solenoid Calibration Notes

Now I am calibrating the solenoid. This is not a newbie test. A digital regulated power supply (CNY40) and a cheap multi-meter are used in the calibration.
...
Attachments
zye1_solenoid_calibration_2019jan00701.jpg
zye1_solenoid_calibration_2019jan00701.jpg (160.82 KiB) Viewed 7092 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 2:03 pm

tlfong01 wrote:
Mon Jan 07, 2019 1:25 pm
tlfong01 wrote:
Mon Jan 07, 2019 12:35 pm
The above is only a newbie level test. I am thinking of doing middle level, and advanced level tests.
Another thing I would like to know if the current need to activate and deactivate the solenoid.
ZYE1 12VDC Solenoid Calibration Notes

ZYE1 Solenoid Calibration Results

I increased Vin from around 3V to 10V, found the trigger level (pull) at round 5.5V 350mA. Then I decreased Vin to 0.5V and found deactivate level (release) at a very low
level of 0.5V

...
Attachments
zte_calibration_2019jan0703.jpg
zte_calibration_2019jan0703.jpg (89.79 KiB) Viewed 7087 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Mon Jan 07, 2019 2:43 pm

tlfong01 wrote:
Mon Jan 07, 2019 2:03 pm
ZYE1 Solenoid Calibration Results
I increased Vin from around 3V to 10V, found the trigger level (pull) at round 5.5V 350mA. Then I decreased Vin to 0.5V and found deactivate level (release) at a very low level of 0.5V

ZYE1 Response Time / Highest Frequency Test

Now I have setup to test response time. For 1Hz operation, everything looks OK. I am using HKD50 digital square wave generator to control the relay (no longer using the stupid NE555 timer).

Next step is to increase the input signal frequency to see how fast can the solenoid go (I am assuming KY019 can run much faster than ZYE1).


(youtube) https://www.youtube.com/watch?v=nnICQ9_ ... e=youtu.be
...
Attachments
zte_freq_test_2019jan0701.jpg
zte_freq_test_2019jan0701.jpg (186.38 KiB) Viewed 7078 times
I am an electronics and smart home hobbyist.

User avatar
tlfong01
Posts: 1312
Joined: Sat Jun 02, 2018 1:43 pm
Location: Hong Kong

Re: How to use Solenoid Lock 12V DC

Tue Jan 08, 2019 3:31 am

tlfong01 wrote:
Mon Jan 07, 2019 2:43 pm
ZYE1 Response Time / Highest Frequency Test
Now I have setup to test response time. For 1Hz operation, everything looks OK. I am using HKD50 digital square wave generator to control the relay.
Next step is to increase the input signal frequency to see how fast can the solenoid go

ZYE1 Solenoid Max Frequency is about 20Hz

So I started increasing frequency form 1Hz up. I found thing went smoothly until reaching and above 10Hz. At 20Hz, solenoid started trembling. At about 30Hz, the whole thing (plastic case to absorb noise) ran wild and fell over the cliff of the electroin bench, :mrgreen:

That is the end of the speed test.

So far it is the small guys 555,KY09,ZYE messing around. Coming up is the big guy Rpi. I am using a Rigol scope to check out more things. Just now I watched a youtube video about Oz electronics guys. I found some of them use Rigol scopes, perhaps not my entry level, thing, with logic analysizer etc. But I think my cheap (CNY2300) is more than enough to do the solenoid project, ...
...

Next step is testing how heavy a thing can the solenoid pull.

Solenoid fallen over cliff
(youtube) https://youtu.be/8iWx3XXP_TE

Oz Electroniss Guys using Rigol scope
(youtube) https://www.youtube.com/watch?v=lwF8y9ejDZw
I am an electronics and smart home hobbyist.

Return to “Beginners”