Ford Transit USA Forum banner
41 - 60 of 69 Posts

· Registered
Joined
·
5,761 Posts
I have been looking for ways to make wiring lighting easier.

Especially as it applies to wanting on / off switches in multiple locations and lights in multiple locations.

The wiring can become complex very quickly.

It seems like the concept is here - but the implementation - at least initially - seems complex to me.

I have not written code since Fortran in 1984, so perhaps that is why.

Might need some help to make all of this work.

Do not want to use phone / application to turn on lights - strictly with switches.
I came across some nice switches the other day, They will custom label them any way you want them. The pricing is not too bad.

 

· Registered
Joined
·
357 Posts
ounds ambitious what are you using for a controller?

Why no cameras, GPS and servos to control the steering and brakes? Limited on GPIO's?
LOL not yet...
I'm using the ESP32. I go a few SX1509 expansion boards from sparkfun to add GPIO's. My strategy is I can use 8 buttons to control 8 relays with each SX1509 and then any other sensors (temp, IR, Air quality) I just wire directly to the ESP32

Some advice:

#1: Cut your hair really short so it's hard to get a good hold on it. Ripping out roots causes real damage.

#2: When editing a "working" code, the first thing I do is type a line that says:
"//Started editing a working code HERE on 11/11/2021 10:14AM"
That way if things go south, you can click "undo" and you'll know when to stop "undoing" when you get back to that line. If you're happy with the changes, you can delete the line or just leave it since it's a "//" line.

#3: Store your code on a USB flash drive or a cloud based storage. Don't depend on Bill Gates and one hard-drive to keep it for you.
🤣 #1 is especially good advice.

#4: Program more than one micro-controller so you have a second working device. When you accidentally touch a connection with a hot or ground and the smoke comes out you'll have a spare.
LOL I bought three of the espressif esp32 dev kit boards from mouser; the boards themselves were cheaper than the shipping I think. I'm using this screw terminal breakout board (I like screw terminals because I'm a shoddy solderer) So I can literally just plug my backup esp32 in if anything goes wrong and I need to replace it.

KEEP US INFORMED ON PROGRESS!
Will do! I'll put together a write up here once the dust settles; I keep adding on to my plans so the design is pretty fluid still.
 

· Registered
Joined
·
357 Posts
I have been looking for ways to make wiring lighting easier.

Especially as it applies to wanting on / off switches in multiple locations and lights in multiple locations.

The wiring can become complex very quickly.

It seems like the concept is here - but the implementation - at least initially - seems complex to me.

I have not written code since Fortran in 1984, so perhaps that is why.

Might need some help to make all of this work.

Do not want to use phone / application to turn on lights - strictly with switches.
You could probably get away with an Arduino Nano and just change the pin numbers in the code posted in post #21 of this thread accordingly.

I'd buy an arduino nano with the header pins pre-soldered so you don't have to do it - something like this: AmazonSmile: Emakefun Nano V3.0, Nano Board ATmega328P 5V 16M Micro-Controller Board with USB Cable (Soldered 5pcs) : Electronics

And then you could plug the Nano with it's presoldered pins into this screw terminal board so that connecting wires is durable and simple AmazonSmile: 5pcs Nano Screw Terminal Adapter Shield Expansion Board Nano V3.0 AVR ATMEGA328P-AU Module for Arduino : Electronics

And wire up the outputs to a relay module like this one: AmazonSmile: HiLetgo 5V 8 Channel Relay Module with OPTO-Isolated Support High and Low Level Trigger : Industrial & Scientific

And then get any sort of momentary switch you'd like to use - I like metal one's that are easily installed with just a drill bit into your switch panel like these: DaierTek 6pcs 12mm Momentary Push Button Switch 12V Waterproof Power Pushbutton Small Round Chrome Stainless Metal 2pin N/O: AmazonSmile: Industrial & Scientific


I think you'd wire the switches to pins A0 - A7 on the arduino and the relays to pins D2-D9 and then change the code from post #21 to reference the appropriate pins.

