Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: dmehling on August 15, 2011, 05:55:31 PM

Title: need a microcontroller with 3.5 mm output
Post by: dmehling on August 15, 2011, 05:55:31 PM
I am a wheelchair user trying to use my computer to trigger a switch which will be used to activate certain functions on my chair.  There are a bunch of adaptive switches out there which connect to an input on a control box on a wheelchair.  The connectors on these switches are either 3.5 mm stereo or mono connectors.  I would like to know if there is a microcontroller with a 3.5 mm output to which I could interface with the wheelchair control box.  In addition, this same microcontroller would also need to interface with a PC through a USB connection, but that's sort of a later stage on this project.
Title: Re: need a microcontroller with 3.5 mm output
Post by: Billy on August 15, 2011, 08:06:11 PM
It would be a simple matter to solder a cable with a 3.5mm jack to virtually any evaluation or development PCB out there if you're physically able to use a soldering iron.

If you provide a little more info on what you're trying to accomplish, we can probably offer some help. Do you have a controller in mind?
Title: Re: need a microcontroller with 3.5 mm output
Post by: corrado33 on August 15, 2011, 08:27:08 PM
So, let me get this straight.

Instead of using the adaptive switches already available, you want to use your computer instead?  Why not just write a program on the computer and somehow use the audio out (headphones) port to control the wheelchair box? 

I agree with the post above, give us more information and we'll be able to help a lot better. 
Title: Re: need a microcontroller with 3.5 mm output
Post by: Soeren on August 15, 2011, 08:36:09 PM
Hi,

The connectors on these switches are either 3.5 mm stereo or mono connectors.  I would like to know if there is a microcontroller with a 3.5 mm output to which I could interface with the wheelchair control box. 
Just so we're on the same page. Jack connectors are TSR, which means Tip, Ring and Sleeve.
In Stereo, the Tip carries the left side signal, the Ring carries the right side signal and the Sleeve is ground(ed).

I guess the 3.5mm jacks used for you chair is just connecting a switch that shorts out the tip (and/or the ring if applicable) to the sleeve, either by a physical contact or by a transistor.

Microcontrollers have pins for connecting to a board, which can hold whatever you like, but in itself, a microcontroller haven't got anything but pins.

Perhaps you meant a microcontroller board?
If so, some of them come with a 3.5mm socket for such a jack, but you never see the jack on a board - they always go on a cable (but you can get cables with jacks in both ends).

Boards that have no 3.5mm socket can be equipped with one, but you need to be sure, that the I/O of the microcontroller can stand whatever load the box on the chair puts on it. If it can't, a transistor (and perhaps a small relay) should be added.


Do you have any specs for the inputs that you want to control?


In addition, this same microcontroller would also need to interface with a PC through a USB connection, but that's sort of a later stage on this project.
It's sort of right now, if you want to be sure that the controller can speak USB.
Here (http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device) is a page where the PIC18F4550 is used for USB.
Title: Re: need a microcontroller with 3.5 mm output
Post by: dmehling on August 16, 2011, 10:56:14 AM
Thanks everyone for your helpful advice.  I don't know much about electronics so I may be trying to go about this the wrong way.  I just want the simplest and easiest solution.  I would prefer not to do any soldering or any other DIY work, since this needs to be extremely reliable and safe.  My preference is to simply use an off-the-shelf product where I can just plug everything in.

If I could go straight from an output on my PC to the control box on my chair that would probably be the best solution.  Could I really use the audio output?

I did say I was using a stereo connector, but really I should go with a mono.  Stereo does work, but the input jack on the control box is mono.  Not sure if this makes a difference or not.  I just want to be on the safe side.

Basically what I'm wanting to replace is a very simple mechanical switch with a mono plug on one end.  Here's an example of what I'm talking about:
http://www.enablemart.com/Catalog/Sensitive-Switches/Micro-Light-Switch (http://www.enablemart.com/Catalog/Sensitive-Switches/Micro-Light-Switch)
Title: Re: need a microcontroller with 3.5 mm output
Post by: Soeren on August 16, 2011, 01:39:07 PM
Hi,

