3.3V max input for analog pin - AC or DC?

Very noob question I know, but I have no background on this and am learning as I go, have spent hours looking for the answer, my sense is that it is DC but need to know for sure. My intended use to connect to an analog pin is a device's speaker wire current that peaks a bit higher at 3.8v max, if it needs to be DC how can I convert it back. The trigger signal device is powered by 4 D batteries and I assume somewhere the current is inverted to AC, I decided to use the speaker wire as it was the easiest route for me, just cut and strip.

Him
If that external device is always battery powered and not grounded you may be able to do this with resistors and a capacitor.

Do you have a multimeter or access to an oscilloscope?

Does the device have a 'volume' control?

What type of audio signal do you need to look at?

Basically you need: (sorry need a diagram)

  • decrease the signal voltage to less than 3.0 V or so "peak-to-peak" that is 2.28 times the "rms" value of the AC signal.

  • Create a 1/2 3.3V reference point by putting two equal resistors (say 470 to 1000 ohms) in series from the Arduino power (5V on a UNO, but looks like you have something running on 3.3V??) to ground.

Take your speaker wire and ground one side.

Connect the live speaker connection (through a capacitor!) to the junction of the two resistors and to the Arduino Analog input. Capacitor value depends on the audio content and frequencies. Hmmm.. Maybe start with 10 microfarad if you have some low frequencies in the signal.

So you are referencing the AC + and - signal to 1/2 the Arduino input range.

Makes sense? Can anyone do a quick diagram who is not on a phone ?? :slight_smile:

My intended i put to an analog pin is a device's speaker wire current that peaks a bit higher at 3.8v max

I'm not quite following you.

However towards your question, the range includes both AC and DC. In the below diagram you see both an AC signal and DC signal. Not shown but possible is having both AC + DC.

Your analog input is limited to: 5V max (if powered with 5V) and the minimum is 0 volts. You must keep your analog within these values to get a valid reading.

Waveform.jpg

Waveform.jpg

thanks for the replies, I have a better idea now of what I need to do, but to answer some questions, here is the specific project

The "device" is a Budweiser goal light like seen here in my video : #26 Budweiser goal light automation with Home Assistant - YouTube

It does have a volume switch so I assume I can lower the power this way, I had thought of that but overlooked it.

I do have a multimeter but not an oscilloscope.

Do not need to look at the audio signal, just wanting to use that voltage as an event to trigger Home Assistant automation as per my video. It is to reduce the lag, the Budweiser system always goes off right at the goal score, my HA automations are delayed 10-30 seconds, the automation right from the device will reduce the lag substantially. I used the audio wires as it was easiest solution in my mind. The Bud goal light uses an electric imp card and I do not know how to probe the pins to see which are activated when the device does its thing.

I had checked the Bud goal light's speaker wire with the multimeter and confirmed it is AC, this threw me way off as it is powered with 4 D batteries, the D1 of course is powered through a usb device.

Also, I know this is an Arduino site but it was only place I found that seemed like I could get smart help. I am actually using a Wemos D1 mini, like I said, I had it working briefly and fried it. I had flashed the firmware with Tasmota to use in Home Assistant, just need to figure out the physical connections now, not sure I can get there but I know I am close.

In re-reading the op, I see I had made some odd typos, I apologize, I have no idea what thought I had tried to communicate.

Hi,

just wanting to use that voltage as an event to trigger Home Assistant automation

OH. You don't need to see the signal waveform at all...

I expect you can light an LED at the speaker wires. If that works, all you need is an OptoIsolator AKA OptoCoupler to connect to Arduino with total isolation. Th

See Popular-ICs - ArduinoInfo for example..

The OptoCoupler just has an internal LED that activates the output.

yes, I can light a single LED (without a resistor) very dim but yes. Thank you, I will try this and report in several days when it arrives, never would have gotten this on my own!

Is there a Wemos version of this OptoCoupler, quick search seems to be all Arduino, I know this is an Arduino board.

lol, ok on the right track but how or where is this wired in? Sorry but I have no background in this, just the will to learn though. I am looking and I see others have used this on other boards....

It appears to me that it is just pass through - 2 wires in, and 2 wires out, is this correct? I'd use the same ground and analog pin I intended to use on the board? Can I use an 817c ??

ok, 5th edit. Can I use this instead:

seems better for my skill level. I think this is a no. smh