The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-06-2004, 07:45 PM   #1
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
Anyone interested in serial controlled Relay/Input card?

Im thinking of designing and making a Relay/Input card controlled by sending a command via the serial port. Im not gonna work on it yet but hopefuly when Im all done with the outstanding/overdue project Ill look deeply into it.

Anyway, Im thinking of something along this line :

The card support 8 relays, 5 digital inputs and 3 analog inputs.

The relays can be used to control electric windows, central locking, boot lock...etc.

The 6 digital inputs can be used to sense opened door, boot, ignition on, acc on...etc.

The 3 analog inputs can be used for sensing car battery voltage, temperature...etc.



Operating the relay is done by sending a command to the serial port :

$RELAY1,ON = this turn relay 1 on
$RELAY1,OFF = this turn relay 1 off
...the same goes for RELAY2 - RELAY8





The card also output the current state of each relays as well as the 8 inputs.
Example is as follows :

$RELAY1,OFF = {Relay 1 is currently off, boot is locked}
$RELAY2,ON = {Relay 2 is currently on, door is open}
.
.
.
$RELAY8,OFF
$INPUT1,HIGH = {Door is closed}
$INPUT2,HIGH = {Bonnet is closed}
.
.
.
$INPUT5,HIGH = {Driver seatbelt is on}
$INPUT6,201 = {Main battery voltage is 12.8V}
$INPUT7,192 = {Backup battery voltage is 12.0V}
$INPUT8,128 = {CarPC temperature is 40deg C}


The status of the cards is serialy outputed at lets say 9600,N,8,1 or higher. The update rate can be 1 per sec or more. Input 6-8 are the analog inputs, the measured analog values is represented by decimal values from 0-255. The PC can then decide what to do with these values.



Those are just some ideas I came up with. The controller is to be based on PIC MCU. If anyone is interested in the project please make a comment. Otherwise Ill just simplify the design just purely for my own need


Cheers

Last edited by Ricky327; 08-06-2004 at 11:18 PM.
Ricky327 is offline   Reply With Quote
Sponsored Links
Old 08-06-2004, 08:01 PM   #2
Maximum Bitrate
 
fantomas's Avatar
 
Join Date: Nov 2003
Location: CT
Vehicle: 02 WRX
Posts: 754
My Photos: (0)
what is your estimate for a price? would you do every single one completely by hand?
__________________
rebuilding carpc... kinda..
fantomas is offline   Reply With Quote
Old 08-06-2004, 08:10 PM   #3
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
what is your estimate for a price? would you do every single one completely by hand?

The controller shouldnt cost too much to make. Probably 15USD for all the parts or even much less. The relay can be expensive so Ill make that an add on...since not everyone need 8 relays. If only 4 relays is needed then just plug 4 relays in

Yup Ill start from scratch, the PCB deign and the electronics shouldnt be too hard to do...its coding the PIC that will take most of the time.


Im not trying to sell it, Ill publish the whole design when done. But someone has to do the windows software for it...cant do those stuff Maybe frodo will integrate it

I just thought no one has came up with this idea before.
Ricky327 is offline   Reply With Quote
Old 08-06-2004, 08:53 PM   #4
Raw Wave
 
god_of_cpu's Avatar
 
Join Date: Jan 2004
Location: SilverSpring Maryland
Vehicle: 2003/Infiniti/G35 Sport Coupe
Posts: 2,957
My Photos: (0)
Sounds fantastic! I can and would love to do the software for it too.

I could easily do a C dll plugin callable from any application.

Expect a PM.
__________________
StreetDeck.com Developer (I am Chuck)
Get StreetDeck at http://www.streetdeck.com
The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

Last edited by god_of_cpu; 08-06-2004 at 08:55 PM.
god_of_cpu is offline   Reply With Quote
Old 08-06-2004, 09:12 PM   #5
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
Sounds fantastic! I can and would love to do the software for it too.



I may simplify the outputs to binaries if that make the software easier to write...no need to filter out the $RELAY1...$INPUT1

So the output may look like this :

1st byte = Relay status
01010011 {1 = relay is on, 0 = relay is off}

2nd byte = Digital input status
XXX10110 {1 = input is high, 0 = input is low}

