Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: Car Radio-->Arduino-->Android on: March 25, 2011, 09:08:08 pm
I was trying to do something very similar, but with a Corolla OEM radio.  I got the arduino sniffing information from the car AV bus pretty quickly (which I thought would be the harder part), but getting the radio buttons to control my Android phone has been frustrating.

There is the kludgy solution of sending headset clicks to the phone through the headphone jack.  Connecting the microphone line to ground via ~10 Ohm should register as a headset click.  According to some testers, grounding the L/R stereo audio lines will give you forward/back clicks, but in my testing this also just registered as single headset clicks, which should generally give you pause/play function.  If you give two clicks in rapid succession, you (may) get skip track forward in the standard Android music player.

Unfortunately Android's handling of media control is pretty bad in general.  The system does a poor job of deciding which app to send commands to, without any respect for which app has focus.  This is supposed to be improving in new versions.

There is an app called DroidShuffle that allows you slightly more control with nothing but headset clicks, but it's still a pretty kludgy way to go.

I also tried using a BlueGiga WT12 bluetooth module.  This has AVRCP support built in, so would be great if current Android supported basic bluetooth profiles adequately, but it doesn't.  I've been planning for a while to build my own bluetooth Android service around Amarino, but haven't gotten around to it yet.

I love my Android phone but for this particular project it's been pretty disappointing...  Tempted to try USB now that there's a bit of infrastructure...
2  Using Arduino / Networking, Protocols, and Devices / GPIB to USB with AVR on: March 16, 2011, 09:10:47 pm
There was an earlier GPIB thread, but it wasn't accepting new replies.  Maybe because it was from the old forum site?  I dunno.  Anyway, I found this and it seems like a good place to start for trying to get GPIB interface on Arduino/AVR.  Includes schematics, layouts, and firmware.  Will require some updating but not bad.

The design uses the DS75160/75161 ICs from National Semiconductor.  These are not so easy to find, but from what I can tell the Texas Instruments SN7516x are drop-in replacements (?).
3  Forum 2005-2010 (read only) / Forum / Re: Profile Edit - where? on: September 19, 2010, 10:27:50 pm
Hmmm, but even when I get to User CP, it's not clear where I click to get to Edit Profile?  Was able to manage it using the URL hack suggested above.
4  Forum 2005-2010 (read only) / Interfacing / Re: Upload code with UART/serial peripheral attached on: September 21, 2010, 01:24:34 am
So I guess it depends on the peripheral whether it's okay to send garbage input during upload...  Probably not worth the risk.

Looking up "parasitic diode" now...

I've gone ahead and redesigned the circuit; I think it's an improvement:  As usual I was getting too fancy with running the USB power line through the relay to prevent the other power source from triggering the relay; simpler to just run USB power through a normal diode!

I decided to trigger the relay from USB after all, rather than triggering from the other power source.  The other source could be +3.3-12V in either VCC or RAW, so that was getting complicated.  A zener shunt would have taken care of it I guess, but I think that would have been a waste of power.

FWIW, I did find one unitary form A solid state relay in a smaller SSOP package: Omron's G3VM-xx-LR series, e.g.

Think I'm all set; again, thanks very much!
5  Forum 2005-2010 (read only) / Interfacing / Re: Upload code with UART/serial peripheral attached on: September 20, 2010, 10:25:13 am
Cool, thanks for all your help!  That is my concern with just cutting power; I should be able to figure out how the pins are left unpowered, but I'd rather not mess around with that.  What is the concern with leaving Ard TX -> WT12 RX attached?  I would assume the WT12 RX is high impedance, so the only downside would be the WT12 getting crap at the wrong baud as input during code upload, which I would have thought would be okay?

Here's datasheet for LH1512:

I'm thinking now that maybe I should work from the other end and set it up to connect the peripheral only when powered from the non-USB source.  If doing it this way, I believe it requires the supply to be routed through the NO relay pins.  Actually this is the part of the circuit I am most curious about; it seems a little sketchy to me to run the relay LED from the same supply that you are sending through the NO MOSFET pins.  But I guess it should be fine.  At the same time, this is the most interesting part to me because if it works it seems to be a reliable way for the circuit to know which power supply it is connected to at any time.

