Page 2 of 9 FirstFirst 123456789 LastLast
Results 11 to 20 of 85

Thread: Simply serial input circuit

  1. #11
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    The software above will work but the radio button display will be wrong if you try to use two inputs at the same time. Sorry I just threw this together real quick to show how the circuit works.

  2. #12
    Constant Bitrate weekendowel's Avatar
    Join Date
    Jan 2004
    Location
    Stockholm, Sweden
    Posts
    209
    I have written a shutdown controller based on shorting pin 4 with 8 on the serial port, have a look here:

    New shutdown controller - software

  3. #13
    Variable Bitrate Supermike's Avatar
    Join Date
    May 2004
    Location
    AZ
    Posts
    294
    FetLyd, were you thinking more of something that will display the reverse camera without going thru the computer? If so there is a way shown in the following thread, however it requires the purchase of another $70+ gadget to get it working. I am hoping somebody will find a way to switch the Lilliput from VGA to Video1 and back using a relay, so I could just have the backup cam come on whenever I am backing up - even with the computer off.

    Displaying reverse camera on a carputer?

  4. #14
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Quote Originally Posted by weekendowel
    I have written a shutdown controller based on shorting pin 4 with 8 on the serial port, have a look here:

    New shutdown controller - software
    OK, I wasn't thinking of a shutdown controller when I posted this but none-the-less the two solutions are pretty much the same.

    The only difference is that your circuit floats the input pin (CTS pin 8) when the relay is open. I mentioned that such an approach is possible above. Still, I think the input values are undefined when the input voltage is between -3V and +3V. I guess it's possible the inputs have pull-up or pull-down resistors installed to force them to a valid value when floating. If not, then it's possible that CTS could read either high or low while floating. Obviously a resistor could be installed to force the pull-up/down if needed.

    The circuit here uses a DT relay so that the input line always gets a valid value.

    In any case, the software above should work with either circuit. Hopefully a future version of FP will support this mechanism to allow enable/disable of video playback and applications while the car is in motion (required in CA).

  5. #15
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Quote Originally Posted by rando
    I've been hoping to get a feature added to Frodo to allow it to be used legally in California. Basically I need to implement an automatic mechanism to disable certain features (video playback, applications, etc) when the vehicle is being driven.

    Here is a simple serial port based circuit that will allow you to interface with your brake lights, ebrake switch, gear position switch or whatever you want. It only uses a single SPDT relay. Software must initialize the circuit by setting DTR high and RTS low (unless you want to use the +/-12v or +/-5v rails from your PSU). It can then read the on/off status of the relay over the DSR line. If you want the logic to work in the opposite direction, you can simply set DTR low and RTS high.

    DTR---SWNO
    RTS---SWNC
    DSR---SWPole
    Input --- Coil ---- GND or Input --- Coil --- +V depending on what you're interfacing with.

    I've tested this with a simple vb.net program and it works great. Hopefully one of the major front ends will adopt support for it (or something similar) in a future release.

    BTW, if you need more inputs (upto 4), you can add more relays. The SWPole lines can be hooked up to CD,CTS, and RI also.



    So, for testing purposes, say I get a SPDT switch.
    I hook it up like the diagram below.
    I set DTR Low
    I set RTS High

    Then I can read the status of the switch by checking the state of the pole line ? Right ?
    Attached Images Attached Images  
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  6. #16
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    @Frodo: Yes, assuming you hook the pole up to one of your serial input lines.

  7. #17
    MySQL Error MatrixPC's Avatar
    Join Date
    Sep 2003
    Location
    Beach City, Socal
    Posts
    4,053
    Rando, I don't have VB.NET so I can't see what the code is. However I wrote a test one on VB6 to see how it work compare to your exe one. Now I need a serial cable so that I can use the "paper clip" switch to check the port. Maybe base on this I can code some thing like software shutdown controller as well. Now I don't really feel comfortable driving with the screen on and the cops is on the next lane.
    2004 Matrix XR A7N8X-VM/400 AMD XP-M 2500+, DS-ATX
    89 Supra Turbo P3 600E@750/Abit BE6 II, Alpine M-BUS Car2PC.
    Y2K Accord Dell GX150
    RoadRunner is the best FE PERIOD
    EmoRebellion is a SCAMMER

  8. #18
    Constant Bitrate
    Join Date
    Jun 2004
    Posts
    131
    Quote Originally Posted by Supermike
    FetLyd, were you thinking more of something that will display the reverse camera without going thru the computer? If so there is a way shown in the following thread, however it requires the purchase of another $70+ gadget to get it working. I am hoping somebody will find a way to switch the Lilliput from VGA to Video1 and back using a relay, so I could just have the backup cam come on whenever I am backing up - even with the computer off.

    Displaying reverse camera on a carputer?
    No, just a simple usb webcam.. But however, i just cannot figure how to wire this damn thing.. And yes, I'm slow with these things..

  9. #19
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Quote Originally Posted by MatrixPC
    Rando, I don't have VB.NET so I can't see what the code is. However I wrote a test one on VB6 to see how it work compare to your exe one. Now I need a serial cable so that I can use the "paper clip" switch to check the port. Maybe base on this I can code some thing like software shutdown controller as well. Now I don't really feel comfortable driving with the screen on and the cops is on the next lane.
    You don't need VB.NET to read the source files. They are ASCII files and can be read with the text editor of your choice. There isn't much relatioship between this source and what you'd do in VB6. In VB6, the easiest thing to do is use the MSCOMM control. Just open the port, set the output lines, and enable events. When an event comes in, just check the status line values. Shouldn't be more than 10-20 lines of code.

    For a shutdown controller, you might just use the built-in UPS service in XP. It can be configured to simply monitor the serial status lines for low/high values. You'll have to figure out which lines it monitors for which things. I believe (but am just guessing) that it's CTS (battery low), CD(UPS on/off), and RI(Line / Battery). I could (and probably am) wrong about that.

  10. #20
    Raw Wave rando's Avatar
    Join Date
    Mar 2004
    Location
    Redondo Beach, CA
    Posts
    1,973
    Here is a nicer schematic for those of you who like clean pictures.
    Attached Images Attached Images  

Similar Threads

  1. Battery based tank circuit (tested)
    By Ricky327 in forum Power Supplies
    Replies: 241
    Last Post: 02-13-2008, 04:43 PM
  2. Replies: 97
    Last Post: 09-18-2006, 01:56 PM
  3. Bad Serial Ports on EPIA M9000
    By wi77iam in forum General Hardware Discussion
    Replies: 6
    Last Post: 05-06-2004, 11:49 AM
  4. Girder vs MSComm, different input through serial, why?
    By InFix in forum Software & Software Development
    Replies: 6
    Last Post: 10-22-2002, 08:49 PM
  5. Via Mini-ITX Epia 5000 serial port not working
    By vash in forum General Hardware Discussion
    Replies: 2
    Last Post: 08-13-2002, 08:48 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
  •