Page 1 of 4 1234 LastLast
Results 1 to 10 of 40

Thread: PICNET usb -> relay controller

  1. #1
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805

    PICNET usb -> relay controller

    The other thread is getting long, and includes a whole bunch of cards, so I thought I would post this seperately.

    As a suggestion by lez I looked into this:
    PICNET

    And really liked the design. You can expand it upto 99 seperate boards of:
    4 digital outputs
    3 digital inputs
    4 analog inputs.

    This seems like an incredible option for our car needs. So, I tried to bump out a PCB design to see if I could make one myself. My goal was to have at least 8 relays on a card, so I need 2 seperate modules (16c711). I combined it onto 1 card, with a single darlington array (ULN2803A).

    Now, this is not my first PCB design, but I could use some suggestions on improving it. I made it in ExpressPCB (it's free)

    All said and done, it's gonna cost me about $20, if I can make the PCBs myself.
    Attached Images Attached Images  
    Attached Files Attached Files
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    3 PICs to achieve just that? I think Ill give that a pass

    The idea of being able to connect boards together is good but how much do you really need? Bear in mind you do need to add some protection on the inputs side.

  3. #3
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805
    Well, the way I look at it it's only 1 PIC to go from USB to the other modules, then 1 PIC per module. The card is 3 pics total, but the expandable part really has me.

    What type of protection, like capactiors or something else?
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    You will need to bring down the 12V car battery to TTL level so you dont blow up the PIC, its input can only take upto 5V. The same for the analog measurement you need to scale the 12V down to 5V. This is done by using a voltage divider, add a 5.1V zener diode so no matter what the PIC will not see more than 5.1V. You can also add a capacitor on each inputs just to clean up some dirt.

  5. #5
    Variable Bitrate Saab9-5's Avatar
    Join Date
    Mar 2005
    Location
    Ponta Delgada, Azores
    Posts
    239
    Chris31 - He's powering the unit from the USB port so its already at 5volts. But you're right about the analog inputs - he definitely needs a voltage divider for each of those inputs.

    Kiltjim - Why not move the project up to a PIC18F4455 or PIC18F4550? You could reduce the chip count from three to one as it has enough analog/digital inputs and digital outputs. And you'll be able to support USB 2.0, nanoWatt low power and act as a serial port-based device without the need for an ActiveX control (Microchip AppNote 00956B).

  6. #6
    Registered User
    Join Date
    May 2003
    Posts
    1,736
    No I didnt meant the 12V supply going down to 5V supply for the PIC.

    Sensing an ON/OFF state of a car electric usually means 12V/0V. What I meant was bringing this 12V down to 5V level. Im assuming hes detecting maybe a reverse light? hand brake on?

    There might be a time where a permanent supply to the relay card would be a good idea.

    As for the news USB PIC, yes everybody is jumping into that one but unfortunately theres hardly much about it at this time.

    Nothing wrong with the old USB PIC, just damn difficult to develop something for it, its OTP

  7. #7
    My Village Called 0l33l's Avatar
    Join Date
    Jul 2004
    Location
    Berkeley, CA
    Posts
    10,516
    How easy would something like this be to program (control)?

  8. #8
    Maximum Bitrate kiltjim's Avatar
    Join Date
    Feb 2004
    Location
    PA, USA
    Posts
    805
    I didn't develop this board. I only tried to make a PCB design for it, so that I could build one. I just used the design off of the picnet site that I listed above. I would love to convert it down to 1 PIC that is USB 2.0 compatible. But I don't know assembly language.

    As for the filtering, Chris31 is right. On the analog inputs, I had already known that I would need a voltage divider, but hadn't thought about the zener. As for the digital inputs I knew I would need to bring the voltage levels down, but hadn't really thought about it much, since I don't really need them at this point.

    0l33l, to control the thing, check out the picnet site, they list the commands that work with their programming. You would basically send out a command to turn on or off a pin at an address. You could even do it over hyperterminal, but where's the fun in that?

    Does anybody know if you could convert the older chip over to a newer one, and not have to change the asm file? And if you need to change it, would someone like to show me how?
    2000 Subaru OBS

    Dell P3 @ 900 Mhz
    7" Lilliput TS w/DigitalWW in-dash mount
    80GB External HD

    I am Zero Bitrate....

  9. #9
    Variable Bitrate Saab9-5's Avatar
    Join Date
    Mar 2005
    Location
    Ponta Delgada, Azores
    Posts
    239
    Sorry Chris31, didn't mean to misunderstand you.

  10. #10
    My Village Called 0l33l's Avatar
    Join Date
    Jul 2004
    Location
    Berkeley, CA
    Posts
    10,516
    Quote Originally Posted by kiltjim
    0l33l, to control the thing, check out the picnet site, they list the commands that work with their programming. You would basically send out a command to turn on or off a pin at an address. You could even do it over hyperterminal, but where's the fun in that?
    Weird. So, how would you get the state of the analog inputs?

Page 1 of 4 1234 LastLast

Similar Threads

  1. USB -> Parallel -> HD44780 LCD
    By Zip-Lock in forum General Hardware Discussion
    Replies: 5
    Last Post: 03-09-2005, 06:31 AM
  2. Will someone help me program my relay control module
    By cproaudio in forum Software & Software Development
    Replies: 6
    Last Post: 09-04-2002, 05:50 AM
  3. WTB: Intellitouch USB or Serial Controller
    By tbdombrosky in forum Classified Archive
    Replies: 0
    Last Post: 06-28-2002, 07:41 PM
  4. Switching USB connection On/Off with relay
    By Destin in forum General Hardware Discussion
    Replies: 8
    Last Post: 09-09-2001, 05:31 AM
  5. USB LCD Controller
    By smashr2k in forum General Hardware Discussion
    Replies: 3
    Last Post: 07-19-2001, 05:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •