Asked

Iotiny Controller Servo PWM Issue

Hello Roboteers,

I'm currently working with some minibots, and I have an idea involving the IoTiny controller, which has 7 ports-just enough for the servos. I'm planning to use port D0 for controlling the head with an LED. However, I've encountered an interesting issue: the servo's neutral position is 90 degrees, but at this point, the PWM signal is set to 0? Consequently, I'm unable to position the head exactly at 90 degrees while turning off the PWM. It's quite puzzling! I'm in the process of modifying two minibots: one is the Plen, and the other doesn't have a name yet. Both use 6-volt micro servos.

Here's a link to a YouTube short providing more context on my project.

Any tips or insights would be greatly appreciated! Thank you.


Related Hardware EZ-B IoTiny
Related Controls PWM Slider Auto Release

ARC Pro

Upgrade to ARC Pro

ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.

#1   — Edited

Hey Nomad, I'm not sure exactly what you need help with. Perhaps when you posted you question it was reformatted and it lost some of the context? You mention an LED but then ask about a servo starting position.

Here's my guess; Did you center the servo before you attached it to the part it's moving? If not try to remove the attached part from the servo, power up the servo and let it move to it's natural center point, then reattach the part. Don't forget to find and set the servo's min, max settings in ARC.

Hope this helps. If I'm wrong about your question please restate.

Good luck and have fun! You seem to always have something exciting to work on.

Author Avatar
PRO
Canada
#2  

Thanks - good description and a helpful video link (I can’t view videos or images, so please paste any exact on-screen text or timestamps you want me to see).

Short answer: you’re likely mixing two different outputs. The PWM Slider skill drives a PWM duty-cycle (for LED/ESC/motor drivers), while hobby servos need the servo-control waveform (servo pulse width) - they’re not the same thing. Also the Auto Release skill will stop the servo signal (release the servo), which looks like "PWM = 0" (no signal) and the servo will go limp even though its commanded position was 90.

Here’s how to fix and troubleshoot this:

  1. Verify what control is actually driving D0
  • Are you using a servo control / script (Servo.setPosition(d0, 90)) or are you using PWM Slider pointed at D0?
  • Don’t use PWM Slider on the same pin you want to drive a hobby servo from - that sends a generic PWM duty cycle, not a servo position pulse.
  1. Check Auto Release settings (likely culprit)
  • Open the Auto Release skill’s kebab menu (three lines on the top-right of that skill window) -> Settings.
  • In Settings: confirm if Board Index and Port D0 are in the Port List.
    • If D0 is listed, Auto Release will release (turn off the servo signal) after the configured Release After(seconds).
    • Either remove D0 from the Port List, set a longer Release After, or enable Pause in the Auto Release main window so it won’t release that port.
  • Quick steps:
    • Project open Auto Release skill click kebab (three lines) Settings remove D0 from Port List or change Release After Close.
  1. If you want the servo held at 90 degrees you must keep the servo signal & power on
  • Releasing = removing torque/pulse. There is no way to "turn PWM to 0" and still have a powered servo hold position - hobby servos need power & control pulses to maintain torque.
  • Options if you want low current but fixed position:
    • Mechanical locking or a detent so it stays at 90 when released.
    • Use a servo with a "torque off / low-torque" mode or a smart servo that supports holding torque control (Dynamixel etc).
    • Keep the servo active but reduce how often you update position (not commonly useful) - it still consumes holding current.
  1. Useful commands (JavaScript in ARC)
  • Center servo and then release after 3 seconds:
Servo.setPosition(d0, 90);
sleep(3000);
print("Releasing servo d0");
Servo.release(d0);
  • Keep it held (do not release), simply set to 90:
Servo.setPosition(d0, 90);

Note: use d0 (no quotes), sleep() uses milliseconds, and print() as shown.

  1. IoTiny specifics to double-check
  • Make sure servo power is supplied to the servo VCC (IoTiny’s I/O power is not regulated by IoTiny; check your battery voltage). The IoTiny signal pin is 3.3V logic and servo V+ should be appropriate for the servo (you said 6V micro servos).
  • IoTiny D0 can output a servo signal normally - just don’t drive it with the PWM Slider skill at the same time.
  1. If you still see "servo neutral = 90 but PWM = 0"
  • Confirm where that "PWM = 0" is being reported (which skill). If Auto Release shows a 0/Released state that’s expected.
  • Tell me:
    • Are you commanding the position from a servo control or from a script? Paste the script if you have one.
    • Is D0 listed in Auto Release?
    • Are you also using the PWM Slider on any of the IoTiny ports?
    • Which exact IoTiny board index are you using (Board 0 usually)?

Links and docs that will help:

If you post:

  • Exactly how you are commanding the servo (which controls / scripts),
  • The Auto Release setting screenshot text (I can’t view images so paste the settings text), and
  • Which ports you have added to Auto Release,

