The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-02-2005, 03:32 PM   #1
 
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 Files
File Type: zip PCB.zip (12.8 KB, 175 views)
__________________
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
Advertisement
 
Advertisement
Sponsored links

Old 04-02-2005, 04:19 PM   #2
Raw Wave
 
Join Date: May 2003
Posts: 2,021
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.
Chris31 is offline   Reply With Quote
Old 04-02-2005, 04:22 PM   #3
 
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....
kiltjim is offline   Reply With Quote
Old 04-02-2005, 04:29 PM   #4
Raw Wave
 
Join Date: May 2003
Posts: 2,021
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.
Chris31 is offline   Reply With Quote
Old 04-02-2005, 05:51 PM   #5
Constant Bitrate
 
Saab9-5's Avatar
 
Join Date: Mar 2005
Location: Ponta Delgada, Azores
Posts: 222
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).
Saab9-5 is offline   Reply With Quote
Old 04-02-2005, 06:22 PM   #6
Raw Wave
 
Join Date: May 2003
Posts: 2,021
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
Chris31 is offline   Reply With Quote
Old 04-02-2005, 06:23 PM   #7
My Village Called
 
0l33l's Avatar
 
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 10,763
How easy would something like this be to program (control)?
__________________
PowerVoice v1 | NaviVoice Source
GammaControl v2.4
SKINbedder v3

1995 Lexus SC300 <-- Weekend Car
1997 Mazda Miata <-- Daily Driver
0l33l is offline   Reply With Quote
Old 04-02-2005, 06:37 PM   #8
 
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....
kiltjim is offline   Reply With Quote
Old 04-02-2005, 06:41 PM   #9
Constant Bitrate
 
Saab9-5's Avatar
 
Join Date: Mar 2005
Location: Ponta Delgada, Azores
Posts: 222
Sorry Chris31, didn't mean to misunderstand you.
Saab9-5 is offline   Reply With Quote
Old 04-02-2005, 06:45 PM   #10
My Village Called
 
0l33l's Avatar
 
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 10,763
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?
__________________
PowerVoice v1 | NaviVoice Source
GammaControl v2.4
SKINbedder v3

1995 Lexus SC300 <-- Weekend Car
1997 Mazda Miata <-- Daily Driver
0l33l is offline   Reply With Quote
Old 04-02-2005, 06:47 PM   #11
 
kiltjim's Avatar
 
Join Date: Feb 2004
Location: PA, USA
Posts: 805
Same way you would get a digital input, but its going to return a HEX value.
__________________
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 04-02-2005, 06:55 PM   #12
Constant Bitrate
 
Saab9-5's Avatar
 
Join Date: Mar 2005
Location: Ponta Delgada, Azores
Posts: 222
Quote: Originally Posted by Chris31
Nothing wrong with the old USB PIC, just damn difficult to develop something for it, its OTP

True. The new ones with flash memory are much easier - and cheaper - for experimenting. I've got a couple of samples on the way to me so I can start working with them. I love the idea that they can attach as serial ports without any drivers for the OS. I'll post up progress after they've arrived.

Quote: Originally Posted by kiltjim
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?

Sorry I can't help you, I work in PicBasicPro and not assembly.
Saab9-5 is offline   Reply With Quote
Old 04-02-2005, 07:04 PM   #13
Raw Wave
 
Join Date: May 2003
Posts: 2,021
@ SAAB, no problemo man


@ KILT, converting the 16F code into 18F code need alot of reprogramming. They have a different structure. The 18F chip can be programmed in C if you like. But converting the 3 PIC code to fit in a 18F chip? That is as good as making a new code for it.
Chris31 is offline   Reply With Quote
Old 04-02-2005, 07:08 PM   #14
Raw Wave
 
Join Date: May 2003
Posts: 2,021
Quote: Originally Posted by Saab9-5
True. The new ones with flash memory are much easier - and cheaper - for experimenting. I've got a couple of samples on the way to me so I can start working with them. I love the idea that they can attach as serial ports without any drivers for the OS. I'll post up progress after they've arrived.

I got my 2550 sample but still waiting for the rest. Its been 3 weeks now I think.

Ill try to start on mine soon. Got to make a test board for it first.
Chris31 is offline   Reply With Quote
Old 04-02-2005, 07:47 PM   #15
Raw Wave
 
Join Date: May 2003
Posts: 2,021
@KILT you want advice on PCB design?

1) Ill make that board single sided if I were you.
2) Place a decoupling capacitor on each PIC as close as possible to its supply pins, normally a 0.1uF will do.
3) You need 2 capacitors for the crystal on each legs then connected to the ground.
4) Make all the supply lines much thicker, specially the grounds.

Thats it for now.
Chris31 is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
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 On
Pingbacks are Off
Refbacks are Off

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


All times are GMT -5. The time now is 06:00 AM.


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