<?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: Controlling Relay with Micro controller. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243811#M6201</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, GPIO to resistor.&lt;/P&gt;&lt;P&gt;You can use any timer (TPM, LPTMR) to generate a basetime to count seconds and drive the pin when you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2013 10:10:12 GMT</pubDate>
    <dc:creator>LuisCasado</dc:creator>
    <dc:date>2013-05-17T10:10:12Z</dc:date>
    <item>
      <title>Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243808#M6198</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;I am using Kinetis KLO M0 family as requirement and I have to&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;run a relay that is supplying 277VAC @ 5A to the load.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;Also I need to be turning it ON and OFF every 9 seconds. I am&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;wondering which outputs should I be using.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;I can design the power conversion needed, but I am not much&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;familiar with Microcontroller.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 20:01:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243808#M6198</guid>
      <dc:creator>victorrod</dc:creator>
      <dc:date>2013-05-16T20:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243809#M6199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use any GPIO of KL0x MCU. But you will need a external driver, a small transistor is enough, a darlington transistor is much better, like MPSA14. It depens on the voltage and current you need in the relay coil, tipically 12V and some mA. You will need a parallel diode with the relay coil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.onsemi.com/pub_link/Collateral/MPSA13-D.PDF"&gt;http://www.onsemi.com/pub_link/Collateral/MPSA13-D.PDF&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2013-05-16_224143.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/119356i243E94FB068C13D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="2013-05-16_224143.png" alt="2013-05-16_224143.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you need to drive multiple relays, you can use an ULN2803, for example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 20:43:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243809#M6199</guid>
      <dc:creator>LuisCasado</dc:creator>
      <dc:date>2013-05-16T20:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243810#M6200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So GPIO of KLOx MCU is connected to TTL input of the transistor??&lt;/P&gt;&lt;P&gt;Also which clock should I use to drive the circuit ON and OFF every 9 second?&amp;nbsp; and how will it control my GPIO output?&lt;/P&gt;&lt;P&gt;(MCGOUTCLK, MCGFLLCLK, MCGPLLCLK, OR something else??)&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Victor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 21:33:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243810#M6200</guid>
      <dc:creator>victorrod</dc:creator>
      <dc:date>2013-05-16T21:33:38Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243811#M6201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, GPIO to resistor.&lt;/P&gt;&lt;P&gt;You can use any timer (TPM, LPTMR) to generate a basetime to count seconds and drive the pin when you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 10:10:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243811#M6201</guid>
      <dc:creator>LuisCasado</dc:creator>
      <dc:date>2013-05-17T10:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243812#M6202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;Since I am a beginner I am looking for options to do the timing easily. &lt;/P&gt;&lt;P&gt;I also have a requirement of linking the relay to ON/ OFF button&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. time delay function in while loop,&lt;/P&gt;&lt;P&gt;But I dont know what other variables and module would I have to initialize? Would it calculate internally and just put the trigger after every assigned delay time?&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;while (1) {&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _io_ioctl(file1, GPIO_IOCTL_WRITE_LOG1, NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(9000);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _io_ioctl(file1, GPIO_IOCTL_WRITE_LOG0 NULL);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay(1000);&lt;BR /&gt;}&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;2.&amp;nbsp; Use PWM to control the transistor.&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I will have to learn how to set TPM for PWM.&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/319470#319470"&gt;https://community.freescale.com/message/319470#319470&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/message/63827#63827"&gt;https://community.freescale.com/message/63827#63827&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Looks like I will also have to learn how to divide clocks, so use EXTAL (which is 8MHz) then learn how to code/ set TPM overflow&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;and then learn how to link it to GPIO output. &lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;3. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;Designer can use a PIT timer to generate a periodic 9 seconds interrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: arial, sans-serif; font-size: 12.800000190734863px; background-color: #ffffff;"&gt;And in the PIT interrupt service routine, customer can set relay control pin output status.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Do you have any examples that I could read that will help me understand how GPIO timings can be adjusted&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Thanks&lt;/P&gt;&lt;P style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 16:24:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243812#M6202</guid>
      <dc:creator>victorrod</dc:creator>
      <dc:date>2013-05-17T16:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243813#M6203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you want to use PWM in this way, if you mean to use it to turn the relay on and off.&lt;/P&gt;&lt;P&gt;I also don't think you need to use two threads on the forum, but that is your choice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have given us the full requirements of your application, it might be simpler to not use MQX and use PE to setup an IO bit and a timer. You will certain learn more about MCUs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 17:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243813#M6203</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2013-05-17T17:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Relay with Micro controller.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243814#M6204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of the requirements is to use Freescale Kinetis KLO cortez ARM microcontrollers.&lt;/P&gt;&lt;P&gt;@Jim to reply you,&lt;/P&gt;&lt;P&gt;Yes I will be driving Relay by driving the transistor or the FET using the MCU.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 18:19:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Controlling-Relay-with-Micro-controller/m-p/243814#M6204</guid>
      <dc:creator>victorrod</dc:creator>
      <dc:date>2013-05-17T18:19:04Z</dc:date>
    </item>
  </channel>
</rss>

