Notifications
Clear all

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

52 Posts
7 Users
11 Likes
4,456 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6960
Topic starter  

I am 79yo and getting back into electronics after about 55 years of computer software. I need to create an arduino controlled relay to turn on some LED lights. I also need a way to reset the relay maybe both locally (push button or Bluetooth) and even wiFi for remote control. I am a programmer so I have a rough idea how that will work. I think telegram could be used for the remote wifi based reset.

I googled it and I guess I don't speak that language. I searched Bills work and don't understand his project that mentions it.

I just need a pointer to a beginners guide or something, most of the devices mentioned were invented after I left school so I have a steep learning curve.

TIA, the old newbie.

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
 

Hi Ron,

I have been down the path of driving relays and etc, just recently and am pretty much half way up the learning curve of MQTT and WiFi based home automation. Bill has done some really good "Intro" level tutorials. I definitely recommend these to you. Just scroll back through what Bill has presented. It is flawless. . 

Let me offer a conjecture on the other, more fundamental issues you have raised;

As a former Field Tech I have developed a propensity for side stepping the Elementary (in the true sense of the word). I just go for the jugular. "Get 'er done".  I show up with my little black suitcase and nod sagely whist stroking my chin as the customer describes the fault and all the while the thoughts going through my mind ..."How do I get the panels off this thing and at the same time maintain the illusion that i know what I am doing?"

This "quick and dirty" approach has it's upside. If I had had to get right down in the weeds with every technology I was ever presented with I would still be on my first week of repair call outs.

I have worked with techs who espouse the aforesaid philosophy, but who make the mistake of thinking ALL Elementary knowledge is superfluous ...BIG MISTAKE ... these guys will sail like heros for six months, or so, until they hit the first knotty problem then come a screaming gutser.

If you aren't  in love with Science and the fundamental nature of Physics don't pursue a career in Electronics. Every day of my working life I felt like I was playing a hopeless game of "catch up" like trying to change a tyre on a moving automobile.

The Laws of Nature have remained  the same (as they always will) but our understanding of them has astonished me.  People bitch " Futurism promised we would be vacationing on Mars in 2020 ~stomp stomp~"

I say "have you seen an ESP32 CAM ?"

To extend the argument ; If you don't like the desert and remote areas and living and working from a tent then don't study Geology"

There is a lot that sucks about getting on in years, but every year I live on this dirt, the sight of a thermionic valve ("toob" for you yanks) heater gradually lighting up and the electrons starting to flow gets infinitely sweeter.

It is like firing up an illegal moonshine still and waiting for the heads to come through and deciding when to make the "cut" .. Something I think REAL Americans will understand only too well.     😉

Cheers Mate !!

 

M


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

@mark-bolton LOL, you are reminding me of the newbie IBM field tech working on an old Queen Anne era piece of tab equipment. The panels on those things were interlocked. The story is that a newbie started on the wrong panel, it didn't budge so he went to the next, same story. At panel 4 the grin on his face was short lived as he removed panel 4 and the other 3 came crashing down with an almighty clang. Still makes me chuckle.

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 

Glad you are in the mood to trade yarns....     Ron.

When I was in Trade school on the 80s ..year One we got Ohm and etc. Year Two we got Computer Science  and the syllabus was more or less based on the PDP 11 ... I hadn't  "bridged up" (an Australian slang term for rebelling) over endless Boolean Algebra theory, I loved it then an love it to this day because it speaks to the fundamental nature of reality.

There were lectures on Core (ferrite) Memory and I got a bit pissed off ... Remember this was the Age of the 8080 ... I got quite stroppy and told the lecturer off, for fobbing us off with obsolete technologies and inferred he was too lazy to update the syllabus. I was, am , and probably always be, a mouthy prick. 

I forgive the people that I have worked with who had a "go" but got it wrong. It happens. I will never forgive the  "do nothing and you can do nothing wrong" contingent who went on to promotion to management and decent coin.  And eventually destroy a Business  by being part of a mechanism that selects for incompetence.  

