3.5mm jack as mC-PC interface

Do I need some protection circuitry or I can directly use two wires from 3.5 as analog input on my Panda II?

Maybe I was a bit vague. I want to send data from c# app on my PC (NAudio) through standard 3.5mm port. I would measure voltage on analog input, and based on voltage level I would read coded information. Is it safe to directly connect mic cable to panda input pins?

Why would you want to do that? It would be MUCH simpler to use a USB-serial adapter (and they can be had incredibly cheaply), and such a thing can use a 3.5mm jack, since you only need 3 wires (see PICAXE programming cable for an example).

So the USB to serial adapter acts as an ADC ? I think the OP wants to connect a microphone to the analog inputs on a Panda and send either the ADC count or a calculated value to the PC application.

I would attempt to connect the microphone to the analog inputs on the Panda and print the ADC values to debug to see if the ADC can sample the input. If not you may need to put in a simple amplifier to boost the microphone output.

I believe he wants to go the other way… output data on the PC side through the speaker port, input into the ADC on the Panda II. Either way, if the goal is to send data back and forth from the PC to the Panda II, USB-serial is a MUCH easier way to accomplish that. If the goal is to specifically use the speaker port for some reason, then I would imagine that’s possible, but you might need either an amp in there somewhere, or a voltage divider. I don’t know what kind of voltages the speakers see.

1 Like

Thanks for replying. Yes, USB-serial adapters are indeed very cheap, but, as I understood, I will need to solder resistor to mode pin in order to send data to PC, and there is no debug possibility when this setup is used. On the other hand, I will only send strings to and from PC, there is no need for some high-speed transfer rate. And yes, I’m interested in circuit that will protect my mC, and amplify signal if needed.

Nope, you don’t need to touch MODE and you don’t lose anything from a debug perspective.

Connect a TTL USB-Serial device to the COM1 pins, use that to send and recieve serial data to a PC app, while still debugging the app with Visual Studio.

(the MODE thing and all that is when you want to move to serial debugging and use the USB client mode, which you don’t)

1 Like

Excellent, that is what I was looking for. Thank you. However, in order to connect mC to mobile version of my app on Windows Phone 7, I will indeed need to cut and connect headphones wires and used them for data sending/receiving. WP7 is pretty locked, but competition rules demand ported app. Thank you once again for your time.

yes, that is the case, there are no serial comms options today with WP7. That is how many data capture sleeves operate (credit card swipe devices etc)