The world grows in population with rising demand for energy. The environment is much affected by emissions from excessive usage of energy sources, particularly the fossil fuels in transportation, which are producing high amount of Carbon Dioxide (CO2). Concerns over pollution and climate change issues are motivating researchers and engineers to find robust solutions. One of the challenges is to discover low CO2 emission fuels. For instance, natural gas emits up to 70% percent less CO2 than diesel fuel. As a result, the invention of dual-fueled engines took place as a reliable alternative. Diesel-CNG dual fuel (DDF) engine is one of the best approaches to protect the environment, reduce energy consumptions and eliminate pollution. Since it uses diesel and compressed natural gas (CNG), the DDF engine shows very low emissions compared to conventional diesel engine. The DDF engine for the commercial vehicles uses manual CNG-air mixer to partially replace the diesel fuel with the CNG. The proposed motorized CNG-air mixer (MCM) was designed and fabricated to replace the manually actuated CNG-air mixer which needs further optimizations. However, the proposed MCM mixer offers the ability to electronically control and optimize CNG-air mixture and eventually enhance its quality. The objective is to design, simulate and develop an embedded system to control the opening and closing of CNG inlet valve inside the proposed MCM mixer. This embedded system aimed to control bi-polar stepper motor in bi-directional technique by using the high-speed and low-cost PIC16F887 microcontroller chip. The stepper motor was derived by the ASTROSYN P403 stepper motor driver. The inputs of the system were from potentiometers/ sensors.The complete integrated system was simulated and tested as a prototype. The embedded system has 100% accuracy of the simulation and experimental results of PWM1 and PMW2 duty cycle. It has good accuracy up to 75% when comparing the simulation and the experimental res