Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PICs in general

Status
Not open for further replies.

AtomSoft

Well-Known Member
Hello again, Im trying to figure out something this is.. I have a nice idea of what i need to do and how to code it but im worried about wiring. Some of my wires need to be anywhere from 10 to 100 feet or more. How would you suggest wiring this?


I have 2 LEDs the main board that controlls these LEDs are 50 ft away.

1. What type wire should i use?
2. Since wire is resistance how would i calculate the resistance on general terms?
3. If i have a 12v supply and cut it down to 5v how would i send the 5v across what could be a hundred feet (depending on location)
 
AtomSoft said:
Any links to tutorials on this before i do a search?
I assume you will be using assembler.

Nigel's tutorial would be a good place to start.
PIC Tutorial Seven - RS232

It teachs everythiing you need to know about RS232. The tutorial is several
parts 7.1 to 7.7. If you do all 7 you should understand RS232. At least to the
point where you can ask the right questions.

After that your app should not be too hard.
 
It all depends. Like one person suggested is avoiding the voltage drop by having the current draw locally and controlled remotely. If you absolutely have to send the current over those distances you can read the voltage across the LEDs at the the terminals of the LEDs and just ajust your power to them accordingly.

A little more complicated if you want the adjustment automatically is have two very small sensing wires running back to your main board. Their whole purpose to to provide a voltage drop reading of what's across the LED. Then you circuit can compensate for the loss since it will know the current going through the LED and the actual voltage drop at the LED.

We use to do that with driving 12V auto type bulbs over 25ft of cable. They draw over and amp so wires drop quite a bit over those distances.

Of course you can spend extra money buying silver coated copper wire but that's a bit pricy.

Michael
 
If you just need the LEDs 50ft away then use bell wire and reduce the current limiting resistor accordingly. As you have 2 LEDs it would make sense to charlieplex them and therefore only need 1 twin core cable.

Mike.
 
Hi. If you are just sending a signal over 100 feet of 22 or 24 guage wire simply to light LEDs, no sweat. You will of course need a cable with at least three conductors, two for the signals and one for return. Unless you want to get tricky and connect the LEDs up in opposite polarities, in which case you can use just two wires to select one LED or the other, but not both, by putting opposite signal levels across the wires.

At most the resistance across decent wire at that distance is 3 to 5 Ohms. Heavier guage will be less.If you need to assure yourself of this, simply measure the wire's resistance before you install it. You can expose and twist together the two wires at one end, then measure the resistance across the these wires at the other end. Face it, you're going to put 330 to 1000 Ohm resistors in line with the LEDs anyways for current limiting. If you have 2 LEDs and each pulls 20mA max, you're pulling 40mA max. The Vdrop across 200 feet of wire round trip, at say 5 Ohms, would be 0.1 Volt. This leaves you 4.9 Volts for LEDs which usually only need 2 to 2.3 Volts to work. Just wire the whole circuit ahead of time and take the measurements for Vdrop and current draw, then you'll know for sure.

If you plan to do something else then let us know NOW.

Later!
kenjj
 
If you want to eliminate all the guess work about wiring resistance and voltage drops, use a current source to light the LEDs.
 
Lol the LED scenario was just a example. I will be like LEDs, LCD and some buttons that have to be able to send and receive signals from 50ft or more.
 
kjennejohn said:
Hi. If you are just sending a signal over 100 feet of 22 or 24 guage wire simply to light LEDs, no sweat. You will of course need a cable with at least three conductors, two for the signals and one for return. Unless you want to get tricky and connect the LEDs up in opposite polarities, in which case you can use just two wires to select one LED or the other, but not both, by putting opposite signal levels across the wires.

