Announcement

Collapse
No announcement yet.

Help please, USB relay board

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help please, USB relay board

    Hi guys, Im currently working on a project that includes operating solenoid valves by a computer. However, im completely lost and trying to put some concepts together. Those questions spin in my head right now:
    1) I heard Darlington transistor arrays can replace relays and minimize the circuit size. Would you recommend this approach instead of relays?
    2) What circuit elements are needed for a USB relay board?
    3) How do I write a simple program in VB that opens/closes up to 8 valves?
    Your help is very much appreciated. Cheers, Phil

  • #2
    Originally posted by phinder View Post
    1) I heard Darlington transistor arrays can replace relays and minimize the circuit size. Would you recommend this approach instead of relays?
    They can. A darlington array is just a transistor, fed into another transistor, and this is sometimes done quite a few times. I would not use it in place of a relay though because that would tie multiple controllable devices into one. I prefer independant systems because if something goes wrong it doesn't take everything with it. If one of your solenoids decides to short the system, everything else connected to it will die too, not just 1 relay. Cover your bases.

    Originally posted by phinder View Post
    2) What circuit elements are needed for a USB relay board?
    Lots

    Originally posted by phinder View Post
    3) How do I write a simple program in VB that opens/closes up to 8 valves?
    Your help is very much appreciated. Cheers, Phil
    You know how to write/interact with a dll?

    Originally posted by phinder View Post
    Hi guys, Im currently working on a project that includes operating solenoid valves by a computer. However, im completely lost and trying to put some concepts together. Those questions spin in my head right now:
    Check out the link in my sig. Soon it will be available, and will do everything you need. And if certain things such as writing a driver, or just designing the circuit are very complicated, then a prebuilt solution might be your best bet.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

    Comment


    • #3
      Thanks for your reply. As I told you, I want to try to build everything on my own. Right now I'm far away from achieving this goal, so I hope for some help from you guys. I never used a PIC before, so a tutorial how to get started would be extremely helpful. My current questions:
      How do I program a PIC and upload the firmware?
      How do I create the circuit schematic? (What is the PIC's output and how do I connect it to 8 relays?)
      What PIC is recommended for my needs (maybe 18F2550)?
      Since I want to program in VB, are there any program examples exisiting that illustrate how to control the PIC?
      Thanks for any help, Phil

      Comment


      • #4
        so basically, you're starting from scratch and have no knowledge whatsoever?

        i'd really suggest looking around the forums more, there are many different people who've built their own units

        honestly, if ur anything like me, the amount of parts you'll break just learning how to do this stuff, ur money would be better spent (and saved) on a product like 2k1 is gonna offer

        Comment


        • #5
          What kind of valves?

          ...
          Edit: if you're thinking of posting "solenoid" just know....I beat you to it.
          It's been a while...

          Comment


          • #6
            You can use low-side darlington drivers to drive a solenoid (after all, driving a solenoid is pretty much the same as driving a relay). Darlington transistors are two transistors stacked together to increase the gain (and the current sinking capacity).

            If you really really REALLY wanna do it yourself, you will have to learn PCB layout techniques and schematic entry. I use Eagle from cadsoft.de for my projects. The free version will allow you to create small PCBs and fabricate them with your vendor of choice.

            For fabrication, Advanced Circuits (www.4pcb.com) does a good job for small qty fab jobs.

            It doesn't take too many components. You could use an FTDI chip (www.ftdichip.com) in bit-bang mode to drive a ULN2003 or similar integrated circuit darlington array. This in turn could drive a bank of relays.

            And if that has your head swimming and you still have trouble finding the place to start, then you may just want to buy a finished product. Phidgets.com is fairly popular among readers here. They make a variety of USB controlled devices based on a Cypress USB chip. At the very least, you could get some ideas for your own project by looking at their website.

            Good luck with it!
            Mark Stubbs
            http://www.bibaja.com

            Comment


            • #7
              air valves yes?

              Comment


              • #8
                Yes, air valves. bibaja_llc, thanks, your post was the most helpful so far

                I thought about darlington resistor arrays before, since it would save me the bulky and expensive relays. The only downside is that the solenoids are not seperated from the circuit so if one malfunctions the entire circuit would be affected.

                I'm unsure wether to use the 18f2550 (which zac used for his project) or the FT245R. What are the advantages/disadvantages of each chip?
                I'm also afraid of the ft245r's tiny leads since I'm not very skilled when it comes to soldering. And do I need special hardware to program the PICs?

                Comment


                • #9
                  Originally posted by phinder View Post
                  Yes, air valves. bibaja_llc, thanks, your post was the most helpful so far

                  I thought about darlington resistor arrays before, since it would save me the bulky and expensive relays. The only downside is that the solenoids are not seperated from the circuit so if one malfunctions the entire circuit would be affected.

                  I'm unsure wether to use the 18f2550 (which zac used for his project) or the FT245R. What are the advantages/disadvantages of each chip?
                  I'm also afraid of the ft245r's tiny leads since I'm not very skilled when it comes to soldering. And do I need special hardware to program the PICs?
                  Advantage of FTDI, is that it makes a parallel port on a small chip. So all those projects out there that control things via the parallel port will work. And the software is already provided.

                  PIC must be programmed but can do more. You need a programmer for it.
                  Fusion Brain Version 6 Released!
                  1.9in x 2.9in -- 47mm x 73mm
                  30 Digital Outputs -- Directly drive a relay
                  15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
                  Buy now in the MP3Car.com Store

                  Comment


                  • #10
                    If you are worried about the darlington transistor array failing and the lack of isolation, you could implement an isolation barrier using 4N35 photo transistors. You could either couple the output of the 4N35 to a 3055 NPN transistor to make an isolated darlington low-side darlington driver, or couple to a P-channel mosfet to make an isolated high-side fet driver.

                    Of course as you continue to add parts, you may find it to be simplest to just use relays.

                    I'm with 2k1 on the FTDI parts, in part because I use them for most of my products. I don't use the PIC part because I do not wish to develop my own driver or spend a lot of time developing custom code inside the PIC. I like being able to attach the hardware to the FTDI chip and write the code on the PC side in Linux or Windows and be up and running.

                    The advantage to using a PIC or other USB microcontroller is that you can embed more smarts and logic. It doesn't sound like you need it, though. Sounds like you will be turning things off and on under PC program control.

                    DLP designs makes a convenient DIP module that has the FT245 parts mounted. If you are doing a one-of design, then perhaps purchasing one of these modules would be easy for you. That way you won't need a sharp soldering iron or a microscope for assembly.

                    http://www.dlpdesign.com/um245r-v101.pdf

                    Bibaja is a hardware design company. We could develop a USB to isolated 8-channel high side 10amp output driver if there's sufficient demand for it. Best estimate we could produce and sell it for about $119 each with an enclosure and 10 position barrier strip screw terminal connections.

                    Best regards,
                    Mark Stubbs
                    http://www.bibaja.com

                    Comment


                    • #11
                      Thanks bibaja_llc, I appreciate your help. So I guess I'll use UM245R dip module, but how do I connect the RX/TX pins to the 8 input pins of the ULN2003?

                      Comment


                      • #12
                        Originally posted by phinder View Post
                        how do I connect the RX/TX pins to the 8 input pins of the ULN2003?
                        To get 8 channels, you will want to use a ULN2803. You must check the device specifications to be certain this device supports the maximum current you require. According to the ULN2803 datasheet (available on digikey.com), all 8 outputs active can sustain 150ma per output at 70C ambient temperature. If you only have 2 outputs active at a time, then you can sustain 400ma per output.

                        If you use bit-bang mode in the FT245, you can wire DB7-DB0 directly to the IN8-IN1 pins of the ULN2803 driver chip.

                        If you hook up an external microcontroller to the FT245, you can do even more (more channels, more features). You would use the FT245 as if it were a serial port and transfer data in/out using the FIFO control signals. Read through the FT245 datasheet to see how the FIFO control signals work and for some simple examples of interfacing to a microcontroller. This will require you to write some code in the microcontroller to fetch data from the FIFO and write it to the outputs connected to the ULN2803 driver. This also gives you the ability to add some inputs on your microcontroller and push the data back up to your application running on the PC.

                        Thanks,
                        Mark Stubbs
                        http://www.bibaja.com

                        Comment


                        • #13
                          New IOPoint-USB Device

                          Based on Phinder's request, I've created a USB controlled device with 16 outputs.

                          The outputs are isolated from the USB side to protect against ground loops and voltage transients on the car's 12V power that could damage the computer or cause it to reset.

                          Each output is capable of driving around 9 amps at 12V. This means without a relay, you will be able to drive solenoid valves, fog lamps and other lamps, accent lighting and LEDs, DC motors, and more.

                          Output connections are made using quick disconnect terminals. These high quality terminals are very sturdy and provide a convenient and secure connection when installing in the car environment. Quick disconnect terminals also allow you to remove the device fairly easily if you need to pull it out of the car and do some experimenting in your workshop.

                          For really heavy loads, you can always add a relay or a contactor to drive the load. This will be necessary if you want to use the IOPoint-USB in your home to drive 120VAC devices, for example.

                          I have a limited quantity available for order now (2 to be precise), and 20 more bare PCBs I can build up if there is enough interest. We're offering the PCB's assembled for $129.95 each. Here's a photo of a unit:



                          You can place an order for one of the 2 units available now at my website:

                          http://www.bibaja.com/

                          If we run out and you are interested, please PM me to let me know so I can gauge the interest in the product and order enough parts to build them for everybody. I plan to build up the units in about 2-3 weeks from now after I get an idea for how many people will buy them.

                          Also, if there is enough interest, we will make an enclosure for the product. I found an enclosure that is a good fit for the product. I purchased one enclosure and milled it out by hand to fit the completed PCB. Here's an image:



                          The production enclosures will look almost identical to this model.

                          Please PM me if you will be interested in buying a case too. I will need at least 20 people interested to make the cases worthwhile. Our asking price for the case will be $20 each. That's essentially what it will cost us to order the cases machined and labeled.

                          Visual Basic, TCL, and C examples are available on the product's web page. The product is supported on Windows and Linux at the moment. The product uses the FTD2XX driver, so anyone using a Mac should be able to download the driver from FTDI's website and follow the user's guide for the IOPoint-USB to make the device work on the Mac too. I'll glady post your example code if you'd like to contribute it.

                          http://www.bibaja.com/products?page=iopoint_usb

                          Please let me know if you have any questions or suggestions!! (Apart from the suggestion that I should post this in a new thread, which I will do later this week after the first few responses here.) :-)

                          Thanks!
                          Mark Stubbs
                          http://www.bibaja.com

                          Comment


                          • #14
                            USB controlled relay

                            Just in-case, this is what your looking for:

                            "Super4" USB Relay module:

                            4 X 5 amp relays.
                            USB powered.

                            www.tctec.net

                            Comment

                            Working...
                            X