{"id":721,"date":"2023-08-22T18:10:55","date_gmt":"2023-08-22T18:10:55","guid":{"rendered":"https:\/\/savvaspanagi.com\/?p=721"},"modified":"2023-08-30T06:47:15","modified_gmt":"2023-08-30T06:47:15","slug":"arduino-bluetooth-remote-with-smartphone","status":"publish","type":"post","link":"https:\/\/savvaspanagi.com\/?p=721","title":{"rendered":"How to use 0-5v plc to control the speed of high current dc motor"},"content":{"rendered":"\n<p class=\"has-ast-global-color-2-color has-text-color\">A lot of DIY projects need a programmable microcontroller to control the operation of it. In the current article we will discuss a suitable industrial module to control a dc motor speed. The following article is my inspiration after i am trying to building a small project that need to connect Arduino with motor controller to control the speed. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-5 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-3 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p class=\"has-text-align-left has-ast-global-color-2-color has-text-color\">Base on my personal experience I have bought the following controller: <a href=\"https:\/\/www.aliexpress.com\/item\/1005003949611503.html?spm=a2g0o.productlist.main.1.e4b0336ffjH8Z4&amp;algo_pvid=c49e8908-e869-48b3-85b9-7ba90d3e744c&amp;algo_exp_id=c49e8908-e869-48b3-85b9-7ba90d3e744c-0&amp;pdp_npi=4%40dis%21EUR%214.24%213.61%21%21%2132.74%21%21%40211b88f116933178415294040e0203%2112000027540721041%21sea%21CY%21941457139%21&amp;curPageLogUid=JmzG6szt1JpA\"><span style=\"text-decoration: underline;\">Aliexpress<\/span><\/a><\/p>\n\n\n\n<p class=\"has-ast-global-color-2-color has-text-color\">If the above link is not available any more you can find similar controller by keyword CCMHCN\u00a0<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/savvaspanagi.com\/wp-content\/uploads\/2023\/08\/image-5.png\" alt=\"\" class=\"wp-image-879\" style=\"width:328px;height:328px\" width=\"328\" height=\"328\"\/><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p class=\"has-ast-global-color-2-color has-text-color\">With this type of controller, you can use PWM Arduino output or some other microcontroller output and control the yellow and red signal from the above image. In the other side of controller you have to connect the motor and the power supply. If we assume that the power supply nominal voltage was 12V, this mean that the 5v input signal gives 12v output signal and 2.5v input signal gives 6v output signal and so on. <\/p>\n\n\n\n<p class=\"has-ast-global-color-2-color has-text-color\">In the following code an example of use Arduino to test the operation of the controller is represent. Using serial communication you can give a range of values between 0-10 and it will transform from 0 to 255 PWM output which is 0-5v. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n#include &quot;MapFloat.h&quot; \/\/Library Source: https:\/\/github.com\/radishlogic\/MapFloat\nfloat PWMVal = 0;        \nconst int pinOut = 3; \/\/ PWM Pin of Arduino Nano         \n\n\nvoid setup() {\n  Serial.begin(9600);\n}\n\n\nvoid loop() {\n  while (Serial.available()&gt;0){\n  String myString = Serial.readString(); \/\/ Read as String\n  float myFloat = myString.toFloat();   \/\/ Convert it to float\n  float PWMVal = mapFloat (myFloat, 0,10.0,0,255); \/\/ 0-&gt;0 , 10-&gt;255\n  analogWrite(pinOut, PWMVal);        \/\/ Output\n  Serial.print(&quot;LEVEL = &quot;);\n  Serial.println(myFloat);           \n  Serial.print (&quot;PMW VALUE = &quot;);\n  Serial.println (PWMVal);\n  Serial.println(&quot;----------------------------&quot;);\n  }\n}\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>A lot of DIY projects need a programmable microcontroller to control the operation of it. In the current article we will discuss a suitable industrial module to control a dc motor speed. The following article is my inspiration after i am trying to building a small project that need to connect Arduino with motor controller &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/savvaspanagi.com\/?p=721\"> <span class=\"screen-reader-text\">How to use 0-5v plc to control the speed of high current dc motor<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","rttpg_featured_image_url":null,"rttpg_author":{"display_name":"Savvas Panagi","author_link":"https:\/\/savvaspanagi.com\/?author=1"},"rttpg_comment":1,"rttpg_category":"<a href=\"https:\/\/savvaspanagi.com\/?cat=6\" rel=\"category\">Arduino<\/a>","rttpg_excerpt":"A lot of DIY projects need a programmable microcontroller to control the operation of it. In the current article we will discuss a suitable industrial module to control a dc motor speed. The following article is my inspiration after i am trying to building a small project that need to connect Arduino with motor controller&hellip;","_links":{"self":[{"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/posts\/721"}],"collection":[{"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=721"}],"version-history":[{"count":15,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/posts\/721\/revisions"}],"predecessor-version":[{"id":890,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=\/wp\/v2\/posts\/721\/revisions\/890"}],"wp:attachment":[{"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savvaspanagi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}