Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Hardware Development


Reply
 
Share Thread Tools Display Modes
Old 07-26-2007, 01:35 PM   #1
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
New Open Source Valentine One USB Adapter Design

Today I finished designing a custom Valentine One to USB adapter. My design only vaguely resembles the V1 Virtual Display at http://v1vd.blogspot.com/. Unlike that design, I plan on using a USB Atmel AVR microcontroller to capture the concealed display signals using the input capture/interrupt units on that chip (i.e. no RS-232 hackery). And also add a couple new somewhat minor features. Cost-wise, the parts are inexpensive - the most expensive part is the microcontroller, which is only $4. Total parts should be no more than $15. The biggest expense will likely be the PCB; however that can be mitigated if people choose to pool and order a batch of them. If there is sufficient interest, I would like to publish all design files and source code so people can make their own after I get this one built and tested (hopefully within the next week or two - I need to mill a board and get the parts).

The motivation for this project is that I could find no existing open source USB adapter for the Valentine One.

Feature list I am looking at:
  • Detection and interpretation of concealed display signal on the microcontroller, closely based on the true V1 CD waveform. Data packets sent to PC will already have everything sorted out.
  • Ability to mute the V1. ("Mute" button on the real CD).
  • Ability to enable/disable the concealed display through USB. When it is disabled, the V1 will display outputs on its internal display. When enabled, the V1 will no longer output to its internal display, and simply output to the USB adapter. Default value on power-up (before the device connects to USB) can be programmed into an EEPROM.
  • Ability to switch the Valentine One on/off through USB. Default value for this can also be programmed into EEPROM. To accomplish this, the unit will be wired exactly like a remote audio adapter (there will be power in/power out ports). Refer to the V1 documentation for how this will be done. The wiring diagrams are exactly the same.
  • Full compatibility with both the remote audio adapter and the real concealed display. A full setup could potentially have the USB adapter, and these two accessories from Valentine.
  • Powered off the car's 12V supply. To avoid reenumeration during crank, you should ideally wire it (along with Valentine One) to a 12V supply that stays connected to the battery while cranking. This isn't required but it would mean that it always stays connected to the PC.
  • Custom-profile HID device, so absolutely no drivers need to be loaded. Just plug and play - Windows comes with what you need. (i.e. not emulating a COM port)
  • A .NET DLL and/or C++ DLL to interact with the generic HID device in a nice object-oriented fashion (the Windows HID APIs can be unpleasant). Basically it would return a structure with whatever LEDs are supposed to be lit. The community can then integrate this into whatever front-end they like!
  • 90% surface mount design. Only through-hole components will be the telephone jacks and a programming pin header. (Probably not a good project if first time soldering, but if you've soldered a couple boards before, review the tutorials and videos at sparkfun.com to learn good SMT soldering technique). This will result in a small board footprint - maybe 1.5" by 2.5" size.


I'm interested in comments/suggestions. If the community is happy with the existing V1 adapters being sold then I probably won't go to the effort to publish the design and source code. Otherwise I'm willing to publish the design. I don't think I'm quite up for actually assembling and shipping the board itself (beyond perhaps an initial batch) - I have limited amounts of time; however it should be easy to assemble in a couple hours. I think the community would benefit more from an open design.
PredatorCoder is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 07-26-2007, 01:54 PM   #2
Constant Bitrate
 
VmtSquad's Avatar
 
Join Date: May 2007
Location: Montréal, Quebec, Canada
Posts: 191
VmtSquad is an unknown quantity at this point
Would be interested !!!! By the time you'll be finishing this, I would be able to test it in my car!!!

Keep us updated, or PM me if I can help!

What language you'll use C++?

It's a big idea, don't drop this!
__________________
VmtSquad - I sold my soul to Honda!
Final Install
CarPC progress: 95%
VmtSquad is offline   Reply With Quote
Old 07-26-2007, 04:23 PM   #3
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
Preliminary Schematic

Here's the preliminary schematic for all to observe...

I finished the board design; it is 1.85" long by 1.5" wide. The silkscreen layer needs some work but other than that I think the board is ready to go.

Both images are in the attached ZIP file. This forum software wouldn't let me directly post the GIF files (the schematic is too big apparently...? 800x600 resolution is not adequate...).

I also attached the Valentine One concealed display protocol. It describes how to electrically connect to the V1 and also how to capture the waveform. I found it buried in some 5 page thread or something on this site and I forgot exactly where that was. It's small enough so I'm reproducing it here.

Right now I'm away in Virginia but when I get back to campus in a few days I'll try building the device. At that point once it is functional I can clean things up a bit and publish the source code.
Attached Images
File Type: pdf V1 Protocol.pdf (30.9 KB, 740 views)
Attached Files
File Type: zip Preliminary Valentine One USB.zip (57.2 KB, 313 views)
PredatorCoder is offline   Reply With Quote
Old 07-27-2007, 12:06 AM   #4
Constant Bitrate
 
Road_Dog's Avatar
 
Join Date: Nov 2006
Location: USA, Oregon
Posts: 118
Road_Dog is an unknown quantity at this point
I would be interested in it AS-IS.

My car has a 12 volt source for the rear-view mirror and therefore a Bluetooth solution to send the decoded data stream to my car pc would be a perfect match. I have been playing with SparKFun's (highly recommended site) Bluetooth serial setup http://www.sparkfun.com/commerce/pro...roducts_id=617 for another project of mine. It is a remote LCD display.


Road Dog

Last edited by Road_Dog; 07-27-2007 at 12:17 AM. Reason: Clean up my stupid thought
Road_Dog is offline   Reply With Quote
Old 07-27-2007, 01:48 AM   #5
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
Quote: Originally Posted by Road_Dog View Post
My car has a 12 volt source for the rear-view mirror and therefore a Bluetooth solution to send the decoded data stream to my car pc would be a perfect match. I have been playing with SparKFun's (highly recommended site) Bluetooth serial setup http://www.sparkfun.com/commerce/pro...roducts_id=617 for another project of mine. It is a remote LCD display.

A quick glance at your Bluetooth module and it looks like it supports SPI? If so then this raises interesting possibility. I already have a programmer header on the board. However for this chip Atmel uses SPI to program chips. Their ISP header exposes +5V (on this board), SCK, MOSI, MISO, AVR RESET, and GND. Therefore, all I have to do is expose a single pin (a slave select line) and my existing design will then work with your Bluetooth module! I assume the SPI interface is at least as functional as the UART interface, though I have no experience with your module (though it looks like fun to play with!).

You could use a simple +3.3V LDO regulator and a couple capacitors to get the needed 3.3V supply. For level-shifting the signals, there are standalone ICs that do the job quite nicely at low cost. The DIP package you sent is quite large - you could probably fit everything you need on the bottom of a circuit board no larger than the DIP package itself and the parts would be a tenth of the cost of the Bluetooth module itself. I can suggest a few part numbers if you need it eventually as I, in a recent project, level-shifted SPI signals from 3.3V to 5V and back, and also used a 5V to 3.3V LDO on a related board. They are all surface-mount parts. If you are trying to fit this in a rear-view mirror I think you don't want to mess with through-hole on perf-board - it could easily become much too big. Probably worth making a PCB - much more professional looking.

In fact, continuing that train of thought... If you have no interest in USB for your application, then why bother with USB microcontroller and connector? One could remove everything on the USB connector part of design, and change the microcontroller to something cheaper. Decoding the V1 signal should be very easy. Most of the microcontroller's work load is the USB interface. You could also eliminate the external crystal and use the internal RC oscillator. Then put the Bluetooth module directly onboard. I doubt it would make the board grow much larger. Advantage with this approach would be one PCB (not two) and a small integrated design.

The alternative would be exposing the four UART pins but that would take more space/rerouting on the main adapter board since you can't reuse the programming header already there.
PredatorCoder is offline   Reply With Quote
Old 07-27-2007, 02:39 AM   #6
Constant Bitrate
 
Road_Dog's Avatar
 
Join Date: Nov 2006
Location: USA, Oregon
Posts: 118
Road_Dog is an unknown quantity at this point
Quote: Originally Posted by PredatorCoder View Post
A quick glance at your Bluetooth module and it looks like it supports SPI? If so then this raises interesting possibility. I already have a programmer header on the board. However for this chip Atmel uses SPI to program chips. Their ISP header exposes +5V (on this board), SCK, MOSI, MISO, AVR RESET, and GND. Therefore, all I have to do is expose a single pin (a slave select line) and my existing design will then work with your Bluetooth module! I assume the SPI interface is at least as functional as the UART interface, though I have no experience with your module (though it looks like fun to play with!).

You could use a simple +3.3V LDO regulator and a couple capacitors to get the needed 3.3V supply. For level-shifting the signals, there are standalone ICs that do the job quite nicely at low cost. The DIP package you sent is quite large - you could probably fit everything you need on the bottom of a circuit board no larger than the DIP package itself and the parts would be a tenth of the cost of the Bluetooth module itself. I can suggest a few part numbers if you need it eventually as I, in a recent project, level-shifted SPI signals from 3.3V to 5V and back, and also used a 5V to 3.3V LDO on a related board. They are all surface-mount parts. If you are trying to fit this in a rear-view mirror I think you don't want to mess with through-hole on perf-board - it could easily become much too big. Probably worth making a PCB - much more professional looking.

In fact, continuing that train of thought... If you have no interest in USB for your application, then why bother with USB microcontroller and connector? One could remove everything on the USB connector part of design, and change the microcontroller to something cheaper. Decoding the V1 signal should be very easy. Most of the microcontroller's work load is the USB interface. You could also eliminate the external crystal and use the internal RC oscillator. Then put the Bluetooth module directly onboard. I doubt it would make the board grow much larger. Advantage with this approach would be one PCB (not two) and a small integrated design.

The alternative would be exposing the four UART pins but that would take more space/rerouting on the main adapter board since you can't reuse the programming header already there.

Yes -- reducing the CPU to something that can interface using the UART would be a better choice. However, I like having options and USB and Bluetooth capabilities is appealing. The voltage source would be the next issue. Lithium Ion battery pack?

Also, this radio seems capable to interface with USB but I haven't played with that either.


Road Dog
Road_Dog is offline   Reply With Quote
Old 07-27-2007, 02:52 AM   #7
Variable Bitrate
 
P3D4T0R's Avatar
 
Join Date: Dec 2006
Location: MA, USA
Posts: 399
P3D4T0R is an unknown quantity at this point
Count me in
__________________
"Mess with the best, die like the rest."
Work Log --> Old Car (Totaled)
Work Log v2 --> New Car (Totaled)
Work Log v3 --> GMC Suburban K2500 (Work in progress)
P3D4T0R is offline   Reply With Quote
Old 07-27-2007, 04:38 AM   #8
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
Quote: Originally Posted by Road_Dog View Post
Yes -- reducing the CPU to something that can interface using the UART would be a better choice. However, I like having options and USB and Bluetooth capabilities is appealing. The voltage source would be the next issue. Lithium Ion battery pack?

Also, this radio seems capable to interface with USB but I haven't played with that either.

For voltage source, I don't quite see the question here... Didn't you say your rear-view mirror has 12V available? The design has a linear 5 volt regulator that is powered from the Valentine One's telephone cables. If you use the DC power adapter provided with the Valentine One, a telephone cable to the USB adapter and another telephone cable from the USB adapter to the Valentine One then you should be set (basically wire it in place of a remote audio adapter: see the Valentine One manual for a diagram). It is a USB self-powered design (i.e. does not draw power from the host).

For USB, looking at http://www.sparkfun.com/datasheets/W...-Schematic.pdf I see that SparkFun did not break out the relavent USB D+/D- lines.

http://www.sparkfun.com/datasheets/W...SMD-Module.pdf indeed says that USB is supported but no further mention is made, and the D+/D- lines on the breakout schematic show up as GND instead. So I'm not sure what's up with USB on that thing. Even if it works the V1 adapter board would need to support USB host and that is probably more trouble than it's worth on this microcontroller. Serial (via SPI or UART) would be much easier to work with.

I did not see any SPI or UART documentation on the SparkFun site; I would suggest e-mailing and seeing if the SPI interface documentation can be obtained. Also would be good to ask what's up with USB interface.
PredatorCoder is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 07-27-2007, 06:08 AM   #9
Newbie
 
Join Date: Jun 2005
Posts: 15
Madmac is on a distinguished road
One small point looking at your schematic. The pchan fet will be partly turned on by connecting the the microcontroller pin. The Vgs for the IRFR9024 starts to turn the device on at 4.5volts. The AT90USB162 (have not used this part) port pin will have a protection network to VCC (even if configured as an open drain output). That will give 7'sh volts on the gate.
Madmac is offline   Reply With Quote
Old 07-27-2007, 05:55 PM   #10
Constant Bitrate
 
Road_Dog's Avatar
 
Join Date: Nov 2006
Location: USA, Oregon
Posts: 118
Road_Dog is an unknown quantity at this point
Quote: Originally Posted by PredatorCoder View Post
For voltage source, I don't quite see the question here... Didn't you say your rear-view mirror has 12V available? The design has a linear 5 volt regulator that is powered from the Valentine One's telephone cables. If you use the DC power adapter provided with the Valentine One, a telephone cable to the USB adapter and another telephone cable from the USB adapter to the Valentine One then you should be set (basically wire it in place of a remote audio adapter: see the Valentine One manual for a diagram). It is a USB self-powered design (i.e. does not draw power from the host).

For USB, looking at http://www.sparkfun.com/datasheets/W...-Schematic.pdf I see that SparkFun did not break out the relavent USB D+/D- lines.

http://www.sparkfun.com/datasheets/W...SMD-Module.pdf indeed says that USB is supported but no further mention is made, and the D+/D- lines on the breakout schematic show up as GND instead. So I'm not sure what's up with USB on that thing. Even if it works the V1 adapter board would need to support USB host and that is probably more trouble than it's worth on this microcontroller. Serial (via SPI or UART) would be much easier to work with.

I did not see any SPI or UART documentation on the SparkFun site; I would suggest e-mailing and seeing if the SPI interface documentation can be obtained. Also would be good to ask what's up with USB interface.

In my Grand Amm yes. Others....no.



Road Dog
Road_Dog is offline   Reply With Quote
Old 07-27-2007, 06:56 PM   #11
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
Quote: Originally Posted by Madmac View Post
One small point looking at your schematic. The pchan fet will be partly turned on by connecting the the microcontroller pin. The Vgs for the IRFR9024 starts to turn the device on at 4.5volts. The AT90USB162 (have not used this part) port pin will have a protection network to VCC (even if configured as an open drain output). That will give 7'sh volts on the gate.

Good catch! I think I was half-asleep when I did that part. You are right. And I found another issue: that transistor can only do a maximum gate-to-source voltage of -20 volts. Which means that if your Valentine One is on (microcontroller output is pulled to ground) and your alternator does a load dump, you are theoretically screwed since you will likely exceed -20 volts. So if using MOSFET, one needs one with greater Vgs maximum rating. And when Valentine One is supposed to be off (microcontroller output is 5V) then Vgs is still -7 volts. So it won't actually turn off, as you noted. That could be worked-around by tri-stating the microcontroller output, except that I suppose you have to find a way to remove the charge on the MOSFET's gate.

Perhaps a PNP transistor would be a better choice? To turn the Valentine One off, one could tri-state the microcontroller output and then nothing will be driving current into the transistor, at which point no current will be allowed into the V1.

Quote: Originally Posted by Road_Dog View Post
In my Grand Amm yes. Others....no.

That does make for a tricky thing... Yes you will be forced to use a battery or run a +12V power line up there (as well as ground). Charging the battery will be a challenge. Best thing I can think of would be something solar on the back of the mirror. Otherwise you are stuck periodically plugging a charger into your mirror. I guess you have to choose which of those options is the least unsightly. Remember your battery has to sustain a 425 mA load going to the V1 and also supply current to the Bluetooth radio.
PredatorCoder is offline   Reply With Quote
Old 07-29-2007, 07:36 AM   #12
Newbie
 
Join Date: Jun 2005
Posts: 15
Madmac is on a distinguished road
Because the micro I/O port is also configurable as input it will have a protection network to Vcc. So if you use a PNP bipolar device you will still have the problem. Only real solution is to add a device to level shift. A low cost signal fet
with the power fet connected by a resistor. Use a resistor between gate and source on the power fet to make sure it is off when it should be and put a 10V zener across it to protect the power fet for Vgs max. Extra parts 1 x low power fet, 2 x resistors, 1 x 10V zener. There are many other ways to do it, the above only adds a few cents to to BOM.
It is usual to design for worst case (during power dump) of 80V.
Madmac is offline   Reply With Quote
Old 08-01-2007, 04:31 PM   #13
Newbie
 
Join Date: Aug 2007
Posts: 1
Hedge is an unknown quantity at this point
Has anyone removed the sensors from a Valentine One for remote placement?

Having the unit completely hidden with this interface and only the sensors stuck to the front and rear windshields would be sweet.
Hedge is offline   Reply With Quote
Old 08-03-2007, 07:49 PM   #14
Newbie
 
Join Date: Jun 2005
Posts: 46
PredatorCoder is on a distinguished road
Quote: Originally Posted by Hedge View Post
Has anyone removed the sensors from a Valentine One for remote placement?

Having the unit completely hidden with this interface and only the sensors stuck to the front and rear windshields would be sweet.

From what I have heard elsewhere on forums, this is extremely non-trivial if not impossible. It would likely require significant re-engineering of the V1 as the sensors are all integrated onto one PCB/block.

Best solution for front/rear sensing would be two V1s (expensive, I know, but probably necessary). Using two of the discussed USB adapters you could potentially combine their alerts on a PC. Each unit could be hidden in the front and rear of the vehicle. This is probably not worth the trouble unless the V1 is illegal where you live. I have a friend in Virginia who knows someone who put a single V1 underneath the front of the vehicle (i.e. don't go over too big a bump). Detectors are illegal in VA, but cops aren't finding that... However that person only has one V1, so rear detection is not really possible - too much metal for the rear sensor to go through.
PredatorCoder is offline   Reply With Quote
Old 08-25-2007, 02:04 AM   #15
Newbie
 
Join Date: Aug 2007
Posts: 2
cventers is an unknown quantity at this point
Looks great! I'm pretty useless with hardware but if I could buy such a piece I might be able to find the time to develop a Linux driver.
cventers 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 On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
driver issues with usb to ide adapter jermkesler General Hardware Discussion 22 08-31-2006 10:09 PM
USB Wireless g adapter problem thenick100 Wireless Communications 2 02-07-2006 01:04 PM
Questions for developers SuperG35 ME Archive 28 08-26-2003 11:12 AM
Is ME open source? SuperG35 ME Archive 2 08-22-2003 03:42 PM
still open source? SilverJester ME Archive 3 03-03-2003 10:52 PM



All times are GMT -5. The time now is 07:35 AM.


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