Thanks everyone for your helpful advice.  I don't know much about electronics so I may be trying to go about this the wrong way.  I just want the simplest and easiest solution.  I would prefer not to do any soldering or any other DIY work, since this needs to be extremely reliable and safe.  My preference is to simply use an off-the-shelf product where I can just plug everything in.
Whether a microcontroller is the simplest solution depends on part what you want it to do and part what your programming skills are.
Perhaps there's a better/simpler/more stable/cheaper solution, but we need to know what this gizmo's supposed to do.


If I could go straight from an output on my PC to the control box on my chair that would probably be the best solution.  Could I really use the audio output?
Yes and no. If you build a little circuit with a tone detector (or more for more functions), you can generate a tone that triggers the circuit. A simpler solution (if you can guarantee silence from the output at all other times) would be a transistor stage that is rectifying the output and driven the transistor into saturation .
If you don't wanna build anything at all yourself, I cannot see how you could go from a low voltage AC signal to a DC as required for the "switch". Lots of way to shave the goat, but they all need an edge  ;D


I did say I was using a stereo connector, but really I should go with a mono.  Stereo does work, but the input jack on the control box is mono.  Not sure if this makes a difference or not.  I just want to be on the safe side.
It does make a little difference. you shouldn't ever use the Ring (the middle piece) of a stereo jack when it's going into a mono socket, as that will short circuit hot to ground (not a disastrous situation in your application I guess, as it would be just like if you pressed the button (or whatever you're gonna do to signal it).


Basically what I'm wanting to replace is a very simple mechanical switch with a mono plug on one end.  Here's an example of what I'm talking about:
http://www.enablemart.com/Catalog/Sensitive-Switches/Micro-Light-Switch (http://www.enablemart.com/Catalog/Sensitive-Switches/Micro-Light-Switch)
Dang it's a high price for $3..4 worth of wire, jack and switch.

OK, now you want something else to control it (i.e. not a switch), or what?
Care to tell us more? The more info we get, the better and more precise our answers can be.

If I misread you and you just want the switch, then there's no need for any electronics - just the electromechanical bits (switch and jack) and a dual conductor cable/wire.
Title: Re: need a microcontroller with 3.5 mm output
Post by: dmehling on August 16, 2011, 03:03:55 PM
Basically what I need is a way to emulate the mechanical switch from a PC.  In other words, I click on a button on some Windows app, the signal is routed through some sort of hardware interface with a 3.5 mm plug on the end that connects to the input jack on my wheelchair control box.

Since I posted my prior message, I discovered a device which might do what I am needing.
http://www.cleware.net/produkte/p-usbswitch35-E.html (http://www.cleware.net/produkte/p-usbswitch35-E.html)

Would this work?  I am in the US and so I would like to find a product made here that can do what that device does, assuming it is the correct device for my needs.
Title: Re: need a microcontroller with 3.5 mm output
Post by: Soeren on August 16, 2011, 06:30:14 PM
Hi,

Since I posted my prior message, I discovered a device which might do what I am needing.
http://www.cleware.net/produkte/p-usbswitch35-E.html (http://www.cleware.net/produkte/p-usbswitch35-E.html)

Would this work?  I am in the US and so I would like to find a product made here that can do what that device does, assuming it is the correct device for my needs.
Yes, it seems to be just the ticket, but since you're being a bit secretive about what it's gonna be used for, I'll just point you to the last few paragraphs on that side:
Quote
Please note:
PC programs may fail or may be interfeared through other programs. Don't connect devices to the USB-Switch 3,5" that may cause harm if the switch turns on unexpected!

The usage of the USB-Switch 3,5" is strictly prohibited when the failure of the sensor will harm people.
Take that into consideration - no matter which way you interface your chair.

I am not aware of any similar products, as you want it boxed up and ready to go - plenty of USB relay boards at much lower prices, but in most instances, such interfaces are for experimenters and when industry needs something like that, they either make it, or part with a load of cash to get it in a nice box that gets ripped off within a week anyway.


You could try to locate a local electronics amateur with impeccable soldering skills and get him to assemble and box up a kit for you. Perhaps call a few schools and talk to their science teachers; they might know some.

If all else fails and this is of importance to you, I can't imagine that shipping a unit from Germany would come to more than around $50 (tops) if you get it by regular mail. It's really a question of how bad you want it and whether you can find a compatible unit closer to home in a reasonable time.