You mention IBM ... The riff was "Idiots Become Managers" ...

Oh by the way I worked for Kodak ... and can see how a  whole house of cards can get blown away from the inside.

Immediately  out of trade school my first job ... I was given  .. Kodak .. Mother Hen to a little cluster of PDP 11s ... I learned to love the PDP 11 (not that I had any animosity to them in the first place) ... I learned to love the PDP 11 ..the power supply especially .. Gasp at the beauty that radiates...

A beautiful machine all round.

Kindest

M

 

 


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

@mark-bolton Ah, you are a youngster. My first computer was 1959, a Ferranti Packard Canada Analog. It was a gift to my high school. By the early 80's I was wrapping up a 15 year career at IBM. Left there for new adventures. Ended up with my own company but 911 put me out of business for a couple years and I was unable to cross the US border after 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.


   
Mark Bolton reacted
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 
Posted by: @ronalex4203

I need to create an arduino controlled relay to turn on some LED lights.

Google using a MOSFET instead of a relay. They're cheaper, use less energy, work faster and last longer than relays and you an drive them directly from the Arduino.

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: 6960
Topic starter  

@will Ok, sounds interesting. Keep in mind those devices were invented after I went to school so I don't think of them. Maybe I need to find a book or something that tells me the capabilities of all the solid state devices. I was trying to not use the Arduino to keep the 'relay' up, thus the latching question. Is there a way to do that with a MOSFET? I am only controlling 12VDC for a small number of LED's. Maybe the 'switch on' signal from the Arduino is really small as in milli-amps?

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: 2527
 

@ronalex4203 

Here's an example of driving LED strings with MOSFETs.

https://learn.adafruit.com/rgb-led-strips/usage

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: 6960
Topic starter  

@will Thank you! One question though, the LED's in my application are not dimmable and don't need to be so should I use other pins than the PWM? For simple ON/OFF would I use the digital pins? Also the example MOSFET is still way more power than I need. I have probably less than 1A at 12V, maybe a lot less. The example is for a 16 A MOSFET. I know DigiKey has an online calculator thing but I haven't found it yet.

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 

A bloke like you  call "boss" in an Australian workshop.

Same way as my flying instructor checked me out on the DH - 82 Tiger Moth. I told him I was terrified of the thing..  He said "if you weren't I wouldn't have cleared you to fly it by yourself."  

I flew it and my toes were trembling... but it is a real aeroplane...

I grew to love it...

 

M

 


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

@mark-bolton Dam straight that's a real aeroplane, they don't make them like that anymore.

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
 

Ron,

start with Pi or ESP 32 GPIO pins best to drive optocoupled relay boards. they come in clusters of 4 or 8 ...This is what I am using. to drive lights in my RV Smart Habitat .. the truck I live in ..

It works smoothly. I am delighted with how wonderful my life is with mastery over this aspect of my life.

Perhaps if you would care to share with us what you were trying to "make happen" we might be better able to assist you with something more specific to your needs?

A MOSFet is just a switch ... dont get side tracked into considerations about exceeding it's ratings.  If you are only using it well within its rated Imax don't worry about  it

Kindest

M


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

@mark-bolton It's for my RV basement. When I open a basement door I want to sense that and turn on the lights. I currently use mag reed switches but they don't work that well and I want to do more off the open event. I was just looking at the diagram @will posted and it took me a few minutes to figure out how that could work. They have a special board with 9V power, I do NOT want the LED power going through the Arduino, that's why I thought relay. I am not sure this will work without looking at some other information. It may, but too tired to check now.

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
 

Welcome to a conversational metaphysical coven where we hope to admit to our deficits of skill. Only to go on to encourage the throng, to become the best they / we  can whip out of ourselves...

Kindest

M


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

@mark-bolton The problem with the relay approach is how to latch them and do they make them with multiple contacts. I need two NO sets to do the latch, just seems wasteful to use 2 relays for 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.


   
Page 1 / 4