At most the resistance across decent wire at that distance is 3 to 5 Ohms. Heavier guage will be less.If you need to assure yourself of this, simply measure the wire's resistance before you install it. You can expose and twist together the two wires at one end, then measure the resistance across the these wires at the other end. Face it, you're going to put 330 to 1000 Ohm resistors in line with the LEDs anyways for current limiting. If you have 2 LEDs and each pulls 20mA max, you're pulling 40mA max. The Vdrop across 200 feet of wire round trip, at say 5 Ohms, would be 0.1 Volt. This leaves you 4.9 Volts for LEDs which usually only need 2 to 2.3 Volts to work. Just wire the whole circuit ahead of time and take the measurements for Vdrop and current draw, then you'll know for sure.

If you plan to do something else then let us know NOW.

Later!
kenjj

This is nice information but its for a system i want to make to controll some electronics around the house. And if i sell this system to consumers i cant always go out and test dropage thats why i need like some type of formula or some way to have a normal drop i will be using most likely like a 3 wire or like a cat5 type cable most likely.
 
AtomSoft said:
Lol the LED scenario was just a example. I will be like LEDs, LCD and some buttons that have to be able to send and receive signals from 50ft or more.

Use a 2nd PIC to keep the wire count down as I suggested in my first post.

If you are going to have lots of IO scattered about you may want to use a simple network.

Your post was vague. You had us guessing. With more details you often get a better answer. If you provide too much details it gets long and people only get part of it. There is a sweet spot in the middle which is not always easy to find.

EDIT
Just read the post you just posted. You want a network.
 
thanks 3v0. I was just wondering about the wire length. Havent read the tutorial yet because i find nigels tutorials kinda scary there is like no formating on it.Like a bunch of text just lying on screen. But i guess its the best place to start so. Ill be back on later will read this stuff and see what i come out with.
 
OK i have a better understanding on how to send the data in code.. but wiring still got me scared lol. I guess ill read some more (google is always good lol)
 
AtomSoft,
You should fill in your location.

If you are thinking about building home control systems for sale you need to look at what is already out there. If you would like to do it for fun or because you want to DIY then that is another thing.

A few years ago and maybe for a short while longer RS485 was my choice for such a system. But the price of ethernet controlers has fallen enough that I am leaning in that direction.

Networks are more complex then point to point communication. It is not a newbe sort of thing. I am not saying you should not do it. Maybe just do a few other things first.
 
3v0 said:
AtomSoft,
You should fill in your location.

If you are thinking about building home control systems for sale you need to look at what is already out there. If you would like to do it for fun or because you want to DIY then that is another thing.

A few years ago and maybe for a short while longer RS485 was my choice for such a system. But the price of ethernet controlers has fallen enough that I am leaning in that direction.

Networks are more complex then point to point communication. It is not a newbe sort of thing. I am not saying you should not do it. Maybe just do a few other things first.

I want to do it first for a DIY then after learning more and fine tuning it, for sale. You refer to RS485 and others ... are they ethernet controllers? I understand that networks are complex but it wouldnt be worth while if it wasnt a bit complex because that would mean it was too easy to achieve.

I would like to learn more on ethernet controllers but i need to know actual parts and not just theory reading/writing. Like RS485 what chip would be needed to use this? Like for RS232 i use a MAX232 from Maxim-IC now can i just hook up 2?

Like board A has a rs232 chip and board B has 1 also and just wire it out to the serial goes to the input serial of the other and the ttl parts goto the chips Rx/Tx ? And have them comunicate like that? (this is theory)
 
MAX1487, MAX481, MAX483, MAX485, MAX487, MAX488, MAX489, MAX490, MAX491

Low-Power, Slew-Rate-Limited RS-485/RS-422 Transceivers

Would that be a good place to start?
 
RS422 and RS485 are not internet controllers. They are mostly level converters that go between the uart and the wire. They allow the signal to cover long distances. Their are several lighting, building control, and industrial control networks that use them. I should know the names but I am rushed and they escape..

Ethernet controlers are a challenge for pros. I suggest you start with a RS485 network. What you are saying is that you are interested in rockets and want to start by building a space shuttle. Too complex! :) But you can get there in time.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top