{"id":2627,"date":"2021-10-28T19:38:16","date_gmt":"2021-10-28T19:38:16","guid":{"rendered":"https:\/\/mc.scsiraidguru.com\/?page_id=2627"},"modified":"2024-03-04T01:02:44","modified_gmt":"2024-03-04T01:02:44","slug":"pi_relay","status":"publish","type":"page","link":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/","title":{"rendered":"pi_relay"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2627\" class=\"elementor elementor-2627\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-a129b0d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a129b0d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4066bcf\" data-id=\"4066bcf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2ea789d elementor-widget elementor-widget-image-gallery\" data-id=\"2ea789d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-gallery.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-image-gallery\">\n\t\t\t<div id='gallery-1' class='gallery galleryid-2627 gallery-columns-4 gallery-size-thumbnail'><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon landscape'>\n\t\t\t\t<a data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-slideshow=\"2ea789d\" data-elementor-lightbox-title=\"pb_pu_led_pd_led_9v_relay_both_led\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjY0MiwidXJsIjoiaHR0cHM6XC9cL21jLnNjc2lyYWlkZ3VydS5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzExXC9wYl9wdV9sZWRfcGRfbGVkXzl2X3JlbGF5X2JvdGhfbGVkLmpwZyIsInNsaWRlc2hvdyI6IjJlYTc4OWQifQ%3D%3D\" href='https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg'><img data-opt-id=1305583259  fetchpriority=\"high\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-slideshow=\"2ea789d\" data-elementor-lightbox-title=\"20211114_084215\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjY1NSwidXJsIjoiaHR0cHM6XC9cL21jLnNjc2lyYWlkZ3VydS5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzExXC8yMDIxMTExNF8wODQyMTUtcm90YXRlZC5qcGciLCJzbGlkZXNob3ciOiIyZWE3ODlkIn0%3D\" href='https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084215-rotated.jpg'><img data-opt-id=1231841162  fetchpriority=\"high\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084215-rotated.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-slideshow=\"2ea789d\" data-elementor-lightbox-title=\"20211114_084221\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjY1NCwidXJsIjoiaHR0cHM6XC9cL21jLnNjc2lyYWlkZ3VydS5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzExXC8yMDIxMTExNF8wODQyMjEtcm90YXRlZC5qcGciLCJzbGlkZXNob3ciOiIyZWE3ODlkIn0%3D\" href='https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084221-rotated.jpg'><img data-opt-id=1440654006  fetchpriority=\"high\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084221-rotated.jpg\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure><figure class='gallery-item'>\n\t\t\t<div class='gallery-icon portrait'>\n\t\t\t\t<a data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-slideshow=\"2ea789d\" data-elementor-lightbox-title=\"20211114_084225\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjY1MywidXJsIjoiaHR0cHM6XC9cL21jLnNjc2lyYWlkZ3VydS5jb21cL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjFcLzExXC8yMDIxMTExNF8wODQyMjUtcm90YXRlZC5qcGciLCJzbGlkZXNob3ciOiIyZWE3ODlkIn0%3D\" href='https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084225-rotated.jpg'><img data-opt-id=1380179878  data-opt-src=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/20211114_084225-rotated.jpg\"  loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%20150%20150%22%20width%3D%22150%22%20height%3D%22150%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20width%3D%22150%22%20height%3D%22150%22%20fill%3D%22transparent%22%2F%3E%3C%2Fsvg%3E\" class=\"attachment-thumbnail size-thumbnail\" alt=\"\" \/><\/a>\n\t\t\t<\/div><\/figure>\n\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b337d20 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b337d20\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5f44dbf\" data-id=\"5f44dbf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e92e3e0 elementor-widget elementor-widget-text-editor\" data-id=\"e92e3e0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I am using the Single Supply Level Logic Converter to get 5V for this project.<\/p><p>We will start with the 9V battery side of the relay.\u00a0 \u00a0Yes, I could use 120V or higher devices.\u00a0 9V is safe for novices.\u00a0\u00a0 <\/p><p>9V battery &#8211; 1.5V Red LED = 7.5V needs to be dissipated to save the Red LED.\u00a0 \u00a0Red LED is known to be 1.5V @ 20mA.\u00a0 So 7.5V \/ 0.020A = 375 \u03a9 for the minimum resistance.\u00a0 You have seen this on other projects of mine that I use a 470 \u03a9 resistor for a Red LED on a 9V battery.\u00a0 \u00a0Red button is for Red LEDs.\u00a0 White button is for White LEDs.\u00a0 \u00a0pd = Pull Down and pu = Pull Up.\u00a0 \u00a0Full code at bottom.<\/p><p>\u00a0<\/p><pre style=\"color: #000000; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; overflow-wrap: break-word; white-space: pre-wrap;\">pd_relay_pin = 19\npd_relay = OutputDevice(pd_relay_pin, active_high=True, initial_value=False)\npu_relay_pin = 21\npu_relay = OutputDevice(pu_relay_pin, active_high=True, initial_value=False)\n\npu_led_red = LED(17)\npd_led_white = LED(22)\npu_button_red = Button(18, pull_up=True)\npd_button_white = Button(24, pull_up=False)<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c584f1a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c584f1a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2978c9d\" data-id=\"2978c9d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e049807 elementor-widget elementor-widget-text-editor\" data-id=\"e049807\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3 style=\"text-align: center;\">Main.py<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e20219c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e20219c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8481738\" data-id=\"8481738\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8e79347 elementor-widget elementor-widget-text-editor\" data-id=\"8e79347\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre>from gpiozero import Button, LED, OutputDevice\nfrom time import sleep\n\npd_relay_pin = 19\npd_relay = OutputDevice(pd_relay_pin, active_high=True, initial_value=False)\npu_relay_pin = 21\npu_relay = OutputDevice(pu_relay_pin, active_high=True, initial_value=False)\n\npu_led_red = LED(17)\npd_led_white = LED(22)\npu_button_red = Button(18, pull_up=True)\npd_button_white = Button(24, pull_up=False)\n\nwhile True:\n    if pd_button_white.is_pressed:\n        print(\"*** Pull Up Button is pressed ***\")\n        pd_led_white.on()\n        pd_relay.on()\n\n    else:\n        print(\"Pull Up Button not pressed\")\n        pd_led_white.off()\n        pd_relay.off()\n\n    sleep(.5)\n    if pu_button_red.is_pressed:\n        print(\"*** Pull Down Button is pressed ***\")\n        pu_led_red.on()\n        pu_relay.on()\n\n    else:\n        print(\"Pull Down Button not pressed\")\n        pu_led_red.off()\n        pu_relay.off()\n    sleep(.5)<\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c83d69a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"c83d69a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e031b4c\" data-id=\"e031b4c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7d66dbc elementor-widget elementor-widget-text-editor\" data-id=\"7d66dbc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3 style=\"text-align: center;\">Kieran&#8217;s test of the circuit<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f14cd0e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f14cd0e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2613798\" data-id=\"2613798\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-98e2ba4 elementor-widget elementor-widget-video\" data-id=\"98e2ba4\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;video_type&quot;:&quot;hosted&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"e-hosted-video elementor-wrapper elementor-open-inline\">\n\t\t\t\t\t<video class=\"elementor-video\" src=\"https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2024\/03\/20211114_090340.mp4\" controls=\"\" preload=\"metadata\" controlsList=\"nodownload\"><\/video>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-9105c62 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9105c62\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-fbe83c4\" data-id=\"fbe83c4\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2e67e47 elementor-widget elementor-widget-text-editor\" data-id=\"2e67e47\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<h3 style=\"text-align: center;\">Ann&#8217;s test of a circuit<\/h3>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ba1a2e3 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ba1a2e3\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bcdd3f6\" data-id=\"bcdd3f6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-69c61af elementor-widget elementor-widget-video\" data-id=\"69c61af\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;video_type&quot;:&quot;hosted&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"e-hosted-video elementor-wrapper elementor-open-inline\">\n\t\t\t\t\t<video class=\"elementor-video\" src=\"https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2024\/03\/20211114_090925.mp4\" controls=\"\" preload=\"metadata\" controlsList=\"nodownload\"><\/video>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>I am using the Single Supply Level Logic Converter to get 5V for this project. We will start with the 9V battery side of the relay.\u00a0 \u00a0Yes, I could use 120V or higher devices.\u00a0 9V is safe for novices.\u00a0\u00a0 9V battery &#8211; 1.5V Red LED = 7.5V needs to be dissipated to save the Red [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":85,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"custom","ocean_center_header_left_menu":"0","ocean_custom_header_template":"7142","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","osh_disable_topbar_sticky":"default","osh_disable_header_sticky":"default","osh_sticky_header_style":"default","osh_sticky_header_effect":"","osh_custom_sticky_logo":0,"osh_custom_retina_sticky_logo":0,"osh_custom_sticky_logo_height":0,"osh_background_color":"","osh_links_color":"","osh_links_hover_color":"","osh_links_active_color":"","osh_links_bg_color":"","osh_links_hover_bg_color":"","osh_links_active_bg_color":"","osh_menu_social_links_color":"","osh_menu_social_hover_links_color":"","footnotes":""},"class_list":["post-2627","page","type-page","status-publish","hentry","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>pi_relay -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"pi_relay -\" \/>\n<meta property=\"og:description\" content=\"I am using the Single Supply Level Logic Converter to get 5V for this project. We will start with the 9V battery side of the relay.\u00a0 \u00a0Yes, I could use 120V or higher devices.\u00a0 9V is safe for novices.\u00a0\u00a0 9V battery &#8211; 1.5V Red LED = 7.5V needs to be dissipated to save the Red [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-04T01:02:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/\",\"url\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/\",\"name\":\"pi_relay -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/11\\/pb_pu_led_pd_led_9v_relay_both_led-150x150.jpg\",\"datePublished\":\"2021-10-28T19:38:16+00:00\",\"dateModified\":\"2024-03-04T01:02:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/#primaryimage\",\"url\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/11\\/pb_pu_led_pd_led_9v_relay_both_led.jpg\",\"contentUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/11\\/pb_pu_led_pd_led_9v_relay_both_led.jpg\",\"width\":1607,\"height\":838},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/pi_relay\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Raspberry Pi\",\"item\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/index.php\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"pi_relay\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#website\",\"url\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/\",\"name\":\"SCSIraidGURU MC World\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#\\\/schema\\\/person\\\/f21e3238456a7c2adea5944cb376cddc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/mc.scsiraidguru.com\\\/#\\\/schema\\\/person\\\/f21e3238456a7c2adea5944cb376cddc\",\"name\":\"Michael McKenney\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"url\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"contentUrl\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\",\"width\":2560,\"height\":1440,\"caption\":\"Michael McKenney\"},\"logo\":{\"@id\":\"https:\\/\\/mc.scsiraidguru.com\\/wp-content\\/uploads\\/2021\\/09\\/20210925_105558.jpg\"},\"sameAs\":[\"http:\\\/\\\/mc.scsiraidguru.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"pi_relay -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/","og_locale":"en_US","og_type":"article","og_title":"pi_relay -","og_description":"I am using the Single Supply Level Logic Converter to get 5V for this project. We will start with the 9V battery side of the relay.\u00a0 \u00a0Yes, I could use 120V or higher devices.\u00a0 9V is safe for novices.\u00a0\u00a0 9V battery &#8211; 1.5V Red LED = 7.5V needs to be dissipated to save the Red [&hellip;]","og_url":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/","article_modified_time":"2024-03-04T01:02:44+00:00","og_image":[{"url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/","url":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/","name":"pi_relay -","isPartOf":{"@id":"https:\/\/mc.scsiraidguru.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/#primaryimage"},"image":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/#primaryimage"},"thumbnailUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:150\/h:150\/q:mauto\/rt:fill\/g:ce\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg","datePublished":"2021-10-28T19:38:16+00:00","dateModified":"2024-03-04T01:02:44+00:00","breadcrumb":{"@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/#primaryimage","url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg","contentUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/11\/pb_pu_led_pd_led_9v_relay_both_led.jpg","width":1607,"height":838},{"@type":"BreadcrumbList","@id":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/pi_relay\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mc.scsiraidguru.com\/"},{"@type":"ListItem","position":2,"name":"Raspberry Pi","item":"https:\/\/mc.scsiraidguru.com\/index.php\/raspberry-pi\/"},{"@type":"ListItem","position":3,"name":"pi_relay"}]},{"@type":"WebSite","@id":"https:\/\/mc.scsiraidguru.com\/#website","url":"https:\/\/mc.scsiraidguru.com\/","name":"SCSIraidGURU MC World","description":"","publisher":{"@id":"https:\/\/mc.scsiraidguru.com\/#\/schema\/person\/f21e3238456a7c2adea5944cb376cddc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mc.scsiraidguru.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/mc.scsiraidguru.com\/#\/schema\/person\/f21e3238456a7c2adea5944cb376cddc","name":"Michael McKenney","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","url":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","contentUrl":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg","width":2560,"height":1440,"caption":"Michael McKenney"},"logo":{"@id":"https:\/\/mlbxg5wzacc0.i.optimole.com\/cb:FyJ0.12d22\/w:auto\/h:auto\/q:mauto\/f:best\/https:\/\/mc.scsiraidguru.com\/wp-content\/uploads\/2021\/09\/20210925_105558.jpg"},"sameAs":["http:\/\/mc.scsiraidguru.com"]}]}},"_links":{"self":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/comments?post=2627"}],"version-history":[{"count":86,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2627\/revisions"}],"predecessor-version":[{"id":7755,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/2627\/revisions\/7755"}],"up":[{"embeddable":true,"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/pages\/85"}],"wp:attachment":[{"href":"https:\/\/mc.scsiraidguru.com\/index.php\/wp-json\/wp\/v2\/media?parent=2627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}