Thanks for the lead to Clare relays.  It looks to me like even their SMD packages are still 0.1" spaced pins though, so probably not much smaller (footprint-wise) than a standard DIP.  This seems typical for these relays; probably cannot be made smaller due to the optical components?

Many thanks!
6  Forum 2005-2010 (read only) / Interfacing / Re: Upload code with UART/serial peripheral attached on: September 19, 2010, 10:26:27 pm
Good questions.  I'd rather have one less thing to plug/unplug; USB is kind of unavoidable.  Also this way it is idiot proof, so I don't have to worry about forgetting to unplug (although the possibility of damage is probably not sooo high).  Also the WT12 board is not so fun to breakout, although I do have an as yet unproven breakout design, but it takes less space without adding headers.  Of course, since the relays don't really come in smaller than DIP packages, not clear that this solution saves space...

I do think it's nice to allow some in-field programming, but it probably doesn't have to be as integrated as this; I could probably unplug the Pro Mini to do any reprogramming and then plug it back in.  But if I ever moved to a version with the straight AVR instead of a Pro Mini then I would definitely want to integrate something like this.

Anyway, these are good big picture questions, but half the reason I posted was just to get some expert opinions on ways to solve this kind of problem; I'm pretty new to designing anything more complicated than "hook RX to TX and TX to RX".
7  Forum 2005-2010 (read only) / Interfacing / Re: Upload code with UART/serial peripheral attached on: September 19, 2010, 08:32:02 pm
Good point; the "coils" are LEDs of course, but yeah it should be just low enough to allow series on 3.3V.  There are even lower voltage ones available from Omron or Panasonic, but I guess if I wanted to add any additional switching channels I should just wire them in parallel.

On your suggestion to just swap the TX/RX and leave VCC alone, I think what you're suggesting is that I run the whole setup off a separate power supply all the time, and then when uploading code I can use the USB power just to run the relay LEDs and swap only TX/RX.  So in that case USB power wouldn't be connected to the Arduino at all.  That seems like a good suggestion.  I had come at it with the idea that when uploading code I would power the whole thing off USB, so then there was a need to switch the USB power through the relay to get full power to Arduino VCC but not allow Arduino VCC to trigger the relay when USB was detached.

Would still love to hear some thoughts on what really needs to be switched out to be safe: peripheral TX, peripheral power, or some combination of TX/RX/power?
8  Forum 2005-2010 (read only) / Interfacing / Re: Upload code with UART/serial peripheral attached on: September 19, 2010, 06:39:41 pm
Occurs to me a simpler solution may be to have the relay disconnect the peripheral's power when USB is connected.  But I suppose it may depend on the peripheral what state the pins are in when it is unpowered and whether there is still any potential for damage?
9  Forum 2005-2010 (read only) / Interfacing / Upload code with UART/serial peripheral attached on: September 19, 2010, 06:37:35 pm
Hi guys, wanted to get some feedback about an issue I'm trying to solve.  I'm trying to interface an Arduino Pro Mini to the Bluegiga WT12, but this issue really applies to any situation where an Arduino with separate USB adapter (e.g. Pro Mini or RBBB) is interfacing to a UART/serial peripheral.

I would like to have my peripheral attached to Arduino RX/TX pins and still be able to upload sketches via my separate USB/UART module (USB-BUB).  The issue is that having both the peripheral and the USB adapter attached at the same time causes problems and potential damage.  

The way I have attempted to solve this is using a Form A / Form B solid state relay (LH1512).  I run the USB supply voltage through the relay's LED pins to ground, so that when USB is attached it activates both the normally open (NO) and normally closed (NC) pins of the relay.  The NO pins connect the USB supply voltage to the Arduino VCC.  The NC pins connect the Arduino RX to the peripheral TX.  Schematic here:

What I'm hoping this accomplishes is that when USB is attached, it connects its own supply to the Arduino VCC while simultaneously disconnecting the peripheral TX from Arduino RX, allowing USB to upload sketches without conflicting with the peripheral.  When power is supplied from somewhere other than USB, the relay is not activated and the peripheral TX is left connected to Arduino RX for normal operation.

I ran some tests with some relays I had lying around and it seemed like this should work.  Hopefully someone more experienced can give me feedback if this seems like a viable method, or if there is some better, more standard way to handle this issue.  Also, is it enough to disconnect the peripheral TX line, or should I also disconnect the peripheral's RX to be safe?
Pages: [1]