Asked
Resolved Resolved by Athena!

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

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#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.
Author Avatar
PRO
Canada
#6  

I can’t view the video (or images). Please paste any on-screen text or a short timestamp + description of what you want me to see. Meanwhile - here’s focused, practical help based on what you’ve already said about the Plen minibot, IoTiny, servos and LED PWM.

Key facts / quick answer

  • You cannot reliably run a hobby servo position signal and a generic LED PWM signal from the exact same physical IoTiny pin. They are different waveforms and usages.
  • You can share power and ground with a splitter, but never split the signal line. Give the servo its own signal pin and the LED its own PWM pin (or use a controller that provides more servo/PWM outputs).
  • If Auto Release is active for the servo port it will stop the servo pulses (looks like "PWM = 0") and the servo will go limp - remove the port from Auto Release if you want it to hold position.

What to do now - practical options (pick one)

  1. Use separate IoTiny pins (simplest)
  • Servo signal on D0.
  • LED PWM on another free digital port, e.g. D1.
  • Share ground and V+. Do NOT split the signal wire.
  • If LED current > ~20-30 mA use a MOSFET/transistor between IoTiny pin and LED (IoTiny digital pins are not a heavy current source).

Example JavaScript for ARC

// center servo d0 and set LED duty on d1 to 50%
Servo.setPosition(d0, 90);
PWM.set(d1, 50);      // 0-100 duty cycle
print("Servo centered and LED at 50%");

If you want the servo held, do NOT release it:

Servo.setPosition(d0, 90);
// do not call Servo.release(d0)

To center then release after 3s:

Servo.setPosition(d0, 90);
sleep(3000);
print("Releasing servo d0");
Servo.release(d0);
  1. Use a multi-channel servo/PWM expander (recommended if ports are tight)
  • PCA9685 16-channel I2C PWM/servo board (uses IoTiny I2C pins only) - gives you many dedicated servo outputs and separate PWM outputs for LEDs.
  • Pololu Maestro or SSC-32 (serial/USB/TTL) are other options.
  • Look in the robot skill Store for servo controller skills: https://synthiam.com/Products/Controls
  1. Use a tiny MCU as a multiplexer
  • Put an ATtiny/Arduino on the minibot to run servos/LEDs locally and talk to IoTiny via a single serial/SPI/I2C line. Good if you want custom behavior and minimal IoTiny pins used.
  1. Mechanical alternatives
  • If you only need the head to be centered then released (no holding torque), use a mechanical detent/lock or friction washer so the head stays when the servo is released.
  • Use a smart servo (Dynamixel etc.) with software torque control if you need on/off torque control with holding features.

Wiring & power reminders (very important)

  • IoTiny I/O uses 3.3V signal level. Hobby servos accept 3.3V servo signals usually OK, but servo V+ must be appropriate to the servo (you mentioned 6V micro servos).
  • IoTiny does NOT regulate I/O power for external servo V+. If you feed IoTiny with 12V, the I/O power pin will be 12V - dangerous for 5V servos. Verify your battery and power distribution.
  • Use a strong external battery or supply for servos (common ground required). Servos draw big current peaks; insufficient power will brown-out the IoTiny.

Auto Release - check this first if servo "loses" pulses

  • Open the Auto Release skill kebab menu (three lines) Settings.
  • If D0 is in the Port List, Auto Release will remove the servo signal after its timeout. Remove D0 from Port List or check Pause or increase Release After(seconds).
  • Auto Release will make the port look like "PWM = 0" because it stops sending servo pulses.

Plen minibot mechanical fit issues - targeted suggestions (You said "the hole folder plen needs modified, nothing seems to fit." I can’t see the video - please describe what doesn’t fit: horn alignment, screw sizes, servo footprint, body clearance, or linkages.) Possible fixes:

  • Measure servo horn hole spacing, screw thread, and mounting boss positions. Use washers/spacers where required.
  • Trim or file plastic that interferes with horn travel.
  • Use a different servo horn (spline-compatible) that fits the part geometry.
  • 3D-print or laser-cut an adapter plate or spacer to reposition servo.
  • Use nylon standoffs or metal spacers to shift the servo out slightly.
  • If servo body is hitting the chassis, rotate mount or use a low-profile servo.
  • Zip-tie or epoxy a small bracket if you need a quick hack.

Links and references

Questions for you (so I can give precise step-by-step help)

  1. Which IoTiny ports are currently used (list D0-D7 usage)?
  2. How many servos and how many LEDs per minibot do you need to drive?
  3. What is your battery voltage and how are servos powered (direct from IoTiny V+, separate battery, etc.)?
  4. Is D0 currently added to Auto Release? If yes, do you want it to hold torque or be released?
  5. For the Plen fit problem: describe specifically what "doesn’t fit" (which part hits, which bolt/hole is misaligned, servo size vs mount). If you can paste a short timestamp + text description from your video that helps.

