Announcement

Collapse
No announcement yet.

National Instruments DIO 24 Digital IO card to utilize steering wheel control

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

  • National Instruments DIO 24 Digital IO card to utilize steering wheel control

    Hello,

    Sorry for a long winded post, but since this is THE "hardware development" sub forum, I thought I'd better explain where I am coming from...

    A while ago, I wrote a very simple Visual Basic application that utilizes National Instruments PC-DIO-24 digital IO card. I am not an expert in VB, but the task was simple enough so I was able to write the program.

    Anyway, this is the card.

    http://sine.ni.com/nips/cds/view/p/lang/en/nid/14329



    I bought a used ISA version for $20. Before you bash me with the ISA, there are PCI and USB version of the same card. My question is more fundamental than choice of the bus.

    My VB software basically worked as a switch panel interface. It was for an industrial machine control. The operator panel has 20 or so buttons, and I had to "Map" those buttons to the control "Buttons" in the VB application.

    While planning for a CarPC, I thought, if I re-route wires from Steering Wheel buttons, Headlight switches, Reverse gear line, etc etc, then I can "MAP" the control to the front end. Then I will be able to control Volume, FF/REW, Audio Mode, RearView Camera, Night Dimming etc.. I can probably add a toggle switch or momentary switch as a Mute button or curser control keys... options are endless......What a great idea.... so I thought.

    Then..... this PC-DIO-24 has 24 channels of I/O... i.e., It outputs too.... I can configure it to have 16 inputs and 8 outputs... If some how I can get this card to trigger a 12V relay, I can control car's functions like sunroof, window, HVAC, Remote turn on of the Amplifier to prevent thump, interior lights, etc etc....

    Ok. So that was long winded introduction. Here's the real questions.

    According to the spec sheet, this card can output 5 Volts @ 2.5mA. Basically a state "LOW" is 0V, state "HIGH" is 4~5 Volts, and it can deliver 2.5mA.

    So here's my question to you Electronic Gurus.

    1. I don't think there is a mechanical relay that can be pulled reliably with this kind of power. Correct?

    2. If my assumption #1 is correct, then I'll have to drive a smaller relay (which trigerrs with ~3mA) to trigger a bigger relay (that can carry [email protected]). Correct?

    3. Then what "small" relay should I use? Solid State relay? Opto-Relay? What relay can I safely use here? I understand I might have to have a 5V power rails... but I can take that from the PC's PSU.

    Appreciated already....

  • #2
    A switching transistor should work... they draw very little power from the base (I think that's called leakage current), and can output more than enough to pull a relay. You'll need one transistor per relay, and you might need some resistors in there somewhere for good measure.

    Comment


    • #3
      where did you get that card SOOOOOO cheap?

      Comment


      • #4
        For a Solid State Relay, How about this
        http://www.bgmicro.com/prodinfo.asp?...ri=REL&stype=2

        If these would work, then I can get a small breadboard PCB, rig these up in line with screw terminals, and I'll be set...

        I thought about how I can fill up 24 channels of Digital controls with CarPC... whoa, the options are endless.

        So far, I can do with Inputs.

        1. Steering Wheel Audio Control (5 channels - mode, Vol Up/Dn, FF/REW)
        2. Reverse Gear detection (so front end switches to Rear View camera)
        3. Headlight detection (so front end dims)
        4. Interior Lighting (I have few blue LED to light up under dash)
        5. Cursor Key type keypad + enter key (5 ch)
        6. Mute switch
        7. "Talk" switch for voice command
        8. Rear Audio Control (V up/down, FF/REW)

        That's only 19 channels...

        And Outputs

        1. Remote Turn-On of amplifier to prevent thumping. (computer on first, then amp turns on)
        2. Power Antenna
        3. Four Windows + Sunroof (Button on Front end "Ventilate")

        That should fill it up .... he he.

        I bought this card from a local electronics surplus store. There are few on Ebay as well. Because it's ISA board, there are a lot of these floating around. My CarPC is P3 800mhz and the MB has ISA slot.

        Comment


        • #5
          Here is how to drive one relay from an output.
          Attached Files
          ~Jimmy

          Comment


          • #6
            Originally posted by jasonsjwou View Post
            For a Solid State Relay, How about this
            http://www.bgmicro.com/prodinfo.asp?...ri=REL&stype=2

            If these would work....
            NO. Those work with 24VAC and up for the load. Not what you want for in the car. There are similar SSR's that work with low DC Volts though.
            ~Jimmy

            Comment


            • #7
              Thanks... so you just need to "Sink" the current from the resistor side (base?) to the ground (drain?) with the PC DIO logic output. Right? Then it "opens" the gate from the main power source, activating the relay coil..... Got it.

              I wonder what values the R needs to be... to keep the current from exploding... (correct??) gosh my electrical engineering knowledge is really rusty... got to go dig up that textbook....

              Comment


              • #8
                Damn, those SSR's that can work with ~12VDC are expensive (Found a few from DigiKey... They are like $10 per piece)... I think I might just build that circuit myself....

                Comment


                • #9
                  I would try a 4.7K ohm resistor and a 2N3904 transistor or any similar general purpose NPN. Don't leave the diode out. If you try without it, the circuit will turn on once just fine. Then when you turn off, zap goes the transistor and it will never work again.
                  ~Jimmy

                  Comment


                  • #10
                    Can I use 1N4004 (?) diode? I got dozens of these lying around. About 10 years ago, I was into building DIY HIFI amplifiers... Don't remember too much anymore, but I DO REMEMBER what it means to "PLUG and PREY".

                    Oh BTW Can I use LED here? no wait that wouldn't work. LED will never turn on... Right?

                    Comment


                    • #11
                      Originally posted by jasonsjwou View Post
                      Can I use 1N4004 (?) diode? I got dozens of these lying around. About 10 years ago, I was into building DIY HIFI amplifiers... Don't remember too much anymore, but I DO REMEMBER what it means to "PLUG and PREY".

                      Oh BTW Can I use LED here? no wait that wouldn't work. LED will never turn on... Right?
                      1N4004 is fine. Don't use an LED. The diode is to clamp the induced voltage caused by turning off the relay. An LED probably wouldn't survive the surge. Then the transistor would get taken out too.

                      Are you using the standard NI drivers with this? How does your software read/write to the card?
                      ~Jimmy

                      Comment


                      • #12
                        I used the NIDAQ legacy driver before. All you have to do is include the library file in the VB project setup, and you can call the DIO card specific functions.

                        First, on the InitDiag routine, I setup Inputs and Outputs. What channels are used as inputs and outputs.

                        Then I used a OnTimer to periodically monitor any activity on the input channels. There is a NIDAQ function that periodically returns an array (Index is CH number) with 0's and 1's. I call this timer every 20ms or so, so the response appears to be instantaneous. If none of the channels are being triggered, this array contains something like

                        0000000000000000000.

                        IF the array is

                        0001000111000000000

                        Then CH4,8,9,10 are trigerred. Then there is 20 or so IF-THEN statements that calls some other function that does something else.

                        On Output side, there is a function that's like CHANNEL(CH,STATUS).... if I call CHANNEL(21,1) then it turns on the channel 21.

                        It's pretty simple. I am not a computer programmer, and it took me a day to write a complete application. Jimmy you sound like you are an electrical engineer, it'll take less than 2 hours for you to figure it out.

                        Thanks for the circuit info. Really appreciate it.








                        There is one MAJOR problem though. The ISA version's driver does not support WinXP. It works with NT, 2000 and below, but not with WinXP.

                        Comment


                        • #13
                          Thanks, Jason. I have one of those cards in my drawer. I just may have to see what I can do with it.
                          ~Jimmy

                          Comment


                          • #14
                            so?

                            Comment


                            • #15
                              How is this project going? Also could that circuit that you guys posted work with other usb controller boards too? Such as the IO-Warrior and Phidgets?

                              Comment

                              Working...
                              X