Connect with us

Design Help Needed

Discussion in 'Electronic Basics' started by George Economos, Mar 23, 2007.

Scroll to continue with content
  1. 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
     
  2. gecono

    gecono Guest

    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.
     
  3. jasen

    jasen Guest

    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
     
  4. gecono

    gecono Guest

    Thanks for the reply,

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

    Thanks,
    -george
     
  5. jasen

    jasen Guest

    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
     
  6. Guest

    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.
     
  7. Rich Grise

    Rich Grise Guest

    Your ISPs news server probably cancelled it:
    http://www.exit109.com/~jeremy/news/misplacedbin.html

    Thanks,
    Rich
     
  8. 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
     
  9. gecono

    gecono Guest


    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
     
  10. 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.
     
  11. gecono

    gecono Guest

    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
     
  12. jasen

    jasen Guest

    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

    http://www.mouser.com/search/Produc...virtualkey52910000virtualkey817-FBR211SAD005M

    datasheet: http://www.fcai.fujitsu.com/pdf/fbr211.pdf

    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
     
  13. Rich Grise

    Rich Grise Guest

    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
     
  14. jasen

    jasen Guest



    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
     
  15. Rich Grise

    Rich Grise Guest

    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
     
  16. 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.
     
  17. gecono

    gecono Guest

    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
     
  18. Randy Day

    Randy Day Guest

    gecono wrote:

    [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. ;)
     
  19. jasen

    jasen Guest

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

    http://www.mouser.com/search/Produc...virtualkey52910000virtualkey817-FBR211SAD005M
     
  20. jasen

    jasen Guest

    the relay I chose only needs 100mA(worst case) for the coil,
    as long as he only needs one at a time for his remote,
    there will be no problems with USB power.

    Bye.
    Jasen
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-