
Closed
Posted
I have an Arduino-based setup that drives DC motors and I need clean, well-commented code that handles speed control, direction changes, and automated stopping. The sketch can be written from scratch or built on what I already have; either way, I want the final file to compile error-free in the current Arduino IDE and be easy for me to tweak later. Here’s the core logic I’m after: • Speed control – PWM or another reliable method that lets me adjust RPM smoothly from zero to full throttle. • Direction control – forward/reverse switching triggered by a digital input or a serial command. • Automated stopping – when a limit switch, sensor, or timed event is triggered the motor should brake or coast to a halt, then wait for the next command. If a standard H-bridge driver library (e.g., built-in PWM pins, L298N, DRV8871, etc.) makes things simpler, feel free to use it; just note it clearly in the comments so I know what hardware you assumed. Please structure the code so pin assignments, speed limits, and debounce times sit in a single block of #defines or constants for quick edits. Before delivery, confirm the logic on your end—Serial Monitor printouts for each state change are enough. Hand over the .ino file, any custom libraries, and a short read-me explaining setup and test steps.
Project ID: 40685497
27 proposals
Remote project
Active 4 days ago
Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
27 freelancers are bidding on average $37 AUD/hour for this job

As a full-service R&D company specializing in embedded systems like the Arduino, I am well-versed in your project needs. With a solid understanding of electrical engineering and experience in writing clean code, my priority is to ensure compilation is error-free both now and for any future changes. Additionally, with my background in robotics, I am well-acquainted with PWM and other reliable methods of speed control you require. One area where I stand out is in my attention to detail and organization. Noting your preference for a one-block structure for easy editing means I'll provide you with inline comments that explicitly specify the hardware assumed (whether it's the built-in PWM pins, L298N or DRV8871). This will enable you to make future modifications quickly without any ambiguity. Lastly, as part of Integrated Technologies we not only provide solutions but also fully-documented ones, so you won't have any issues understanding the setup or test steps; we shall include a short read-me explaining all necessary details upon completion. Your satisfaction is our utmost priority and I'm confident my skills and experience make me the perfect fit for this project.
$50 AUD in 40 days
7.6
7.6

Dear [Hiring Manager], As an electrical engineer experienced in Digital Motor Control encompassing DC motors, Arduino, and robotics, I am perfectly suited to deliver the clean code you are seeking. My skills lie predominantly within the hardware design and control loop generation for various motors including BLDC ones. This means that not only can I help with precise speed and direction control usin your Arduino setup, but I am also well-versed in properly assimilating standard H-bridge driver libraries into such designs. In addition, my experience extends to power electronics which is crucial for efficient motor control, especially when automating starts and stops based on various triggers. By applying limit switch sensors or timer-based events effectively, my solutions maintain accurate operation even at low speeds. This will fulfil your request of braking or coasting to halt before waiting for further commands as you desire. Furthermore, my proficiency in embedded systems and microcontrollers adds value to my Arduino programming capabilities. I can confidently deliver a well-commented code that not only performs the tasks you outlined, but is also easily modifiable in the future if needed. Let my expertise and meticulousness elevate your Arduino project by ensuring excellent functionality on all fronts. Thank you for considering my contribution to this exciting venture!
$25 AUD in 20 days
7.5
7.5

Hi, may i asked which arduino variant you are going to use and what's the spec of the DC motor? may be i can create the code under 2 hour depends on the microcontroller variant, the DC motor spec, and motion needed. leave me a message to discuss further detail, I have 11 years of experience in embedded system engineering
$40 AUD in 40 days
6.9
6.9

Since 2003 I am working in Digital Electronic. So more than 18 years of experience in Electronics. Arduino NANO/UNO/MEGA, ESP32 and Raspberry PI to build a digital device to read sensor data and send it to the web server, motor control, control relay switches and LEDs. More than 5(five) years of experience in Arduino design and build. If you want an excellent and error-free project delivery, then send a message to me, please. Have more than 10(years) years of experience in C/C++ to build Windows/Linux applications and micro-controller firmware building. If you want a good job delivery, then send a message to me, please. Since 1995 I have been working on Analog and Digital Electronics to build any kind of device. I have build lots of devices. So more than 20 years of experience on Electronics. Including power supply design. Any kinds of schematic and PCB design. Expert PCB design in EasyEDA Pro IDE.
$50 AUD in 40 days
6.6
6.6

Hello, The sketch needs to coordinate PWM speed control, safe forward/reverse switching, and an automatic stop from a limit switch or sensor without leaving the H-bridge in an unsafe state. The exact driver and Arduino board matter because PWM pins, braking behavior, and direction control differ between hardware. I would first map the motor-driver inputs and stop condition, then structure the sketch with one editable constants block for pins, speed limits, debounce time, and timing values. I’d implement guarded direction changes, debounced stopping, and Serial Monitor messages for every state transition, then compile and test each operating path in the current Arduino IDE. I’d keep the driver assumptions explicit in comments and provide the .ino, any custom library files, and concise setup/test notes. I’m ready to begin once you provide the board, motor driver, and existing sketch if available. My first action will be to verify the pin/interface requirements and reproduce the intended state sequence before coding. As a Preferred Freelancer, I’ll keep the implementation straightforward to modify and test. Best regards, Asif Baloch
$38 AUD in 40 days
5.5
5.5