Hopefully somebody that actually knows what they're doing can confirm that I have this right
 

· Registered
2022 U8U
Joined
·
760 Posts
If you are interested in this space and are comfortable with microcontrollers, take a close look at ESPHOME:
It is lets you build almost anything you can imagine out of cheap ESP boards. Once you get your head around it, it is wholly remarkable.
 

· Registered
2022 U8U
Joined
·
760 Posts
I have been building on a breadboard for testing and the tutorials i have found all have me using a resistor with the LED and switch. My understanding is that this is to keep the power down so as not to burn out any of the pins. My question is will I need to use resistors when I actually wire in the relays or will the relays themselves provide the needed resistance?
The purpose of the series resistors is to limit the current in the LED circuit. If you are controlling the LEDs via the dry-contact outputs of a relay, you definitely still need the resistors.
The relays will NOT take their place, even if the relays themselves are being controlled through onto-isolators. Electrically, a relay output looks exactly like a wall switch. Without the resistors, the LEDs will have a very short lifetime.
 

· Registered
Joined
·
66 Posts
thanks for all!
I am plowing ahead, I am waiting on the relay board, but in reviewing, I may have something I can't use, looks like the input power is higher than 5v, 12v recommended. Sigh.
I am using ESP32-C3-DevKitC-02 which confounded me for a while but am making progress.
I am not sure I follow on the "dry-contact". My vision is that the ESP controls the relay which in turn activates the circuit for whatever it is I want to control, be it an LED circuit, heater, etc. Still need the resistors??
I too am going to use a breakout board as it seems like a good way to get solid connections and the ability as mentioned, to replace the board should I need to. Or just program a new one and swap in to make changes.

I have not written code since Fortran in 1984, so perhaps that is why.
It is so funny to see this. I was just telling a young colleague about the programming cards from college and they were totally clueless. How times have changed...
 

· Registered
Joined
·
83 Posts
My vision is that the ESP controls the relay which in turn activates the circuit for whatever it is I want to control, be it an LED circuit, heater, etc. Still need the resistors??
An LED cannot handle more voltage than it is rated for, else it lets out magic smoke in a very brief flash of light and becomes a DED (Dark Emitting Diode). Typically you would include a resistor to drop the voltage and feed current to the LED. (Larger strings of LEDs can do this differently, but leave that aside for now.)

Example: an LED is rated at 2V with 20 mA of current. If you are driving this with 12V through a relay dry contact, you would need to drop 10V across the resistor. Per Ohm's law R=V/I, so the resistor would need to be 10/.020 = 500 ohms.

That said, if you are buying an off-the-shelf thingie that is designed to be driven by an external controller, the resistors are likely built in. But you would need to read the specs to understand the interface requirements and limitations.
 