3rd byte = Hex value of analog Input 1
201 {decimal value of analog input 1}

4th byte = Hex value of analog Input 2
192 {decimal value of analog input 2}

5th byte = Hex value of analog Input 3
128 {decimal value of analog input 3}


From the above examples, the controller then outputs the HEX values into the PC as follow :

53
16
C9
C0
80



I was only planning to output the status of the card in ASCII so it can easily be viewed in hyperterminal. But either way I dont mind at which format its outputed at as long as theres an agreement which value represent what. The ASCII format may be better for readabilty...abit like the NMEA sentences in GPS receiver.

If you have any ideas then let me know...maybe more relay supports? more digital or analog inputs? I need to find out which is the best PIC MCU to use

Last edited by Ricky327; 08-06-2004 at 11:20 PM.
Ricky327 is offline   Reply With Quote
Old 08-06-2004, 09:50 PM   #6
 
kiltjim's Avatar
 
Join Date: Feb 2004
Location: PA, USA
Vehicle: 2000 Subaru Impreza Outback Sport
Posts: 805
My Photos: (0)
I was gonna try my hand at a similar project. I was thinking some sort of shift register setup that would take a stream from a serial output turn on the corresponding outputs. The outputs obviously linked to a whole bunch of relays. If I am right, the amount of relays would be only limited space and budget. The more relays needed, the longer the serial string, and the more clock pulses. I haven't yet figured out all the electronics yet, but I'm working on it.

As for the controller, I was going to use the Basic Stamp as my processor, since it handles serial output, and I have experience with programming it. Some sort of software on the computer, serial output to the stamp, then some programming on the stamp, serial output to the board of relays.
__________________
2000 Subaru OBS

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

I am Zero Bitrate....
kiltjim is offline   Reply With Quote
Old 08-06-2004, 10:10 PM   #7
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
Theres really no need for a shift register. I dont know much about what BASIC stamp are available but the one with the hardware UART the received byte can be directed to a register that control the relays...lets say eight relays.

Depend how much relay you want to control. If you are talking about 32 relays or more and dont have enough outputs on the MCU then you do need to decode the received bytes and switch that specific relay on/off as dictated by another bit.

Let say bit 7 is the relay control bit this turn the relay on/off depend if the value is 1 or 0. Bit 0-6 is the relay address to be controlled by bit 7.

So sending a command in HEX {represented in binaries} :

1000000 = turn relay 0 on
1000001 = turn relay 1 on
0000001 = turn relay 1 off
..and so on.

Of course you can control up to 128 relays which is probably overkill. You need to have 7 bit inputs decoded into 128 latchable lines to hold each relay states.

But then its up to you how you want to make up your own protocol/commands. But thats how I would do it if I need that much relays. Another things is probably better to make the design cascadable since some may only require 10 relays. In this case you may want to define an ID for each relay card. The PC will then need to send an ID saying which relay board it want to control before a command is sent. Only the board with the correct ID will respond to it


Good luck...let us know how the results goes

Last edited by Ricky327; 08-06-2004 at 10:27 PM.
Ricky327 is offline   Reply With Quote
Old 08-06-2004, 10:16 PM   #8
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
As for the controller, I was going to use the Basic Stamp as my processor, since it handles serial output,

It is also possible to use an MCU without a built in hardware UART. Theres alot of bit-banged software UART routine floating around the net. Ill rather use the one with a built in one to simplify the software...it can get a bit messy when trying to emulate hardware with software.
Ricky327 is offline   Reply With Quote
Old 08-06-2004, 10:48 PM   #9
Low Bitrate
 
Join Date: May 2004
Posts: 82
My Photos: (0)
what about use the parallel port? and also more analog inputs so i can eliminate my ODB II .
xtra is offline   Reply With Quote
Old 08-06-2004, 11:04 PM   #10
Raw Wave
 
Join Date: Jun 2003
Location: London UK
Vehicle: 1992 Ford XR2i
Posts: 1,818
My Photos: (0)
what about use the parallel port? and also more analog inputs so i can eliminate my ODB II

