element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products & Partners
    Products & Partners
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum DIY Car Audio DSP Build — Tang Nano 9K + Orange Pi Zero 3.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 627 subscribers
  • Views 182 views
  • Users 0 members are here
Related

DIY Car Audio DSP Build — Tang Nano 9K + Orange Pi Zero 3.

JamesdaLion
JamesdaLion 4 days ago

on my 2025 camry hybrid my audiocontrol lc2i took a crap on me and instead of buying another one i decided to just build my own dsp out of boards i already have laying on the bench

im running a skar audio setup (components and 12s) with a second optima yellowtop battery, a 4 farad capacitor and a victron 12/12-30a dc-dc charger to power my 1200 and 1000 watt rms amps. so power is solid. mainly just trying to fix the factory bass drop off from the stock stereo and be able to adjust my eq and crossovers from my phone with no lag

heres the parts im using for it

* sipeed tang nano 9k fpga: handles all the actual sound processing in real time so there is zero delay

* orange pi zero 3 (4gb): hooked up to the tang nano to host a local web page so i can pull it up on my phone and change the tuning on the fly

* pcm1808 stereo adc: grabs the signal coming off the factory speaker wires and turns it into digital audio for the tang nano

* pcm5102a stereo dacs (2 or 3 of them): turns the sound back into clean rca outputs for my amps. running thee for 6channels

* power and input protection: putting together a little board with resistors, caps, and diodes to drop the speaker voltage down so it doesnt fry the pcm1808, plus an isolated 12v to 5v converter and a pc817 optocoupler for the remote wire so i dont get ground loop or inverter noise

still waiting on the adc and dac boards to get here then im gonna breadboard it and test passing audio through

reason for the post is anyone have insight on problems I will have with this build and I'm aware it's probably fairly basic. you all have any wizard ways that can improve my build or take it to the next level. I don't want to go to my trunk to tune in my system anymore the back and forth sucks and it's still not getting it where I want it.

  • Sign in to reply
  • Cancel
Parents
  • michaelkellett
    michaelkellett 4 days ago

    I can sort of guess what you are doing but some diagrams would make it clearer.

    The audio converters are very susceptible to psu noise. 

    The Tang Nano 9k is a pretty light weight FPGA - do you have DSP code for it  (and have you used one before ?))

    MK

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
  • JamesdaLion
    JamesdaLion 3 days ago in reply to michaelkellett

    appreciate the feedback! yeah a diagram definitely helps make the layout way clearer. heres the rough signal chain im putting together:

    [Camry Speaker Outs]

           |

           v  (Resistors + 10uF Non-Polar Caps + Clamp                Diodes)

    [PCM1808 Stereo ADC] <--- 5V Analog (LDO) / 3.3V Digital

           |

           | (I2S: MCLK, BCK, LRCK, DOUT)

           v

    [Tang Nano 9K FPGA] <---> (SPI Control) <---> [Orange Pi Zero 3] (Web UI)

           |

           | (I2S Out: BCK, LRCK, DIN x2 or x3)

           v

    [PCM5102A Stereo DACs] ---> [RCA Line Outs to Skar Amps]

    [Optima YellowTop 12V] ---> [Isolated 12V-to-5V DC-DC] ---> [Linear LDO Regulators] ---> Converters

    [Factory ACC 12V] --------> [PC817 Optocoupler] ---------> Remote Wake-Up

    good call on the psu noise too. since hybrid dc-dc converters and cheap buck modules can dump a ton of switching hash right onto the rails, im putting an isolated 12v to 5v converter after my secondary optima battery, and then dropping it through separate low-noise linear regulators (ldos) just for the pcm1808 analog side and the pcm5102a dacs so the digital switching from the orange pi and fpga stays off their power rails

    as for the tang nano 9k, nah this is actually my first time doing audio dsp on it so im learning the verilog side as i go. i know its a pretty lightweight chip (only 20 of the 18x18 dsp blocks), so im not trying to run a bunch of parallel filters at once. the plan is to run it at 24.576 mhz which gives me 512 clock cycles per 48khz sample, and just time-multiplex a couple of hardware multipliers to step through the biquad filter math sequentially

    all the heavy float math for the eq curves and crossovers gets calculated in python on the orange pi zero 3, then it just blasts the fixed-point coefficients over spi to the fpga registers

    still working on putting together the basic i2s pass-through and biquad state machine in gowin eda while i wait for the boards to get here. if youve got any tips on filtering the analog power rails for these pcm chips or keeping fixed-point audio from overflowing on gowin fpgas im definitely all ears!

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 3 days ago in reply to JamesdaLion

    Most audiophiles would say that the clock jitter is critically important for good audio. If that bothers you then you should clock the ADC and DAC from an ultra low jitter clock. You can generate the FPGA clock from that (and use its PLL if you need it to run at  a multiple of the converter master clock). The point is that you shouldn't clock the converters from the FPGA pll clock. 

    It would be better if your signal source used line outputs rather than speaker outputs (then you would avoid the noise and distortion of the speaker amplifier (if it's a switching amplifier this is more important)) - but you may not have that choice unless you are prepared to delve into the works of the source.

    I've always used MATLAB to generate filter coefficients - it is good at designing filters which don't go wild  0  there are low cost not for profit versions but you may well find free stuff on the web that can do the same.

    Your FPGA clocked at 25MHz is not that fast - you can get a micro with 32bit (or even 64bit) hardware floating point that clocks at over 400MHz.  It takes 4 x  18bit Gowin multipliers to make a 32 bit multiplier so the processor has a number crunching edge of x 3.2. You might well be able to clock the FPGA x2 or x4  faster.

    If it were me I wouldn't bother with the FPGA for this (although I can understand that you might just fancy doing it that way !)

    This is a low noise bipolar linear regulator I used on a very fancy gas detector:

    image

    The +/- 7V supplies came from a 12V battery supply and had to be isolated from it - I used a special transformer (wound by me) with multiple (3) 7-0-7 outputs. The transformer was driven by an LT3439. The linear stuff in front of it regulates the input to the LT3439 so that the system processor had control over the 7-0-7 supplies (the regulators don't mind them being higher but we wanted to keep the heat down.) The switching rate of the LT3439 is controlled by the sync input so that it is locked to the ADC sampling frequency. This is probably over the top for your application !

    image

    image

    Gas sensor board, power section bottom right.

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • michaelkellett
    michaelkellett 3 days ago in reply to JamesdaLion

    I'll be very interested to see how it looks when you are done.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • michaelkellett
    michaelkellett 3 days ago in reply to JamesdaLion

    I'll be very interested to see how it looks when you are done.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube