<?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>Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28619/relay-doesnt-work-toggling-gpio-output-how-can-pull-it-down</link><description>Hi triying to drive a Relay with Output but have tried every functon in &amp;quot;nrf_gpio.h&amp;quot; 
 this works with a LED perfectly :
nrf_gpio_pin_toggle(23); 
 in the main i configure : 
 nrf_gpio_cfg_output(23);
nrf_gpio_pin_write(23, 0); 
 but the relay dont</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Dec 2017 07:34:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28619/relay-doesnt-work-toggling-gpio-output-how-can-pull-it-down" /><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113443?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 07:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d2c4a522-ed94-4ea7-b2d7-67ab6ec7c3f7</guid><dc:creator>J&amp;#248;rn</dc:creator><description>&lt;p&gt;Pin 22 is configured as push-pull by default. Your configuration of the pin seems to be correct so it should not be necessary to do anything more. Could you measure the pin, with a multimeter, logic analyzer or oscilloscope, to ensure it is toggling as intended?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113442?ContentTypeID=1</link><pubDate>Wed, 20 Dec 2017 06:38:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f1e5f92-f52b-4f8b-9105-d5c60ed903b6</guid><dc:creator>acidguy</dc:creator><description>&lt;p&gt;Hi, the Relay is activated all the time because the Voltage of NRF51822 is enough to do it, the deactivate it i need 0v or ground, for example in STM32 i dot this : &lt;a href="http://i65.tinypic.com/291m80n.jpg"&gt;i65.tinypic.com/291m80n.jpg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;how can the pin23 made &amp;quot;output push/pull&amp;quot; thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113441?ContentTypeID=1</link><pubDate>Tue, 19 Dec 2017 08:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe0c8d60-dae0-4f2b-9ddc-2d64cae99feb</guid><dc:creator>J&amp;#248;rn</dc:creator><description>&lt;p&gt;Hello acidguy&lt;/p&gt;
&lt;p&gt;When a pin on the nRF51822 is configured as an output, setting it high will source current, and setting it low will sink current. The exception to this is if you specifically configure it to disconnect on either high or low. As long as you haven&amp;#39;t done that, there is no need to use any additional pull-up or pull-downs.&lt;/p&gt;
&lt;p&gt;As RK mentioned driving a relay straight from a GPIO may not be the best idea. The GPIO are limited in how much current they can source/sink, as well as how large voltage they can withstand. See page 38 and 66 of the nrf51822 &lt;a href="http://infocenter.nordicsemi.com/pdf/nRF51822_PS_v3.3.pdf"&gt;product specification&lt;/a&gt; for the absolute maximum ratings and the electrical specifications of the GPIO respectively.&lt;/p&gt;
&lt;p&gt;I found the &lt;a href="http://old.ghielectronics.com/downloads/man/20084141716341001RelayX1.pdf"&gt;datasheet&lt;/a&gt; for the relay in your picture. Its markings indicate that this relay has a nominal coil voltage of 12VDC, and a nominal coil current of 30mA. Both of these are far beyond what the nRF51 is capable of producing, and I would recommend you use a proper relay driving circuit.&lt;/p&gt;
&lt;p&gt;You mention it is already driven by a transistor, do you have a link to the specification of the specific module you are using?&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jørn Frøysa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113440?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 04:23:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:672d994c-a483-4490-af92-a330944bf938</guid><dc:creator>acidguy</dc:creator><description>&lt;p&gt;circuit its ok its on a ble400 board and its receiving energy from the Computer, do you know how to activate the pulldown resistor in a Output Pin?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113439?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 04:20:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8639f76c-d2ff-4829-89cc-f8422e33a9d4</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;also claims to need a 5v battery. If you&amp;#39;re hooking nRF chips up to 5v then bad things are going to happen. If you are hooking that relay module up to 3v3 it&amp;#39;s impossible to say whether or not it will work.&lt;/p&gt;
&lt;p&gt;Either way those are the correct functions for turning a pin high and low so either you don&amp;#39;t have enough voltage on the relay to activate it, or you don&amp;#39;t have common ground, or you&amp;#39;ve blown up the GPIO&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113438?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 04:13:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14f4a340-c431-4c33-a113-b1aa708d159f</guid><dc:creator>acidguy</dc:creator><description>&lt;p&gt;Hi it does not need any curent since is this module controlled by a transistor : &lt;a href="https://i.stack.imgur.com/PwhHT.png"&gt;i.stack.imgur.com/PwhHT.png&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it just need a pulldown output gpio, the chip actually turns it all the time on with the current, it needs 0v or ground in a pin to turn it down.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relay doesnt work toggling GPIO Output? how can pull it down</title><link>https://devzone.nordicsemi.com/thread/113437?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2017 04:00:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b6b62ee-db1b-4abe-82b5-9d3fe8255bb3</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;A relay. How much current does your relay coil need to operate, what voltage? The GPIOs on the nRF series are  VERY current limited and work only to the voltage on the chip which may be 3.3v, they are not the monster 5-10mA outputs some of the STM and Atmel etc chips have.&lt;/p&gt;
&lt;p&gt;I wouldn&amp;#39;t even think of considering driving a relay from an nRF chip without a transistor to drive it, and a reverse diode (flyback)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>