Because the parallel port uses too many pins and speed is not an issue here. Its far more compact/cheaper/efficient to use a PIC with built in com port...less pins, smaller connector, etc.

More analog inputs? yup thats possible. Some PIC do have like 16 ADC built in. But then I dont think using this card to get rid of the OBD2 interface is a good idea.

Its original function is just to control 8 or so relays, but then I though why not add some inputs from the spare I/O ports, then why not add analog inputs too.

The idea had already turned into something more than I original wanted. I think I have to stop there
Ricky327 is offline   Reply With Quote
Sponsored Links
Old 08-07-2004, 05:29 AM   #11
Maximum Bitrate
 
DjBac's Avatar
 
Join Date: Jun 2004
Location: GREECE/Athens
Vehicle: BMW Z4 3.0i SMG
Posts: 702
My Photos: (0)
I somenoe needs 12-15 outputs (A/C control) and more (for doors, windows etc) what can be done?? But the same amount of inputs!!!
DjBac is offline   Reply With Quote
Old 08-07-2004, 05:56 AM   #12
Low Bitrate
 
mscar's Avatar
 
Join Date: Oct 2003
Location: Portugal
Vehicle: Opel Corsa B 1.5 TD
Posts: 102
My Photos: (0)
I think this can help you guys

http://www.rentron.com/PICX6.htm

http://www.rs485.com/pav10r.html
__________________
:: MSCAR ::
.:: Multimedia System Car ::.

Last edited by mscar; 08-07-2004 at 05:59 AM.
mscar is offline   Reply With Quote
Old 08-07-2004, 08:39 AM   #13
Maximum Bitrate
 
Bravellir's Avatar
 
Join Date: Dec 2003
Location: Porto, Portugal
Vehicle: Mitsubishi Strakar
Posts: 741
My Photos: (0)
Quote: Originally Posted by Ricky327
Im thinking of designing and making a Relay/Input card controlled by sending a command via the serial port. Im not gonna work on it yet but hopefuly when Im all done with the outstanding/overdue project Ill look deeply into it.
...
Cheers

I'm very interested . I've been looking to the http://www.velleman.be/ kit VM110 .
__________________
Ikea Case. Epia M10000.M1-ATX. 512 Mb. 2,5" 80 GB HDD. 7" Lilliput. BU-303 GPS. Sony Joystick.
Status -->
Lilliput Installed (not indash yet..)
BraveCar 2.5
Bravellir is offline   Reply With Quote
Old 08-07-2004, 09:16 AM   #14
IQ < 70
 
Join Date: Mar 2004
Posts: 137
My Photos: (0)
you could also use it to control the remote lead for the antenna, use it to pop the trunk, etc. i like the idea, sign me up.
dim-8 is offline   Reply With Quote
Old 08-07-2004, 09:39 AM   #15
Newbie
 
Join Date: Jul 2004
Posts: 7
My Photos: (0)
If you need any help, I have done a bit with sending serial commands to PICs, 18 series and 16 series. It wouldnt really be that difficult. The code I just finished recieves about 15 different commands via RS232 using standard 9600,8,N. But I could easily do 57K or higher...
What chip do you plan on using? If you go with a PIC I would recommend a 16F88, 16F628 (no A/D), 18F1320 for a low pin count, or it you want a ton of IO you could go toward a 16F877, 18F452, 18F458. The last 2 will get expensive though, but then you can go real crazy and include SPI and CAN communication
I also have code worked out for temperature reading, thats no prob...

The circuitry should not be too difficult...

You could also get a UART USB bridge to make it psudo-usb...
ESLogix is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ewww sound card + video card on dual pci mini-itx reiser card = audio interference psyclobe Software & Software Development 7 01-23-2008 01:59 AM
anybody tv/fm card troubles marsjell Software & Software Development 1 09-01-2005 07:08 AM
Via Mini-ITX Epia 5000 serial port not working vash General Hardware Discussion 2 08-13-2002 08:48 PM
help - video card problems Cliff General Hardware Discussion 4 04-15-2002 05:25 PM
2 db-9 serial ports PCI and credit card remote moahdib Classified Archive 0 07-24-2001 11:41 PM


All times are GMT -5. The time now is 10:44 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics