<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library</link><description>Hi Sigurd, 
 Thank you for your reply. I have executed the code given by you (below link) in Segger studio(V 3.50) I observed that the output or load (pin 31) which is connected to ac fan is running at the set duty cycle for a while(few seconds) and it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Dec 2018 15:57:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library" /><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/160051?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 15:57:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af3baace-c40a-4554-9a33-442e7746bacb</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Ok, but the output PWM from the&amp;nbsp;&lt;span&gt;nRF52840&amp;nbsp;pin is OK ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How often does the zero-cross happen? 50 Hz?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/159547?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 12:23:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4217042f-09ce-469e-9d54-7055d80c4f1c</guid><dc:creator>shashi kumar</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Output waveform in the oscilloscope means at the load. kindly, refer the above circuit diagram which I attached previously.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/159432?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 14:23:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59aaf248-2f5e-4355-af95-bd9bf525f383</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="75206" url="~/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library/159394"]output wave forms in the oscilloscope[/quote]
&lt;p&gt;Is this the PWM output from the nRF52840 measured on the out pin? Or is it measured on the&amp;nbsp;TRIAC, or some other component?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/159394?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 11:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ac932e6-892c-4496-8f18-a129e66fd476</guid><dc:creator>shashi kumar</dc:creator><description>&lt;p&gt;Dear Sigurd,&lt;/p&gt;
&lt;p&gt;I have checked the output wave forms in the oscilloscope I observed that for few half cycles signal is skipped(flickering/disturbance). There is no continuity in the output signal.&amp;nbsp;Can you suggest&amp;nbsp;a way to control it smoothly at constant speed(desired value).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/159340?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 05:13:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e5b7e7f-5e09-4cf2-b3d6-bdeaf6a8929e</guid><dc:creator>shashi kumar</dc:creator><description>&lt;p&gt;Thank you...!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158990?ContentTypeID=1</link><pubDate>Mon, 26 Nov 2018 10:15:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e5e44c-b492-404f-9b77-20bedf3efe24</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="75206" url="~/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library/158899"]The only issue is there is some flickering effect[/quote]
&lt;p&gt;You will need to&amp;nbsp;identify the root cause of the flickering. Use&amp;nbsp;oscilloscope(s) and/or&amp;nbsp;logic analyzer and try to find if there is any flickering/disturbance in some the signals somewhere.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158899?ContentTypeID=1</link><pubDate>Sat, 24 Nov 2018 05:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05c63fac-648e-4da8-baab-1602e3f7c3a6</guid><dc:creator>shashi kumar</dc:creator><description>&lt;p&gt;Thank you for the support, I am getting the desired output according to the set duty cycle. The only issue is there is some flickering effect(slightly winding sound at low speeds). How can I&amp;nbsp;run the fan smoothly?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158880?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 15:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7cd72f4-69d5-4bd7-8362-c4ee90c03470</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Are you sure that&amp;#39;s how the fan actually works?&lt;/p&gt;
&lt;p&gt;The speed of an AC motor is not necessarily related to the voltage - depending on the type of motor, it may be defined by the frequency.&lt;/p&gt;
&lt;p&gt;If you really do want to do a variable &lt;em&gt;voltage&lt;/em&gt; AC output, then it&amp;#39;s the amplitude that you need to vary - not the duty cycle of the waveform.&amp;nbsp; In that case, I think you need to go back to the basics of how to synthesise a waveform using PWM ...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Pulse-width_modulation"&gt;https://en.wikipedia.org/wiki/Pulse-width_modulation&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158877?ContentTypeID=1</link><pubDate>Fri, 23 Nov 2018 15:24:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4ac2374-5ec6-487e-8191-e6c862627b67</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;So what is the issue now? You need to set the duty cycle to 3 different values, based on some user input?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158621?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 12:23:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0380e418-35c6-439d-badc-f659c6ce7dce</guid><dc:creator>shashi kumar</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thank you for the suggestion. I am getting the fan speed as per my desired value but voltage and frequency is varying.&lt;/p&gt;
&lt;p&gt;1. Yes, we need to have 50Hz PWM signal with varying duty cycle, at the same time the voltage at the output should be constant with respect to the set (desired value) duty cycle.&lt;/p&gt;
&lt;p&gt;For example, if duty cycle is 50, output voltage at the load should be say 120V. similarly, if duty cycle is 75, o/p voltage should be 170V(approx.) and for the max duty cycle voltage should be 230V. But, the frequency should be 50Hz fixed as of the input AC supply frequency i.e.,50Hz only.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To be more specific, I want to control the AC fan using Nordic (nrf52840)instead of fan voltage regulators we generally use.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2. Yes, if the input from ZCD (pin 30) is high PWM signal should stop as per the circuit the TRIAC will drive the previous value continuously until the next zero crossing is detected.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: controlling AC fan with pwm library</title><link>https://devzone.nordicsemi.com/thread/158465?ContentTypeID=1</link><pubDate>Wed, 21 Nov 2018 14:37:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cb009f1-db73-4e49-8d28-aff5ac397d1b</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="75206" url="~/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library"]duty cycle for a while(few seconds)[/quote]
&lt;p&gt;The PWM signal will be generated as long as pin 30 is low.&lt;/p&gt;
[quote userid="75206" url="~/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library"]and it is going to high value automatically.[/quote]
&lt;p&gt;If you want it to be low instead, you can change this by setting the pin polarity to active high.&lt;/p&gt;
&lt;p&gt;Snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void pwm_init()
{
    uint32_t err_code;
    app_pwm_config_t pwm1_cfg = APP_PWM_DEFAULT_CONFIG_1CH(20000L,DATA);
    /* Initialize and enable PWM. */
    pwm1_cfg.pin_polarity[0] = APP_PWM_POLARITY_ACTIVE_HIGH;
    err_code = app_pwm_init(&amp;amp;PWM1,&amp;amp;pwm1_cfg,pwm_ready_callback);
    APP_ERROR_CHECK(err_code);
    app_pwm_enable(&amp;amp;PWM1);   
}&lt;/pre&gt;&lt;/p&gt;
[quote userid="75206" url="~/f/nordic-q-a/40760/controlling-ac-fan-with-pwm-library"]with same frequency (how to set 50Hz) at different speeds (say 4 different speeds proportionally)[/quote]
&lt;p&gt;1) So you need a 50Hz PWM signal, with varying duty cycle?&lt;/p&gt;
&lt;p&gt;2) Should the PWM signal stop when pin 30 is high?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>