I’ll give precise step-by-step settings to get the head to hold at 90 without Auto Release turning it off. Want me to prepare a small JavaScript example that centers and keeps the servo held (or centers then auto-releases after a custom delay)?


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Author Avatar
PRO
Belgium
#3  

hi dave

it was just a test to see if i can control a LED pwm and a servo  at same time . cause  i have only 8 ports on the iotiny . i was thinking to use a splitter wire . but it didn work cause the servo is 90 degree center and a pwm is zero . so if i use D0 head for excample the pwm would be alway be on .

sorry late respons .

Author Avatar
PRO
Canada
#4  

Good details - thanks. Short answer: you cannot reliably run a hobby servo position signal and an LED PWM signal from the exact same physical pin at the same time. They are different waveforms and usages. Below I explain why, how to wire correctly, and several practical solutions for your IoTiny with limited ports.

Why this doesn’t work

  • Hobby servos expect a servo-control pulse train (specific pulse widths ~1-2 ms repeated ~20 ms) that tells them a target position.
  • The PWM Slider skill sends a generic PWM duty cycle (fast on/off), intended for LEDs or motor drivers, not for servo position control.
  • If you split the signal, the servo cannot be held at 90 while the PWM slider drives LED duty = 0, because either:
    • the PWM waveform is not the servo waveform, or
    • a skill (Auto Release) may remove the servo pulses (showing PWM = 0) making the servo limp.
  • In short: one physical IO cannot reliably serve both roles simultaneously.

Correct wiring rules

  • You may share power and ground with a Y-split (battery V+ and GND) so both servo and LED get power - but DO NOT split the signal line.
  • Give the servo its own signal pin (e.g. D0) and give the LED its own PWM-capable digital pin (e.g. D1). Share GND between devices.
  • If the LED is high-power, use a MOSFET/transistor driven by the digital pin; do not drive a high-current LED directly from the IoTiny pin.

Practical options (pick one that fits your hardware/needs)

  1. Use separate IoTiny pins (simplest)

    • Servo signal on D0, LED PWM on D1 (or any other free D port).
    • JS example:
      // center servo at D0 and set LED brightness on D1 to 50%
      Servo.setPosition(d0, 90);
      PWM.set(d1, 50); // duty cycle 0-100
      print("Servo centered, LED at 50%");
      
    • Make sure Auto Release is NOT set to release D0 (see below).
  2. If you absolutely need more channels than available: add a PWM/servo expander (recommended)

    • Use a PCA9685 (16-channel I2C PWM/servo controller) or a Pololu/SSC-32/MAestro controller. They give many servo-capable outputs and use I2C or serial so IoTiny pins remain free.
    • Search or add a servo-controller robot skill from the robot skill Store: https://synthiam.com/Products/Controls
    • PCA9685 uses I2C, only consumes the I2C header/power on IoTiny, and provides 16 separate PWM/servo outputs.
  3. Microcontroller bridging (tiny micro on the robot)

    • Put an ATtiny/Arduino on the robot: single serial or digital line to tell it to toggle LED or drive servos. It can multiplex internally and give you more flexible control while only using one IoTiny port for communication.
  4. Mechanical or servo alternatives

    • If you only want the head to be "centered" but then remain with no holding current, use a mechanical latch or detent so you can release servo after centering.
    • Or switch to smart servos (Dynamixel, etc.) with software torque control if you need explicit torque on/off features.

Auto Release and the 90 "PWM = 0" behavior

  • Auto Release will remove servo pulses after its timeout. That looks like "PWM = 0" because the servo signal stops. If you want the servo held at 90, remove D0 from Auto Release.
  • Steps to check Auto Release:
    • Open the Auto Release skill, click the kebab (three lines) Settings.
    • In Port List, remove D0 or set Pause = checked, or increase "Release After (seconds)."
    • Close settings.

Quick checklist for you to try now

  • Stop using PWM Slider on the same pin you use for a hobby servo.
  • Wire servo signal to one IoTiny port, wire LED to a different IoTiny digital port (use a MOSFET if LED draws >20-30 mA). Share ground.
  • Disable Auto Release for the servo port (or don’t add that port to Auto Release).
  • Verify servo power voltage is appropriate (IoTiny I/O power is not regulated - confirm your supply for 6V micro servos). IoTiny signal is 3.3V logic (works for most hobby servos).

Helpful links

A couple quick questions so I can make precise suggestions:

  1. How many servos and how many LEDs do you want to control per minibot?
  2. Which IoTiny ports are free right now (list D0-D7 usage)?
  3. Is your LED a single small LED (<=20 mA) or a brighter / high-power LED (needs MOSFET)?
  4. Do you want the head to stay powered (hold torque) at 90, or do you want it to be centered and then released (no holding torque)?

If you want, I can:

  • Prepare a small JavaScript example that centers the servo and drives an LED on another port, plus auto-release-safe commands.
  • Recommend an inexpensive PCA9685 breakout and point to sample ARC robot skills to use it.

I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.