<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: S32K144 Audio Generation with Simulink in Model-Based Design Toolbox (MBDT)</title>
    <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1796881#M8803</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Umut Ülker,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the request above, may I ask what application do you want to design?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, all microcontrollers' pins have a very limited current output (10-25mA), and they cannot be used as a&amp;nbsp;&lt;SPAN&gt;Class-D amplifier.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Instead,&lt;SPAN&gt;&amp;nbsp;the typical&amp;nbsp;diagram should be the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanvlad_0-1706533240959.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260529iA1A2EB85D80E40F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="stefanvlad_0-1706533240959.png" alt="stefanvlad_0-1706533240959.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The PWM pin from MCU is filtered and current is limited by a resistor that is feed to a driver, and its outputs is tied to the Load (speaker).&lt;/P&gt;
&lt;P&gt;The Driver can be an Op-Amp for low power application or headphones, or it can be a Class-D amplifier for speakers.&lt;/P&gt;
&lt;P&gt;A very simple schematic to test the Sine output from S32K144 is the following:&lt;/P&gt;
&lt;DIV id="tinyMceEditor_50c83e964b35castefanvlad_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanvlad_2-1706534961642.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260534i6C9C9569D2A2273C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stefanvlad_2-1706534961642.png" alt="stefanvlad_2-1706534961642.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where Vout is 5V, Q1 is a simple NPN transistor 2N3904 and the PWM output pin of the S32K144 is connected to R1 resistor with values from 220 to 1k Ohms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One simpler approach is to use the&amp;nbsp;&lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/hardware-tools-and-accessories/motor-control-shield-for-devkit:DEVKIT-MOTORGD" target="_blank"&gt;Motor Control Shield for DEVKIT&lt;/A&gt;&amp;nbsp;and plug it into the&amp;nbsp;&lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/s32k-mcu-platforms/s32k144-q100-evaluation-board-for-automotive-general-purpose:S32K144EVB" target="_blank"&gt;S32K144-Q100 Evaluation Board&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Then you can connect the speaker between the Phase A and Ground on the J13 (green) connector from the Motor Control Shield.&lt;/P&gt;
&lt;P&gt;There might be needed to add some capacitors in order to filter the output better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this information helps,&lt;/P&gt;
&lt;P&gt;Stefan V.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2024 13:33:11 GMT</pubDate>
    <dc:creator>stefanvlad</dc:creator>
    <dc:date>2024-01-29T13:33:11Z</dc:date>
    <item>
      <title>S32K144 Audio Generation with Simulink</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1792463#M8779</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to generate an audio output with sine wave generation on Simulink. With arranging the frequencies and duty cycle, i can currently output a sinusodial PWM from pins. I feed it into a basic low-cost class-AB amplifier. I was wondering if i can directly use s32k144 as a Class-D amplifier. This type of amplifier basically transforms analog signal into a high frequency PWM and then filters it to original signal with higher amplitude. S32k144 can output 0-5V PWM, so theoretically i can low-pass filter it and connect it to a speaker. My concern is the current consumption. Will the speaker try to consume more current? I think the maximum current is about 30mA in s32k144, please correct me if am wrong.&lt;/P&gt;&lt;P&gt;In summary, i am trying to generate audio with the PWM output of the microcontroller. Do i need to amplify it? I already have 0-5V output from PWM.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 22:07:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1792463#M8779</guid>
      <dc:creator>Umutulker</dc:creator>
      <dc:date>2024-01-21T22:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 Audio Generation with Simulink</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1796881#M8803</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;SPAN&gt;Umut Ülker,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the request above, may I ask what application do you want to design?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, all microcontrollers' pins have a very limited current output (10-25mA), and they cannot be used as a&amp;nbsp;&lt;SPAN&gt;Class-D amplifier.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Instead,&lt;SPAN&gt;&amp;nbsp;the typical&amp;nbsp;diagram should be the following:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanvlad_0-1706533240959.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260529iA1A2EB85D80E40F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="stefanvlad_0-1706533240959.png" alt="stefanvlad_0-1706533240959.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The PWM pin from MCU is filtered and current is limited by a resistor that is feed to a driver, and its outputs is tied to the Load (speaker).&lt;/P&gt;
