Author Topic: Anyone know where common ground is on...  (Read 860 times)

0 Members and 1 Guest are viewing this topic.

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Anyone know where common ground is on...
« on: March 05, 2025, 07:17:12 PM »
0
Anyone know where common ground is on the ESCU 58821 HO sound decoder? 

I've used one to control a DC loco on a DCC track where the DCC was turned off...


Now I'd like to be able to use it like in that application or where I use it to broadcast the sound via Bluetooth to a boxcar behind a DCC loco that is non-sound.  I did this with my DC throttle, the HandCab-DC shown here where sound could come from the throttle or a Bluetooth boxcar ...


In the non-DC mode I will not have the decoder connected to the track sending DC to the track but only getting DCC from the track to operate the decoder and broadcast sound to a Bluetooth speaker on/near the track or to the Bluetooth boxcar.   

Here is what I've come up with for the wiring at the moment....



I need 5v for the Bluetooth transmitter (lower right) and feel I can get that by either rectifying the DCC track input or maybe from the the 12v Blue plus a ground (not a function output).  Either way I'm guessing that I should have a common ground between the decoder and the Bluetooth transmitter, voltage dropper and the bridge rectifier if I go that route.

Should I just start probing around until I find the ground that is common to the track input bridge or does anyone know where it is without doing that?

Thanks.......... Sumner
« Last Edit: March 05, 2025, 07:21:21 PM by Sumner »
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #1 on: March 05, 2025, 07:30:23 PM »
+2
Why do you need to connect the ground (common) from the MP1495 to the decoder?  With the speaker circuits being totally isolated by the DPDT selector switch the decoder and your other sound circuit don't have anything in common.   It should work without any common connection between them.

I would actually recommend against connecting the (grounds) commons together as there will be slight voltage mismatch between the decoder's bridge rectifier and the bridge rectifier supplying voltage to the MP1495.
. . . 42 . . .

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #2 on: March 05, 2025, 07:51:44 PM »
0
....  It should work without any common connection between them.....

Thanks I'll try it that way.

The speaker output does appear to share a speaker GND with both the decoder and Bluetooth transmitter with the one side of the decoder's speaker output grey/blk wire and the blk wire to the MP1495 on the 3 GND's on the transmitter.

Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #3 on: March 05, 2025, 09:24:35 PM »
0
Thanks I'll try it that way.

The speaker output does appear to share a speaker GND with both the decoder and Bluetooth transmitter with the one side of the decoder's speaker output grey/blk wire and the blk wire to the MP1495 on the 3 GND's on the transmitter.

Sumner

In your diagram the speaker outputs go  to the poles of the DPDT switch which then feed the speaker through the center connection on the DPDT switch. Those circuits never connect.  It is basically as if you were physically disconnecting the speaker from the decoder and connecting it to the KCX board and vice-versa. Maybe your diagram is incorrect?

 Also, I believe that the speaker outputs from the audio amp do not use ground. Both output leads are active, driven by a transistor bridge inside the amp.

