Design Help Needed

Hi All,

I am making a usb device to control a ceiling fan from a computer.

I already have the following components:

- fan remote (rf transmitter)

- PIC18F4550 based usb device

I want to put the two together.

Around the button area of the fan remote the traces are quite large. It would be easy to etch the pcb and add switches (bypassing exsiting buttons) that are controlled by the PIC.

Can some please help me identify this switch? I'm figuring I would need 8 as the fan has eight buttons.

Please keep it simple (VERY simple) as I am only a "tinkerer". A part# number from Mouser would be nice ;)

-george

Reply to
George Economos
Loading thread data ...

Okay after some researching it looks like a relay will do the trick. Can someone please confirm?

If a relay is correct please read on...

Power Summary

- usb device operates 5V / 100mA( max ), contains the PIC to control the relay.

- rf transmitter (fan remote) operates using a 9V battery.

Remember the PIC is to control the relay which acts like a button press on the remote (rf transmitter).

Can someone please suggest a relay that makes sense in this application? All relays I found have 4 pins. Why? (I would think 3, 1 for the controller and 2 for the circuit being controlled)

Thanks,

-george

Remember, please be nice newbie here.

Reply to
gecono

Behind the button on the remote two electrical conductors come together (when pressed). Inside the relay the same thing happens that's why there are two output pins on the relay, wire them to the back of the 'go' button on the remote and your relay will be able to command the remote.

Bye. Jasen

Reply to
jasen

Thanks for the reply,

What type of relay would I want? Do all relays isolatate the "controller" from the "controllee"?

Thanks,

-george

Reply to
gecono

a cheap one. pretty much any relay will be able to switch your remote the complicated bit is getting the pic to control the relay.

the PIC is unlikly to be strong enough to operate the relay directly so a transistor will be needed to do that.

how are you powering your pic? Is there more than 5V available for the relay? how much? (5V is ok 12V is better) have you considered using the same power source to provide power for the remote too?

Bye. Jasen

Reply to
jasen

Hi Jasen,

First off thanks for taking the time with me. I truly appreciate it. I am a programmer by day and have just started off in the crazy world of electronics!

As for power, I was hoping to use the usb to drive the pic. I am planning on using a USB-Serial USART chip from FTDI (UM232R) . I believe I should have

+5v available to me (not sure still reading datasheet).

I'm now searching for the right pic that supports usart and has a # of IO pins closest to what I need ( 6 relay circuits to control ). I have found one pic 16F877 but that has 30 IO pins which is much more than I need.

As far the relay circuit, I had found something that incorporates a transistor so I was going to go with that. I have attached a gif of the relay circuit that I have found online. If you are trusting (the gif that is) and feel like commenting on the cicruit great, otherwise no worrries.

I'm off to find right pic and relays. Mouser list some solid state relays that should do the trick (I hope).

Thanks again,

-george

begin 666 IO-PIC16F84-RELAY.gif M1TE&.#EAE0%#`:(`````````@ ``_X ``/__@/___P```````"'Y! $```4` M+ ````"5`4,!``/^6+K-/BII!I%.:BD%E5ZJZ0.9 M;NJIC8E^ZFFGHFI*:JF3]HGJIW:N.FJ=?\\0JZZRTUHJ:JP?::>NNO/:*:X2M M_K#=KPNJ*NRMQ!;^" ``0@R;;(++-HOLLP)&&X2SU!IH+1#89DO@ML="QN>X MY);+I[,\\\\829RN `-+.T&NO-M_\\,L\\LMZSTTB(_^W/0 M,@S-J\\!+JZRQPRXCW7.R3P=!L@I?_C4A'*9* Q_L"&#\\+$+ &!$1?`2^P%-,@8AFKH%D$'NA U_G@@1*:B3^%-191! UZ#_Y1=&#YP.C!*IH M1< X!H@SF8 `.R#%%KR0C&4%$80T9*945Y4F/1Q:$KZHLR*NN2@ M1LFBR?9!T!Z:E"J;&>-'93K3\\HB4-!35*#LYTYKRM#2B/>5(3#=8T__4H(5+*R^W00Q*\\!&UH M:[-2ZD6V!I.]0/7RDQ$+;C0UEIF,9NXB4L[PEB Z36/I7DN#V%I@MOO^L6U3 M$_I9N^04M_:,Q%P.TU4:CL"X?2-N")"K'^4B-;IA22IP2ZK5=6SCNV:$*!+%/7G;=-)PX?R,PKXSO>^/4#FWN2W$X(Z7B\\/B"H]59%[G,/3U$N\\

Reply to
gecono

better)

Hi Jasen,

First off thanks for taking the time with me. I truly appreciate it. I am a programmer by day and have just started my foray into the crazy world of electronics!

As for powering my device, I was hoping to use the usb to drive the pic. I am planning on using a USB-Serial USART chip from FTDI (UM232R). I believe I should have +5v available to me (not sure still reading datasheet).

I'm now searching for the right pic that supports usart and has a # of IO pins closest to what I need ( 6 relay circuits to control ). I have found the pic 16F688 that should fit the bill.

As far the relay circuit, I had found something that incorporates a transistor so I was going to go with that. I have attached a gif of the relay circuit that I have found online. If you are trusting (of the gif that is) and feel like commenting on the circuit great, otherwise no worries.

