Notifications
Clear all

[Solved] Need pointers on how to create a latching relay with arduino including reset

52 Posts
7 Users
11 Likes
4,418 Views
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@ronalex4203 

I was actually editing my last post when you replied.  I don't know if it now reads any better or makes any more sense.

 


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@will I am hoping to use the PIR as a signal the door has been closed. Not having any experience with it I don't know if it will work or not. That area is heated, but with the door(s) open it will change quickly. It's an experiment!

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 
Posted by: @ronalex4203

@will I am hoping to use the PIR as a signal the door has been closed. Not having any experience with it I don't know if it will work or not. That area is heated, but with the door(s) open it will change quickly. It's an experiment!

That doesn't really sound like a good use case for a PIR. It's normally used where you want to detect a presence (like a human or animal) by observing a moving IR source. That's why it's used in security lights and devices.

Putting on on the inside of a door to an enclosed space doesn't really fit in well with its design. About the only good thing would be that it would light up the interior if a raccoon or a very large squirrel got into the "basement".

Anything seems possible when you don't know what you're talking about.


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@will Perhaps I didn't explain well. When the door is opened the PIR will be told to start measuring. When the PIR sees a sudden change (direction controlled by temp sensor) it will set the door state to closed. This is because I am guessing it won't be easy to use the radar sensor to notice the door close. If I can get the mag switches working reliably then that will also be an option.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@ronalex4203 

I'm sorry, but I'm very confused.

- what noticed the door opening ?

- when the door is opened, WHAT will tell the PIR to start measuring ?

- what do you expect the PIR to measure ?

- how does the temp sensor detect a change of direction ?

- how was the door state changed to open so that it can now be changed to closed ?

- what is the radar sensor doing all this time ?

In my opinion, I think the NO reed switch is the perfect tool for the job and, since it's already available and in position, you should start looking carefully at it to see if you can get it working properly.

It shouldn't use any power until/unless the hatch is opened and you could tap in a few extra wires to monitor the state of the door(s) inside the RV. It could even act as a burglar alarm in case somebody breaks into it.

Anything seems possible when you don't know what you're talking about.


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@will Radar sensor,

door open event,

temperature (isn't that what it does?),

really? (read 1, read 2, subtract, normal data processing),

radar sensor,

not sure, I will find out.

Yes, I will work on the reed switch but reliability is in question so I want multiple sensors.

This is just simple state logic programming, I am quite comfortable with that.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@ronalex4203 

I think you'd better Google some more info on radar sensors and PIR sensors, I don't think that they'll do what you're expecting.

PIR sensors detect a change in position of a heat source, but not its distance, direction or temperature.

Radar detectors detect the presence of a person, (some claim by RF reflecting off the water in the human body) but do not record distance or direction.

They may not be suitable for sensing a door opening and closing.

Anything seems possible when you don't know what you're talking about.


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@will I guess you don't know what a storage bay in an RV looks like. It is a closed on 6 sides box. If the door on each side is closed, the radar return will not change. If I open a door the radar return will be different. That is all I care about, a change in the steady state. I just googled PIR and it will work. I only added it as a backup to the radar sensor. I will probably not use the PIR for the first attempt to see if I can detect the change in signal from the radar from unknown to a normal steady closed box state. I figured I could detect the heat change easier. Keep in mind what happens. Door is open. Person walks up to the door to close it so is detected by maybe the radar but for sure the PIR. The PIR then notices the person has gone. Assumption is the door was closed. If I can get a recognizable signal pattern from the radar then I will use it. Please keep in mind I am in invent mode, I will try many solutions and until I can prove one of them does not work I will not discard it.

ALSO, if those glass magnetic switches work without constantly breaking then they are the best bet. Under the right conditions they are the best solution, but my RV is not a good match for them. It is to do with the metal frame construction with very few flat areas for mounting and very thin aluminum edges that do not allow a good screw hold. When those hatches close there is a lot of force and vibration. I will install all the sensors I can find that may work and then with software observe what happens under real world use. I saw a video today from the Swiss guy and he was showing a couple different radar based sensors that might be better for me. Remember, I am experimenting.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Mark Bolton reacted
(@mark-bolton)
Member
Joined: 3 years ago
Posts: 108
 

@ronalex4203

It seems like you might be instantiating elementary boolean solutions to the task you are hoping to achieve.

I love that stuff ..Karnaugh maps were a vital part of the designing modifications I did with production machinery to get it to do what the customer wanted. In trade school Karnaugh maps seemed like some desiccated useless Rubick's Cube of unproductive clever clever.. ..

But when I picked up tools I realized that Boolean Algebra was an indispensable tool in my little black bag .. It has stood me in good stead ever since...

Kindest Regards

 

M

 

 


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@mark-bolton No idea what those are.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
(@mark-bolton)
Member
Joined: 3 years ago
Posts: 108
 

Also Ron I am not sure if my photo of my home these last seven years... "live the free life of a rover"  .. showed up in the chat ... in any event it is not so important. I have taken my truck to places where security issues were boiling but the lugenpresse said nothing and we thought we were safe. 

Now I am living in a locale where the lugenpresse is telling us it is a war zone. It kinda is nasty but I know my next door neighbors and I am clued up enough to protect myself and my own .. s In Australia  we are more or less forbidden fire arms ..... but we are nothing if not a resourceful people. 

Break into my home and you are doomed... not going to explain it to you .. just don't threaten me ..be you crim or be you copper...

Sorry guys this is way off topic.... just me being paranoid..

Just going extempore ... not trying to set a bad example.

Lets just keep to the program 😉

M


   
(@mark-bolton)
Member
Joined: 3 years ago
Posts: 108
 

@ronalex4203 Ron are you saying you arent aware of Karnaugh maps ... or Boolean Alge4bra ? That would also extend to Game Theory ? ..

It rained hugely last night.

Now I am toasting my toes while the rain covers my truck and leaks into my living space ... it fell on my sleeping head this morning.. "plink plink" it went.. onto my greying nog..

I know exactly how to fix it.. and will do so when I feel the need.

M

 


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@mark-bolton What? Do you understand I am Canadian, NOT American. I personally have never known a person who had their house broken into or a car stolen. All this talk about defending yourself is pretty theoretical. In the US they average 1 mass shooting per day. We have had maybe 4 or 5 in the entire history of our country. I own a gun, can even buy a handgun if I wanted to all legal but for what purpose? Most UK cops don't even carry guns. If I knew how to close this thread I would, I learned what I asked about long ago and now it's descending into off topic stuff.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6903
Topic starter  

@mark-bolton Yes, has nothing to do with understanding the customers needs and resolving them. Maybe you think I am weird, but I did win several major awards at several different companies and at one time held the record for fastest transaction processor. I understand what an OR is and an XOR but have almost never used any of that stuff for financial systems or my last gig the stock market. Knowing what an option is or a commodity is far more important than simple language stuff.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
(@mark-bolton)
Member
Joined: 3 years ago
Posts: 108
 

@ronalex4203 Well Ron now would be the perfect time to discuss more interesting things? 


   
Page 3 / 4