If you want I can:

  • Prepare a small JavaScript ARC script that centers servo and safely drives an LED on a different port and shows how to avoid Auto Release kicking in.
  • Recommend a specific PCA9685 breakout board and point to an ARC skill to drive it.

Which option do you want to try first?


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
#7  

@athena

you cant see the video ? the link works . its a little progress on the minibots .

Author Avatar
PRO
Canada
#8  

I can’t view videos or images, even if the link works. Please paste any on-screen text or a short timestamp + description of the clip you want me to see. Meanwhile, here’s focused help based on your minibot / IoTiny details and the issue you described.

Summary (why this happens)

  • A hobby servo expects a servo-control pulse train (1-2 ms pulses repeated ~20 ms) to hold a position (e.g. 90).
  • The PWM Slider sends a generic PWM duty-cycle waveform for LEDs / motor controllers - not a servo position waveform.
  • You cannot reliably split one physical signal pin to drive both a servo position input and a generic LED PWM at the same time.
  • Auto Release can also stop servo pulses (making the port report "PWM = 0" / limp), so check that too.

Immediate fixes / recommended approaches

  1. Use separate pins (simplest)
  • Servo signal on one IoTiny port (e.g. d0).
  • LED PWM on another IoTiny digital port (e.g. d1).
  • Share V+ and GND with a Y-split for power only - do NOT split the signal wire.
  • If LED current > ~20-30mA, drive LED with a MOSFET/transistor and use the IoTiny pin to gate the MOSFET.
  1. Add a multi-channel servo/PWM expander (best for limited IO)
  1. Use a small MCU bridge (one-wire to many)
  • Put an ATtiny/Arduino on the minibot to run the servos/LEDs locally and talk to IoTiny over a single serial or I2C line. This lets you multiplex many outputs while using few IoTiny ports.
  1. Mechanical or smart-servo options
  • If you only need the head to be centered and then released: use a mechanical detent or latch so it stays when released.
  • If you need torque on/off software control, consider smart servos (Dynamixel, etc.) that support torque control.

Auto Release - probable culprit

  • Open the Auto Release skill kebab menu (three lines on the top-right) Settings.
  • If d0 is in the Port List, Auto Release will remove servo pulses after "Release After (seconds)".
  • Fix options: remove d0 from the Port List, set Pause checked, or increase the Release After timeout.

Useful JavaScript examples for ARC

  • Center servo and keep it held (do NOT release):
Servo.setPosition(d0, 90);
print("Servo d0 centered to 90 and held");
  • Center servo then auto-release after 3 seconds:
Servo.setPosition(d0, 90);
sleep(3000);
print("Releasing servo d0 now");
Servo.release(d0);
  • Center servo on d0 and set LED duty on d1 (separate pins):
Servo.setPosition(d0, 90);
PWM.set(d1, 50); // set LED duty cycle to 50%
print("Servo d0 centered; LED on d1 at 50%");

Notes: use d0/d1 without quotes, sleep() uses milliseconds, and use print() per ARC JavaScript guidance.

Checklist to try right now

  • Stop using PWM Slider on the same pin as your servo.
  • Wire servo signal to one port and LED to another (power can be shared).
  • Remove d0 from Auto Release or Pause the Auto Release skill.
  • Verify servo V+ is appropriate (you said 6V micro servos). IoTiny I/O uses 3.3V signal; servo V+ must be the servo battery - confirm common ground. Important: IoTiny’s I/O power behavior is not regulated - check your battery voltage and power wiring. (IoTiny docs: https://synthiam.com/Support/Hardware/EZ-B-IoTiny)

Quick questions so I can give a precise step-by-step

  1. How many servos and how many LEDs per minibot do you need?
  2. Which IoTiny ports are currently used? (List D0-D7 usage)
  3. Are you physically using a splitter for the signal line or only for power? (If signal split - stop doing that)
  4. What is your battery voltage and how is servo power wired? (Is servo V+ supplied from same battery as IoTiny?)
  5. Do you want the head to remain powered (hold torque) at 90, or center it and then release?

If you want, I’ll:

  • Prepare a small ARC JavaScript script to center servo and safely drive an LED on another port, and show exactly where to change Auto Release.
  • Recommend an inexpensive PCA9685 breakout and step how to wire and add it to ARC.
  • Give mechanical suggestions for the Plen fit - paste the timestamp and describe what "doesn’t fit" in the video (e.g., horn hole misaligned, servo body hits chassis, screw hole spacing mismatch).

Which of those would you like me to prepare next?


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.