0

Adafruit 16-channel PWM/Servo Shield controlled with sensors
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit 16-channel PWM/Servo Shield controlled with sensors

by maybe_both on Sat Apr 24, 2021 11:33 am

Hi! I'm a first time poster.

I have an Adafruit 16-channel PWM/Servo Shield on an Arduino Uno Rev3, I've got it working with the help of this guide https://learn.adafruit.com/adafruit-16-channel-pwm-slash-servo-shield and am able to drive 4 servos for now, I'm using the testcode from previous url. Here is how it looks: https://imgur.com/unj1RCD

The Arduino is powered by USB via computer for now, and the shield is powered by a switching mode power supply with 5V, 2.5A, for now.

My question is if there is any way to control the servos using any kind of sensor, for example a motion sensor, and if it is possible then where do I start? Is there anywhere on the shield where I can plug it in somehow?

Grateful for any help I can get :)
Thanks,
Elin

maybe_both
 
Posts: 2
Joined: Mon Apr 19, 2021 9:00 am

Re: Adafruit 16-channel PWM/Servo Shield controlled with sen

by adafruit_support_bill on Sat Apr 24, 2021 1:19 pm

My question is if there is any way to control the servos using any kind of sensor

Sensors can provide input to your program and your program can use that to control the servos. You first need to decide what you want your project to do so you can select the appropriate sensors.

Is there anywhere on the shield where I can plug it in somehow?

The shield has a prototyping area and breakout holes for all of the Arduino pins. So there are many ways to connect a sensor.

adafruit_support_bill
 
Posts: 81334
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit 16-channel PWM/Servo Shield controlled with sen

by maybe_both on Sun Apr 25, 2021 12:26 pm

adafruit_support_bill wrote:Sensors can provide input to your program and your program can use that to control the servos. You first need to decide what you want your project to do so you can select the appropriate sensor


Yay, it is possible! My idea is to get a sculpture moving when someone comes close to it, I was thinking about using a HC-SR04 ultrasonic sensor (for example) and when visitors comes to take a closer look they would see the sculpture doing a little "dance". Is this a good sensor for this?

maybe_both wrote:The shield has a prototyping area and breakout holes for all of the Arduino pins. So there are many ways to connect a sensor.

Oh okay, where is the prototyping area and how do I use it? I've searched online but can't find any projects doing this.

Thank you, Bill :)

maybe_both
 
Posts: 2
Joined: Mon Apr 19, 2021 9:00 am

Re: Adafruit 16-channel PWM/Servo Shield controlled with sen

by jglogau on Thu Apr 29, 2021 1:49 am

Hello:

I just got a Adafruit 16-channel PWM - B, soldered it up and connected the USB to my Mega (Not a regular Uno or clone) and the power (5V 2A) to your Shield.

I am NOT getting both the red and green lights on, ONLY the green LED. So the servo isn't running with the demo code "servo"
I assume that the red and green lights are referring to LEDs on the Shield, not the Mega.

What am I doing wrong?

Is the wiring somewhat different for the Mega?

Here's a picture, is the soldering OK, can't get it any higher resolution?

PXL_20210429_051348480_45.jpg
Adafruit 16 -channel PWM/Servo Shield with Arduino Mega
PXL_20210429_051348480_45.jpg (836.65 KiB) Viewed 244 times

Thank you

jglogau
 
Posts: 6
Joined: Thu Apr 29, 2021 12:29 am

Re: Adafruit 16-channel PWM/Servo Shield controlled with sen

by adafruit_support_bill on Thu Apr 29, 2021 5:29 am

I was thinking about using a HC-SR04 ultrasonic sensor (for example) and when visitors comes to take a closer look they would see the sculpture doing a little "dance". Is this a good sensor for this?

That is a good sensor. It can measure distance, so you can tell how close the visitor is to the sculpture.

Oh okay, where is the prototyping area and how do I use it?

That is the grid of holes that takes up half the board. You can use that any way you like to mount components and connect them together.

adafruit_support_bill
 
Posts: 81334
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit 16-channel PWM/Servo Shield controlled with sen

by adafruit_support_bill on Thu Apr 29, 2021 5:30 am

@jglogau - To avoid confusion, please start a new thread for your question.
posting.php?mode=post&f=31

adafruit_support_bill
 
Posts: 81334
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.