· Registered
2022 U8U
Joined
·
760 Posts
I may have something I can't use, looks like the input power is higher than 5v, 12v recommended. Sigh.
I am using ESP32-C3-DevKitC-02 which confounded me for a while but am making progress.
I am not sure I follow on the "dry-contact". My vision is that the ESP controls the relay which in turn activates the circuit for whatever it is I want to control, be it an LED circuit, heater, etc. Still need the resistors??
I think the confusion here is between the "control" side of the relay (which is a solenoid coil and rated for a specific voltage) and the "control" side of the relay (which is two or more dry contacts, and doesn't care nearly as much about what voltage it is switching). The whole point of a relay is to electrically isolate these two things. Your ESP will be controlling the coil. If it is a 5VDC relay, you will need to convert from the 3.3VDC output of the MPU to 5VDC. There are cheap, simple boards or circuits to do this. The stuff you are controlling is connected to the dry-contact side of the relay. You have much more flexibility here--12VDC will likely be fine, depending on the relay. But, YES, you need a current-limiting resistor. Although this resistor can and will drop the voltage, (depending on its value), even if you don't need to do this you STILL need it. Its purpose is to limit the current through the LED. The voltage drop is secondary. There is nothing in the relay's output side that will limit this current, so the resistor is necessary. As stated, many LED packages already provide this resistor.
 

· Registered
Joined
·
357 Posts
thanks for all!
I am plowing ahead, I am waiting on the relay board, but in reviewing, I may have something I can't use, looks like the input power is higher than 5v, 12v recommended. Sigh.
I am using ESP32-C3-DevKitC-02 which confounded me for a while but am making progress.
I am not sure I follow on the "dry-contact". My vision is that the ESP controls the relay which in turn activates the circuit for whatever it is I want to control, be it an LED circuit, heater, etc. Still need the resistors??
Post links to the relay board you have here - Sometimes you can supply the board itself with a 12v current separately and then control it with the 5v Arduino or 3.3v esp32 signals still I believe. Scroll down to the bottom of this page for an explanation: Relay-Board-How-To - ArduinoInfo (mywikis.net) assuming your relay board is similar to the one discussed at that page.

I think brio and LostinWoods already touched on this but if you're using the relay to control a 12v load and that load is a 12v LED puck light, then you're totally fine - the relay is just your light switch.

If you're trying to power a little led (like one pictured below) directly off of the arduino (and not through a separate relay module) then you likely need a resistor as these don't have the necessary resistor's built in like the puck lights I linked above.

Head Product Circuit component Automotive lighting Audio equipment
 

· Registered
Joined
·
130 Posts
Thanks for the reminder about using tech like arduino and relays.

I've built arduino-based puzzle systems for escape rooms and home alarm systems with remote monitoring, and I have thought about leveraging the technology to provide automation and control within my campervan build.

As I am on only my 5th iteration (SCRUM-based approach to DIY campervan), but at some point I will likely use this tech in my van, and potentially leverage sigfox.

Below are some videos of early escape room prototypes leverage arduinos for control.



Circuit component Electronic instrument Hardware programmer Electrical wiring Audio equipment
 

· Registered
Joined
·
2,074 Posts
I came across some nice switches the other day, They will custom label them any way you want them. The pricing is not too bad.

Those are pretty cool.

What I would like to find is a "network" based switch / wiring arrangement that is off the shelf and does not require me to learn coding.

Nothing wrong with Ardiuino stuff for a DIYer.

My approach with customers is to provide them with components that are easy for them to purchase and self - repair / self replace without my intervention when possible, so me writing code doesn't fit that concept.
 

· Registered
Joined
·
766 Posts
Discussion Starter · #55 ·
I dont know, Boat stuff? Lot of people buy these Blues Sea switch panels.

I found that LED controller interesting. The only problem I have with stuff like that is when it breaks, can I get a replacement or has it been discontinued.

Also, I think I'd play with changing colors for a while but since I live in a state where weed is illegal, I think I'd soon lose interest and just leave them on warm white.
 

· Registered
Joined
·
5,761 Posts
I found that LED controller interesting. The only problem I have with stuff like that is when it breaks, can I get a replacement or has it been discontinued.

Also, I think I'd play with changing colors for a while but since I live in a state where weed is illegal, I think I'd soon lose interest and just leave them on warm white.
I chose something simpler, A pair of red LED or white LED dome lights. They have held up well for five years except mine is the old style with a rocker selector switch mounted on the light, I control them with wall switches as well.
I guess the red light was fun for a while but I mostly use the white light.

 

· Registered
Joined
·
7,226 Posts
@orton would love to know if something like this would work:



Sent from my iPhone using Tapatalk
I thought I had a faulty solid state time delay. Had the supplier sent me a replacement but it also did not provide a time delay. Obtained the phone number of the relay manufacturer from the supplier. Explained my installation and he stated that a solid state relay has a small amount of output at all times. The inverter remote contact only requires a small input so was starting from that input. The relay manufacturer said I needed a relay that has mechanical contacts to eliminate any output before the time delayed output. Changed to a time delay relay with mechanical contacts which solved the problem. Now inverter will not start until after the time delay.
 

· Registered
Joined
·
7,226 Posts
41 - 60 of 69 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top