Dear Client, I am interested in developing the Arduino code for your DC motor control project. I can create clean, reliable, and well-structured firmware based on your specific motor, driver, power supply, sensors, and control requirements. My focus will be on ensuring stable operation, straightforward logic, and code that is easy to understand and modify. I can implement features such as forward/reverse control, PWM speed adjustment, start/stop functions, limit switches, sensor inputs, timed operation, and other required control logic. I will also help integrate the code with your selected motor driver and Arduino board, test the control sequence, troubleshoot issues, and make necessary adjustments to achieve the desired performance. I am committed to delivering tested and well-documented code within the agreed timeframe. Please share your Arduino board model, DC motor specifications, motor driver, wiring diagram, and required operating sequence, and I can review the requirements and begin developing the solution.
$25 AUD in 40 days
4.1
4.1

I can build this Arduino motor-control sketch from scratch with clean, modular, and heavily commented code that is easy to modify later. I’ll implement: • Smooth PWM speed control from 0–100% with configurable speed limits • Forward/reverse direction control via digital input and/or Serial commands • Safe direction changes with a stop/deceleration step before reversing • Limit-switch/sensor/timed automatic stopping with configurable brake/coast behavior • Debounced inputs and clear motor states (STOPPED, FORWARD, REVERSE, AUTO-STOP) • A single configuration section for pins, PWM limits, debounce time, ramp rate, and timing • Serial Monitor diagnostics for every important state transition and command I’ll target the current Arduino IDE and keep the sketch dependency-free where practical. If using an L298N/DRV8871-style H-bridge, I’ll clearly document the assumed wiring and control method in the comments and README. Deliverables: 1. Compiling ".ino" sketch 2. Any required custom library files, if needed 3. Short README with wiring, configuration, upload, and testing instructions 4. Serial test procedure and expected state messages I’ll prioritize safe motor behavior, straightforward troubleshooting, and code you can easily extend for additional sensors or motors.
$25 AUD in 40 days
0.4
0.4

The core logic here is handling the DC motors, so the PWM setup for smooth speed control from zero up is the first piece. I will use the `analogWrite` function for this which gives direct control over the motor driver's enable pin, so I can ramp the speed up or down without jerky steps. Direction changes are straightforward, using two digital pins to control the H-bridge enable pins, so one pin high and the other low for forward, reversed for reverse. The automated stopping condition needs a bit more thought, I would default to using a digital input for the limit switch or sensor, reading it inside the main loop so the system reacts instantly. Braking to a halt is usually achieved by shorting the motor terminals, so I'd implement that by setting both H-bridge direction pins high for a moment before entering the coast state or stopping completely based on the trigger. I would build the speed control and basic direction switching first, get that tested and working clean, so then the automated stopping logic slots in without complicating the core motor functions. The brief mentions a standard H-bridge driver library, is there a specific one you are already using or would prefer I use? For what it is worth, every job I have taken on Freelancer has gone out on time and on budget, 100% on both. If you hand this over today, I will have the basic motor spin and direction change code compiled and ready to test within the first day or two.
$40 AUD in 7 days
0.0
0.0

Arduino DC Motor Control & Automation I can develop a clean, well-commented Arduino sketch tailored to your motor-control requirements and structured so you can easily modify it later. The implementation will include: * Smooth PWM-based speed control from zero to full throttle * Forward/reverse direction control through digital input or serial commands * Automated stopping from a limit switch, sensor, or timed event * Brake or coast behaviour based on the selected motor driver * Centralised #defines/constants for pins, speed limits, debounce timing and other adjustable settings * Clear state-based logic for reliable operation * Serial Monitor messages for every important state change and event * Compatibility with the current Arduino IDE with an error-free compiling final sketch * Comments documenting the assumed H-bridge hardware and wiring logic I can work from your existing sketch or build the system from scratch depending on which approach is cleaner. I will also provide the .ino file, any required custom libraries, and a concise README covering hardware assumptions, setup, configuration and testing steps. I would first confirm the exact Arduino board, motor driver, motor specifications and input/sensor configuration, then implement and test the control logic accordingly. The goal is a reliable, readable and maintainable solution that you can easily adjust for future changes.
$30 AUD in 40 days
0.0
0.0

Sydney, Australia
Payment method verified
Member since Jan 21, 2022
$25-50 AUD / hour
₹1500-12500 INR
$30-250 AUD
₹4000-6000 INR
$30-250 USD
₹750-1250 INR / hour
$250-750 USD
₹1500-12500 INR
₹75000-150000 INR
$250-750 USD
€250-750 EUR
€18-36 EUR / hour
€250-750 EUR
₹100-400 INR / hour
₹12500-37500 INR
₹600-1500 INR
$30-250 USD
$30-250 USD
$250-750 USD
₹600-1500 INR
₹750-1250 INR / hour