Switch-Activated Sweeping Arm

by DuqARTLab in Circuits > Assistive Tech

32 Views, 0 Favorites, 0 Comments

Switch-Activated Sweeping Arm

Screenshot 2025-06-18 at 10.14.47 AM.png

The Switch-Activated Sweeping Arm is a semi-autonomous assistive device designed to help individuals with limited mobility. It mimics the function of a sweeping motion using a robotic appendage, controlled by a button to sweep around 90 degrees. Ideal for wheelchair users, elderly individuals, or anyone needing support with daily household tasks.


Design Considerations:

  1. Motion Range: The Arm is designed to sweep in a wide, controlled arc for around 90 degrees
  2. Adaptability: Mountable to wheelchairs, mobility aids, or fixed stands
  3. Accessibility: Controlled via a simple switch


Designed by Abbey Surdy, 2025

Supplies

PXL_20250625_163730157.jpg
PXL_20250619_183702100.jpg
PXL_20250619_183704295.jpg
PXL_20250619_183708412.jpg
PXL_20250619_183711483.jpg
PXL_20250619_183726870.jpg

Materials

Breadboard

Raspberry Pi Pico H

Jumper Wires

1/8" Mono Switch Jack

Servo Motor

Battery Holder

Power Cable


Tools

Glue Gun


Bill of Materials

Connect Servo Motor to Pico

just servo.png
PXL_20250619_162344610.MP.jpg
just motor.gif

Connect the servo motor to the Pico:

  1. Motor Power (Red) to Pico VBUS (Pin 40)
  2. Motor Ground (Black) to Pico Ground (Pin 3, 8, 12, 18, 23, 28, 33 or 38)
  3. Motor Signal to Pico GP0 (Pin 1)


Upload the MicroPython code to the Raspberry Pi Pico. I use Thonny, but there are lots of ways to do it.


from machine import Pin
from machine import PWM
import time

def gpio_set(pin,value):
if value >= 1:
Pin(pin, Pin.OUT).on()
else:
Pin(pin, Pin.OUT).off()

# Describe this function...
def sweep():
pwm0 = PWM(Pin(0))
pwm0.freq(50)
pwm0.duty_u16(1802)
time.sleep_ms(2000)
pwm0.duty_u16(5800)
time.sleep_ms(2000)


while True:
sweep()
time.sleep_ms(2000)


Connect Switch Jack to Pico

switch-activated sweeping arm_bb.png
PXL_20250619_163105584.jpg
motor plus switch.gif

Connect the switch jack to the Pico

  1. Wire 1 (either wire) to Pico Ground (Pin 3, 8, 12, 18, 23, 28, 33 or 38)
  2. Wire 2 (either wire) to Pico GP16 (Pin 21)


Upload the MicroPython code to the Raspberry Pi Pico.

from machine import Pin
from machine import PWM
import time

pIn21=Pin(21, Pin.IN, Pin.PULL_UP)

def gpio_set(pin,value):
if value >= 1:
Pin(pin, Pin.OUT).on()
else:
Pin(pin, Pin.OUT).off()

# Describe this function...
def sweep():
pwm0 = PWM(Pin(0))
pwm0.freq(50)
pwm0.duty_u16(1802)
time.sleep_ms(2000)
pwm0.duty_u16(5800)
time.sleep_ms(2000)


while True:
if not (pIn21.value()):
gpio_set(1, True)
sweep()
else:
gpio_set(1, False)


For testing purposes, you can use a button on the breadboard instead of a switch jack.

3D Print Enclosure and Arm

Print the sweeping arm and the enclosure.

Attach Servo to Sweeping Arm

PXL_20250625_163049258.jpg
PXL_20250625_163245888.jpg

Attach the plastic arm (which I hope you got with your servo motor) to the servo using the screw that (I hope) came with it.

We used hot glue to attach the sweeping arm to the servo motor's arm (just be careful that the hot glue doesn't get on the motor itself).

Finish Assembling Enclosure

PXL_20250625_164544568.jpg
PXL_20250625_165139824.jpg
PXL_20250625_165220116.jpg

Use hot glue to attach the servo motor to the exterior of the enclosure. Run wires from the switch jack and the motor through the hole in the enclosure to the breadboard.

Make It Mobile

Screenshot 2025-06-18 at 10.15.14 AM.png
Screenshot 2025-06-18 at 10.15.24 AM.png
PXL_20250619_183652997.MP.jpg

Hardening the connections

If you want to use this for real, you will need to make sure the connections between components are robust and reliable. You should replace the breadboard with something you can solder to and solder wires and components.


Powering your Pico

I used a battery pack and a USB-micro "pigtail" with power and ground exposed.


Running a script without being attached to a computer

I followed these instructions for running a program on a Raspberry Pi Pico without a computer attached.


1. Write and Save Your Script:

Create your Python script using Thonny or your preferred editor.

Save the file as "main.py" on your Pico . This is crucial for automatic execution when the Pico is powered on.

2. Connect to the Pico:

Connect the Pico to your computer via a USB cable.

3. Transfer the Script:

In Thonny, open the "MicroPython (Raspberry Pi Pico)" interpreter and click "Open".

Select your "main.py" file and click "Open".

Optionally, you can click the thonny_run button in Thonny to get the script running in the Raspberry Pi Pico

4. Unplug and Power Up:

Disconnect the Pico from your computer.

Power on the Pico. It will automatically run the main.py script when powered up.