You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
8.1 KiB

4 years ago
  1. \documentclass[11pt]{article}
  2. %Gummi|065|=)
  3. \title{\textbf{Car Stereo Replacement}}
  4. \usepackage{graphicx,caption}
  5. %\author{Steak Electronics}
  6. \date{02/13/20}
  7. \begin{document}
  8. \maketitle
  9. \section{Overview}
  10. Replacing a car stereo. I could just go to ebay, and buy a used car stereo, but where's the fun in that? Let's DIY a car stereo from a PCB used as a frontplate, a connector for my vehicle, and an audio amplifier. I'll connect in signal from an audio player.
  11. \\
  12. \includegraphics[scale=0.4]{../pics/DSCN2180.JPG}
  13. \captionof{figure}{PCB rev 1}
  14. \section{Items Included}
  15. I thought I would include the following:
  16. \begin{itemize}
  17. \item Arduino Nano
  18. \item Voltage and Gnd Breakout
  19. \item I2C Display
  20. \item Voltage Readout (of BAT)
  21. \item Current Readout (being drawn)
  22. \end{itemize}
  23. I also wanted to have the connectors that eurorack and synth designers use for mono audio cables, but the cables turned out too expensive. The current readout didn't work initially, and I haven't gotten to fixing it yet.
  24. \subsection{I2C OLED display}
  25. Just for fun, I bought an I2C oled display and am going to use it to display something.\footnote{It's an Arduino Uno, you can put almost anything on this.} Notes on this:
  26. Using the adafruit SSD1306 and GFX library (this procedure is well covered in other places), you can load an example sketch and get it running. First thing to change is to remove the Adafruit logo and replace it with my own. Let's do that.
  27. From https://design.goeszen.com/convert-image-for-oled-display.html
  28. \begin{verbatim}
  29. I'm on Linux here and found that the readily-available
  30. ImageMagick package will do the trick for you without
  31. any scripting. And runs on the CLI! Simple as that:
  32. convert some_image.png some.image.mono
  33. \end{verbatim}
  34. That's efficient. But it didn't really work out. Too much work, I don't need it that bad. Have to convert it to something the c compiler can read. I instead, just deleted their logo. Good enough for now.
  35. \subsection{Internal AVR Temperature Sensor}
  36. I setup the code to read from the internal temp sensor on the duino. However there is also this:
  37. https://thecavepearlproject.org/2019/02/25/no-parts-temperature-measurement-with-arduino-pro-mini-to-0-005c-or-better/
  38. This would be something to do for more resolution. The built in sensor is not very good, so this above link would be great. Hack a day also covers it.
  39. \section{Wiring Pinout is wrong on Internet - Cable has labels}
  40. I looked at the picture I have detailing the pinout of my car connector (Delco Delphi radio wiring diagram.jpg in resources). It's close, but not 100\% correct. I found that the cable itself has small text labels on each wire which explain which everything does. I didn't notice earlier, as I didn't look close enough (and no one mentioned this).
  41. \section{Arduino VReg Blowout}
  42. I had a knock off Arduino Nano, and the vreg blew out. I have some other vregs to replace it. I didn't have this problem with an Uno that I use as a ceiling dome light. Although that one is not left on as long, usually.
  43. \section{Amplifier}
  44. The amplifier I used is one of the cheapest avialable on ebay. I'm not proud. I'm poor. I had to take it apart, and reseat the amplifier ICs as the tab was not making contact with the chassis for one of them. I also added thermal paste. This amp is underpowered for my car, and may need replacing. It gets a bit hot.
  45. Some other issues with this amplifier are that the output connectors can get pushed back, there is only one output connector option, and it must run on battery power, as a 12V 1A or 2A will not power it. Finally, there is a 6V DC bias on output. No output audio isolation, which means you get car noise.
  46. \section{AC Audio Coupling to Remove DC Noise from Auto}
  47. I had some fun with this one. Many videos on this in the video folder. I started with the speakers being directly fed by the amplifier. This worked, but there was some noise coming through. Cars are noisy, this is not surprising. I would've preferred the amplifier to isolate the outputs, but no luck... At this point, I considered two options to block DC and allow AC. 1) Use a transformer. 2) Use capacitors.\footnote{A third option would've been to use a second set of batteries, but that would be laborious.}
  48. \subsection{Ground Isolator}
  49. I had been given a Ground isolator, which was two small transformers on a pcb intended to pass audio from a car powered signal source into the car speakers. I tried this isolator on the output of the speakers, and while it worked, the volume was lower, and it was impractical. I knew as soon as I heard the volume, that the issue was an impedance matching problem. The transformers were too small. They were intended for signal sources, not amplifier outputs. Onto option \#2.
  50. \subsection{Capacitor Audio Coupling}
  51. My initial thoughts here were: ``Let's be careful and use non polarized caps''. I bought some 0.22uf and 0.022uf polyester film capacitors at Electronics Plus, the local radioshack replacement, and tried them. No sound. After adjusting the connectors on the amp (which were admittedly loose - it's easy to push them back on the amplifier if you are not careful) I found that the capacitors didn't work. One problem was evident in the oscope. I only used one capacitor on the + output of the speaker amp, but the Amp biases the signal 6 volts. So I needed two. After that was resolved, the signal came through on the output of the capacitor, as viewed on the scope, however there was no sound output. I tried the safe way. It's time to break some rules.
  52. I grabbed some 1uf (electrolytic polarized) caps I had, and tried these. Again, no sound. Not giving up, I grabbed some 1000uf 'lytics, and tried once more. Now it worked.
  53. \subsubsection{Impedance / ESR of capacitors failing to pass enough power of signal}
  54. Capacitors are rated for impedance. Some data sheets also call this ESR, it appears after a quick look. It's either in there as impedance or ESR. It's not initially an issue if you are using the capacitor as a DC reservoir, but if you use it in an AC coupling situation then things get interesting. A high impedance, or ESR will block what a low one won't. In this example, it's as simple as the Amplfier either being able to power a speaker or not. Higher capacity caps will have lower impedance. See the picture. Other brands put impedance in a graph, or just call it impedance.
  55. \includegraphics[scale=0.5]{../pics/esr_impedance_capacitance.png}
  56. \captionof{figure}{Notice how impedance jumps very fast with a 1uf cap, compared to the higher values. Additionally, different brands will have different impedances for a similar value cap.}
  57. \subsubsection{Wikipedia on Impedance}
  58. \emph{In general, a capacitor is seen as a storage component for electric energy. But this is only one capacitor function. A capacitor can also act as an AC resistor. Especially aluminum electrolytic capacitors are used in many applications as a decoupling capacitors to filter or bypass undesired biased AC frequencies to the ground or for capacitive coupling of audio AC signals. Then the dielectric is used only for blocking DC. For such applications the AC resistance, the impedance is as important as the capacitance value. }
  59. \begin{verbatim} https://en.wikipedia.org/w/index.php\title=Aluminum_electrolytic
  60. _capacitor&oldid=940281525
  61. \end{verbatim}
  62. Essentially, what I learned today.
  63. \section{DIY Amp}
  64. I was flipping through Practical Electronics for Inventors\cite{Scherz}(page 959), when I came across an audio amplifier. He also gives one at the chapter on Semiconductors (pg. 467), although the former is more detailed. With a reasonably simple schematic available, and a high likelihood of it working, I say why not: let's build it up.
  65. I've noticed that the Lvpin LP-838 amplifier I'm using is underpowered for my two front speakers \footnote{Although it seems it would work for one channel, so two of them might be enough. It's rated for 20W, so that is about 20W per channel. It works at 20W for both, just that it heats up too much.}
  66. \section{References}
  67. \begin{thebibliography}{99}
  68. \bibitem{Scherz}
  69. Paul Scherz, and Simon Monk,
  70. \emph{Practical Electronics for Inventors}, fourth edition - 2016, McGraw Hill.
  71. \end{thebibliography}
  72. \end{document}