And as I mentioned, the "ground" of the decoder and of the MP1495 will likely have slightly different potentials (unless the voltage OUT+ and OUT- is isolated from the input.
. . . 42 . . .

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #4 on: March 05, 2025, 10:35:34 PM »
0
In your diagram the speaker outputs go  to the poles of the DPDT switch which then feed the speaker through the center connection on the DPDT switch. Those circuits never connect.  It is basically as if you were physically disconnecting the speaker from the decoder and connecting it to the KCX board and vice-versa. Maybe your diagram is incorrect?

 Also, I believe that the speaker outputs from the audio amp do not use ground. Both output leads are active, driven by a transistor bridge inside the amp.

And as I mentioned, the "ground" of the decoder and of the MP1495 will likely have slightly different potentials (unless the voltage OUT+ and OUT- is isolated from the input.

Thanks for the input.  Yes the DPDT moves the decoder speaker outputs from the speaker in the enclosure to the KCX board or the other way around.  Days end here so will check out some things in the morning and will get back.

Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #5 on: March 08, 2025, 12:08:31 PM »
0
Update:  Got things working by ending up with the following wiring diagram...



I'm not an electronics person so probably improvements could be made but it is working so I'll move along to the next project.

I smoked the first Bluetooth transmitter module with input straight from the decoder's one speaker wire.  The output current must of been too high for the transmitter, had this problem on a different build.  With the 100K resistor in the circuit to the transmitter it lives.  I also added the pot for some volume control.

I'm surprised that it works with only the one wire speaker wire in the circuit but on thought that is how it worked on the other project.  The Arduino put out an audio output on one pin and that went to the transmitter.  That is also where I had to run a common ground between the Arduino and transmitter to make it work.  I also in that project use a BO505S isolator to isolate the Arduino power supply from the power input to the transmitter.  Here that wasn't needed with the bridge rectifier/voltage dropper creating another power source for the transmitter.  Probably not explaining this very well but main thing is that it works.

I did a video showing it running a DC loco on my DCC test track with the DCC power to the track turned off....


.... next video will show it providing sound only for a non-sound DCC loco running on the test layout in DCC mode.

Sumner


Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #6 on: March 10, 2025, 04:05:50 PM »
0
My original comments were based on your original diagram.  The way the speaker was wired through the DPDT switch implied that the KCS board was outputting audio signal to drive the speaker.  That's how the diagram showed it, and not being familiar with that circuit I assumed the diagram was correct.

But now I know that the KCS board is has to be feed audio signal to transmit it to some remote audio device.   It likely requires a line-level audio signal, not a much more powerful signal from the decoder's audio amp meant to directly drive a speaker.

Your second diagram clears that up. It also explains why you had to use such high value resistors to lower the voltage level to what is acceptable by the KCS board.  You could have used lower value resistors configured as a voltage divider to drop the audio signal to line-level  value., but it the circuit works for you it's ok.

If you were to wire the unconnected pin on the volume control pot to the KCS' GND you should have complete volume control from zero to loud.

As for the common (ground), there is an indirect relation between the decoder's common and the MP1496/KCS common.  That is because the same voltage source (DCC track voltage)  feeds both the decoder rectifier and the MP1496 rectifier.  So the indirect connection happens through the DCC feed.
. . . 42 . . .

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #7 on: March 11, 2025, 08:24:39 AM »
0
.....Your second diagram clears that up. It also explains why you had to use such high value resistors to lower the voltage level to what is acceptable by the KCS board.  You could have used lower value resistors configured as a voltage divider to drop the audio signal to line-level  value., but it the circuit works for you it's ok.

If you were to wire the unconnected pin on the volume control pot to the KCS' GND you should have complete volume control from zero to loud.

Thanks for the input. 

I did try what you are talking about.  I tried to figure out a way to run one of the speaker outputs through a voltage divider and can't remember now exactly what happened but it wasn't working.  I think that was when I was trying to figure out where the GND would be other than the decoder's GND, which I couldn't find at the time. 

On my other project using the KTX you can see that I did have a voltage divider on the audio output of the Arduino .....



.... see the right side of the wiring above.  I used the divider before the amp and had the amp for the internal speaker so that I'd have a volume control on it and the Bluetooth speaker.  The Arduino output wasn't very high so needed an amp.  This one was too powerful so put the divider before it.  Then had to use a divider again after the amp and before the KTX to keep from burning it up (yep burned one up there also--ordered more from China as they are very inexpensive there).

Note also I had to use the Hi-Link BO505S to isolate the power to the KTX from the 5v from the Arduino to make things work in that circuit.  Also the GND on the second divider goes back to the Arduino GND and the KTX's audio GND and board GND tie not only to the 505S but back to the Arduino's GND.

In the new circuit I tried (first one I posted further above) I couldn't get back to the GND on the decoder for the divider or the KTX so things weren't working.  I found out I could go to the really high resistors and it would work.

Then I found the ground on the decoder and thought about trying that but since things were working and with only a multimeter and limited electronics knowledge decided to leave things be and move on.

So do you think if I go back to the decoder's GND from the pot (now that I figured out where it is) I'd be able to drop the pot down to a lower value, maybe 47K?

Sumner
« Last Edit: March 11, 2025, 08:27:57 AM by Sumner »
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #8 on: March 12, 2025, 11:20:31 PM »
0
Sumner, after looking over your both circuits I have some questions, comments and suggestions (which are based only on the info I see in your diagrams).

Voltage Dividers:
As you already know a 2-resistor voltage divider can be used to reduce amplitude or volume (voltage) of an audio signal.  You used identical fixed value resistors which results in 50% reduction of the voltage.  A potentiometer can be used as a variable value resistor if the center (wiper) and one of the outer terminals are used. The range can vary from zero ohms to the full resistance value of the pot.
Pot can also be used as a voltage divider by using all of its terminals  That way the center terminal voltage can vary between zero volts and full input voltage.



You can further adjust the range of the volume control by adding an external resistor. 



I the way the pot is wired in your "Run a DC loco and have sound) it uses the BT module's audio input circuit resistance as the lower half of the voltage divider (the pot is just used as a 2-terminal resistor).  Are you even able to turn the volume down to zero?  Those resistors are also rather high value.

Here is how I would have wired it:


I would have also used a 50K pot and a 10k resistor instead of 500k and 100k.

I also looked over the ESU LokSound manual and here are possible ground locations:



The large copper areas are likely a ground plane.  Just to verify I circled 3 component locations which look like tantalum caps. Just to verify, if you look at those components, the circled end of them should have no marking (negative side) and the other side should have dark stripe on that end (positive). If that's the case than any place on that large copper plane is decoder's GND. You would have scrape off the solder mask layer to expose bare copper, then solder a wire to it.  The location I marked with a solid green rectangle makes most sense as it is located next to other solder pads.

But due to different diodes being used in the bridge rectifier of your circuit and ones on the decoder, the grounds will likely be at slightly different voltages which would cause unwanted current to follow between the grounds.  If it works as-is then I would not connect the grounds together.

. . . 42 . . .

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #9 on: March 12, 2025, 11:40:07 PM »
0
Since you also introduced your throttle circuit in this thread I also have some questions and comments about it.


Does Arduino require 7V to power it? That seems like an odd voltage to me.

You mentioned that you had to add that 5v to 5v DC/DC converter to isolate the KCX module.  I suspect that was likely because you were connecting the negative speaker output from the mini amp to the KCS ground.  The mini amps module likely uses a push-pull amplifier so both positive and negative side of the speaker output will have voltage on them (negative output is not tied to ground).

Why were you tapping the audio from the speaker output of the mini amp to feed the KCS?  Why not connect it to the Arduino's audio output (pin D9) along with the mini amp?  That way everything can be powered using GND and 5V from the Arduino. Actually I'm surprised that the Arduino's internal 5V regulator can supply enough current power to the mini amp.

I'm also curious why the resistor values in the voltage dividers is so different between the mini amp and the KCS.  They both reduce the audio level by 50%.  Also, since the mini-amp has its own built-in volume control, why did you need to use a voltage divider on the mini amp's audio feed?  Is the audio signal coming from Arduino's D9 pin too high (not line-level audio)?

Here's a simplified circuit I would have tried (I only left the power and audio connections for clarity). The AGND and PGND on the KCS are still connected (the drawing is not very clear there).  In this circuit I only use opposite halves of the DPDT switch. It  cuts off the speaker in one position and cuts off the audio signal to the KCS in the other position.


« Last Edit: March 12, 2025, 11:42:25 PM by peteski »
. . . 42 . . .

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #10 on: March 13, 2025, 10:36:12 AM »
0
Lots of questionsj.  Keep in mind that I have no electronics training so I copy and paste other people's circuits into ones I come up with so I'm sure there are better ways to handle a lot of what I've done.  With that in mind.....

Does Arduino require 7V to power it? That seems like an odd voltage to me.

I believe it will work 5v to 12v but according to some things I've read both extremes have some negatives and 7v-8v is often recommended so what I've been using (buck converter).

..........You mentioned that you had to add that 5v to 5v DC/DC converter to isolate the KCX module.  I suspect that was likely because you were connecting the negative speaker output from the mini amp to the KCS ground.  The mini amps module likely uses a push-pull amplifier so both positive and negative side of the speaker output will have voltage on them (negative output is not tied to ground).

You might be right on all of that.  I know it wasn't working and read where I needed to separate the power so did and it worked and only cost a few bucks.

.....Why were you tapping the audio from the speaker output of the mini amp to feed the KCS?  Why not connect it to the Arduino's audio output (pin D9) along with the mini amp?  That way everything can be powered using GND and 5V from the Arduino. Actually I'm surprised that the Arduino's internal 5V regulator can supply enough current power to the mini amp....

I'm using the volume control (knob) to be able to control the volume of the internal speaker and the Bluetooth speaker.

......I'm also curious why the resistor values in the voltage dividers is so different between the mini amp and the KCS.  They both reduce the audio level by 50%.  Also, since the mini-amp has its own built-in volume control, why did you need to use a voltage divider on the mini amp's audio feed?  Is the audio signal coming from Arduino's D9 pin too high (not line-level audio)?

Before I added the resistors between the mini-amp and the KCX I burned up  a KCX if I accidentally turned the volume up too high on the mini-amp.  Most of the resistor stuff was trial and error.  Without the resistors before the mini-amp there was too much current also to the 9x16 speaker if I remember right and I couldn't get the volume range that I wanted.

I have no idea what the audio signal form the Arduino is.  Lucky for me parts are cheap but still go through them making things work.


....Here's a simplified circuit I would have tried (I only left the power and audio connections for clarity). The AGND and PGND on the KCS are still connected (the drawing is not very clear there).  In this circuit I only use opposite halves of the DPDT switch. It  cuts off the speaker in one position and cuts off the audio signal to the KCS in the other position.



Thanks, and I'll take a look at that but this project is at an end for me but would love to see someone (you?) take it further.  Let me know if I can help.

Sumner
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html

peteski

  • Crew
  • *
  • Posts: 33494
  • Gender: Male
  • Honorary Resident Curmudgeon
  • Respect: +5654
    • Coming (not so) soon...
Re: Anyone know where common ground is on...
« Reply #11 on: March 13, 2025, 02:36:34 PM »
0
Thanks for the answers Sumner.  As for building that throttle, I'm not really ready for yet another project, and the entire proto-throttle thing is also not my thing.  Simple model RR throttles are just fine for me (but I do enjoy reading about projects like yours).

I cringe knowing the reason you tapped the audio feed to the KCX from the speaker output of the mini-amp, but it is your project and the important thing is that it works for you.  I would have added a volume control pot on the audio feed to the KCS to adjust its volume.

I still think that the 7V thing is odd.  More typical power supply voltages in that range are 5, 6, 9, and 12.  I would have likely selected 9V.  :)
« Last Edit: March 13, 2025, 02:39:40 PM by peteski »
. . . 42 . . .

Sumner

  • Crew
  • *
  • Posts: 448
  • Gender: Male
  • Respect: +1114
    • My Home Pages....
Re: Anyone know where common ground is on...
« Reply #12 on: March 13, 2025, 04:14:48 PM »
0
....I still think that the 7V thing is odd.  More typical power supply voltages in that range are 5, 6, 9, and 12.  I would have likely selected 9V.  :)

I needed 12v for the motor controller and was going to have to use a buck converter anyway so in the 7-8 volt (have gone to 9 also) range is what I like to use.  The actual range for an Arduino is wider than that.  12 is generally considered right at the upper limit and a lot of people don't like to use that, and I'm one  ;).

Sumner
« Last Edit: March 13, 2025, 04:16:33 PM by Sumner »
Working in N Scale ---Modeling UP from late 40's to early 70's very loosely......

Under$8.00 Servo turnout Control --- 3D Printed Model RR Objects -- My Home Page

http://1fatgmc.com/RailRoad/RR Main/Link Page Menu.html