I'm off to find the right relays. Mouser lists some solid state relays (>1300) that should do the trick (I hope).

Thanks again,

-george

BTW - This is the second time I posted this reply. The first one didn't make it through. Maybe the attachment. If the first attempt ever gets posted ignore it.

Reply to
george

Your ISPs news server probably cancelled it:

formatting link

Thanks, Rich

Reply to
Rich Grise

Thanks for the link Rich. (Believe it or not I've been "news junky" for years ;) I'll try and represent the relay circuit in ascii.

Thanks, George

Reply to
George Economos

better)

Okay according to the usb-uart module datasheet regarding power I will have 5V/500mA available from the usb bus. For me I think it would be easier to tie into that power for the pic.

Below is a relay circuit I found online. I translated it to the ascii you see below. It contains the transistor mentioned above. Hopefully it makes sense...

vcc | \\ |__ o o | )| 1N4001 - )| relay ^ )| |__)| | | |/ [PIN]----/\\/\\/\\--| NPN 10K | |>

| | GND

I will have six of these one for each button. Each one will connect to a io port on the pic.

I'm about ready to order the parts. If anyone sees anything wrong or something missing please let me know. (Feel free to give your nod of approval as well ;)

-george

Reply to
gecono

That looks like it should work. How much current do the relays need? The PIC can supply about 25mA out, but a driver transistor is still not a bad idea. A 2n7000 should be an ok substitute for the NPN transistor above, letting you skip the base resistor.

The 16F88 is a good general purpose PIC. My favorite 18 pinner anyway. ;-) The 8 pin 12F683 is nice when 6 i/o pins is enough. I haven't used the

16F688 yet but it should be similar, just in 14 pin package.
Reply to
Anthony Fremont

I've been maintaing a project over on the Mouser website (nice website for a beginner, shipping stinks). The 2n7000 you mentioned is currently backordered. They cross-referenced another one of their products the Fairchild Semiconductor BS170. Do you think that will work?

If I stick with the npn transistor how do I choose the correct one? Mouser lists over 6500.

Thanks everyone,

-george

Reply to
gecono

5V sounds about right, reading the datasheet is a good idea.

Those are unlikely to work well with the low voltages present in the remote control, and CMOS switches won't work because the switch supply is 5V while the signal is 9V, low-power electro-mechanical relays will probably work best.

you mentioned mouser - maybe part number FBR211SAD005M

formatting link

datasheet:

formatting link

page 4 shows the underside, this relay is type A, so pins 1 and 6 go to youur remote and pins 5 goes to 5V and pin 8 to the transistor.

A hint with the mouser product search: if you hold control you can select multiple values in each category.

attachments don't go well in usenet (outside of binaries groups that is)

Bye. Jasen

Reply to
jasen

...

I'd add another 10K from the base to gnd, i.e.:

vcc | \\ |__ o o | )| 1N4001 - )| relay ^ )| |__)| | | |/ [PIN]-/\\/\\/\\----+----|NPN 10K | |>

| | [10K] | | | GND GND

This ensures a good, solid turn-off, minimizing leakage current in the xsistor.

And what kind of Ioh does your input pin provide? You have to be sure that the xsistor saturates at turn-on - your original

10K could be replaced with, say, a 1K, with no harm.

Cheers! Rich

Reply to
Rich Grise

better)

remote

10K seems a little high, 3.3K, is probably better,

for the small relays you're using (if you use those ones I found on the mouser site) 2n3904 would be a suitable transistor, 1N914 or 1n4148 diodes would work, but there's notheing wrong with using 1N4001.

Bye. Jasen

Reply to
jasen

Probably 2N4401.

Or stop into RS, and get a 10-pack of "NPN Transistor" for about a buck or two - then you'll have a start for your junque box. :-)

Cheers! Rich

Reply to
Rich Grise

Wow, I just got a bunch from them. I musta cleaned them out. ;-) I haven't really had any complaints on the shipping, but I live in houston so I just have it shipped ground. I always get it the next day. :-) It's usually $4.50 or so for the typical under 1lb shipment. I try not to order until I need a bunch of stuff. That's one nice thing about their site, your shopping cart doesn't die when you close the browser.

You have to check the specs on each one. :-O Not really....you just need a general purpose switching transistor like a 2n3904 or 2n2222 depending upon the current requirements of your relays. You might even be able to get those at radio shack still. You'd have to check the datasheets to be sure, but those should be good for 100 - 150mA. If you use an SSR, you won't need the diode either. It's for a magnetic coil type relay. It won't hurt anything, you just don't really need it.

Reply to
Anthony Fremont

better)

remote

Would you mind sharing the relay you were talking about? It's a lot of work picking out the components! I was considering going the ssr route but couldn't find a suitable one. So now I'm look at the general purpose ones.

Thanks,

-george

Reply to
gecono
[snip]

If you're planning to use electromechanical relays, you probably don't want to power them off the USB port. The USB will power the PIC just fine, but you'll want a wall wart for the rest...

If you addressed that in another post, ignore this message. ;)

Reply to
Randy Day

it and (url of) the datasheet are in another branch of this thread but here it is again anyway.

formatting link

--

Bye.
   Jasen
Reply to
jasen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.