&lt;P&gt;The Driver can be an Op-Amp for low power application or headphones, or it can be a Class-D amplifier for speakers.&lt;/P&gt;
&lt;P&gt;A very simple schematic to test the Sine output from S32K144 is the following:&lt;/P&gt;
&lt;DIV id="tinyMceEditor_50c83e964b35castefanvlad_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanvlad_2-1706534961642.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/260534i6C9C9569D2A2273C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stefanvlad_2-1706534961642.png" alt="stefanvlad_2-1706534961642.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Where Vout is 5V, Q1 is a simple NPN transistor 2N3904 and the PWM output pin of the S32K144 is connected to R1 resistor with values from 220 to 1k Ohms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One simpler approach is to use the&amp;nbsp;&lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/hardware-tools-and-accessories/motor-control-shield-for-devkit:DEVKIT-MOTORGD" target="_blank"&gt;Motor Control Shield for DEVKIT&lt;/A&gt;&amp;nbsp;and plug it into the&amp;nbsp;&lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/s32k-mcu-platforms/s32k144-q100-evaluation-board-for-automotive-general-purpose:S32K144EVB" target="_blank"&gt;S32K144-Q100 Evaluation Board&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Then you can connect the speaker between the Phase A and Ground on the J13 (green) connector from the Motor Control Shield.&lt;/P&gt;
&lt;P&gt;There might be needed to add some capacitors in order to filter the output better.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this information helps,&lt;/P&gt;
&lt;P&gt;Stefan V.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2024 13:33:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1796881#M8803</guid>
      <dc:creator>stefanvlad</dc:creator>
      <dc:date>2024-01-29T13:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 Audio Generation with Simulink</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1798676#M8816</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I was trying to generate audio signals from the s32k144.&lt;BR /&gt;Just as I thought, I need a MOSFET driver then for higher power outputs. My speaker can output maximum power of 9W. So the circuitry should be like this: PWM pins -&amp;gt; Filter -&amp;gt; MOSFET Drivers -&amp;gt; MOSFET bridge -&amp;gt; Speaker. Am I correct?&lt;BR /&gt;&lt;BR /&gt;Also, is there a better/easier way to generate audio with s32k144? Use of the DAC with Simulink?&lt;BR /&gt;&lt;BR /&gt;Thank you for your help!</description>
      <pubDate>Wed, 31 Jan 2024 12:28:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1798676#M8816</guid>
      <dc:creator>Umutulker</dc:creator>
      <dc:date>2024-01-31T12:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: S32K144 Audio Generation with Simulink</title>
      <link>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1799955#M8819</link>
      <description>&lt;P&gt;Hi Umut,&lt;BR /&gt;&lt;BR /&gt;Yes, for a speaker of that high power 9W, you will need a MOSFET bridge with driver, and details are in previous post regarding connections.&lt;BR /&gt;The simplest solution is to get the &lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/hardware-tools-and-accessories/motor-control-shield-for-devkit:DEVKIT-MOTORGD" target="_blank" rel="nofollow noopener noreferrer"&gt;Motor Control Shield for DEVKIT&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and plug it into the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.nxp.com/design/design-center/development-boards/automotive-development-platforms/s32k-mcu-platforms/s32k144-q100-evaluation-board-for-automotive-general-purpose:S32K144EVB" target="_blank" rel="nofollow noopener noreferrer"&gt;S32K144-Q100 Evaluation Board&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you will need only a 12Vdc Power Supply, and you can connect the speaker&amp;nbsp;&lt;SPAN&gt;on the J13 (green) connector from the Motor Control Shield.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;A guide for getting started with the boards above is written in the page:&amp;nbsp;&lt;A href="https://www.nxp.com/document/guide/getting-started-with-the-s32k144-bldc-pmsm-development-kit:GS-MCSPTE1AK144" target="_blank" rel="noopener"&gt;Getting Started with the S32K144 BLDC/PMSM Development Kit | NXP Semiconductors&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanvlad_0-1706795294295.png" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/261371i7FB3DE5F8598E688/image-size/large?v=v2&amp;amp;px=999" role="button" title="stefanvlad_0-1706795294295.png" alt="stefanvlad_0-1706795294295.png" /&gt;&lt;/span&gt;In order to generate a better Audio signal, filters are needed and regarding the output of MCU, the&amp;nbsp;16-bit FlexTimer (FTM) can generate a much higher PWM resolution than the 8bit DAC inside the S32K144.&lt;BR /&gt;&lt;BR /&gt;You're welcome,&lt;BR /&gt;Stefan V.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 13:51:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Model-Based-Design-Toolbox-MBDT/S32K144-Audio-Generation-with-Simulink/m-p/1799955#M8819</guid>
      <dc:creator>stefanvlad</dc:creator>
      <dc:date>2024-02-01T13:51:36Z</dc:date>
    </item>
  </channel>
</rss>

