0

Is it possible to get these things together?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Is it possible to get these things together?

by pcsaba on Thu Nov 28, 2013 6:46 am

Hi!
For a course at the university, my team has to make a prototype which is based on an Arduino Uno board. Our prototype should measure pulse and temperature and should give som feedback with an Adafruit Wave shield and a servo motor.
The components should use the following pins:

Pulse sensor (http://www.adafruit.com/products/1093):
5V
GND
A0 (analog input)

Thermistor (http://www.adafruit.com/products/372):
3.3V
GND
A1 (analog input)
AREF

Adafruit Wave shield (http://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino):
(as seen on the official page)
Pins 13, 12, 11 are always used by the SD card. Then there are 5 other pins used to talk to the DAC and SD card, but they can be set to connect to any arduino pin. However, by default, the library is configured to use pins 10 (for SD card) and pins 2, 3, 4 and 5 for the DAC. To chanage these pins requires modifying the library - the pins are referenced by their 'hardware' pin names (ie PORTD, etc) not by arduino pins.

That means pins 6, 7, 8, 9 and the 6 analog in pins (also known as digital i/o pins 14-20) are availabl

Servo motor:
5V
GND
pin 9 (PWM)

So my question is, that if it is possible to get these parts work simultaneously or do we need to get another Arduino board or maybe an extra power source?

I'm really new to this Arduino stuff and this problem a bit complex to us so every answer is welcome!
pcsaba
 
Posts: 3
Joined: Thu Nov 28, 2013 6:08 am

Re: Is it possible to get these things together?

by adafruit_support_bill on Thu Nov 28, 2013 8:49 am

There is a timer conflict and some pin conflicts with the standard pulse sensor code. That code uses pins 11 and 13 for led output. You can eliminate that if you want to avoid conflict with the SPI communication to the SD card. However, it also uses Timer1 to time the sample rate for the sensor. This will conflict with the Timer1 usage by the Wave Shield Library.

You could try to re-write the pulse sensor code to use Timer2 - or split your project onto multiple processors.

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

Re: Is it possible to get these things together?

by pcsaba on Thu Nov 28, 2013 2:13 pm

adafruit_support_bill wrote:There is a timer conflict and some pin conflicts with the standard pulse sensor code. That code uses pins 11 and 13 for led output. You can eliminate that if you want to avoid conflict with the SPI communication to the SD card. However, it also uses Timer1 to time the sample rate for the sensor. This will conflict with the Timer1 usage by the Wave Shield Library.

You could try to re-write the pulse sensor code to use Timer2 - or split your project onto multiple processors.


Thanks for the tips!

So the easiest way to solve our problem is to rewrite the pulse sensor code, but even if we manage this how do we provide the 5V power for the sensor, wave shield and the servo? Should we use an extra power source?
pcsaba
 
Posts: 3
Joined: Thu Nov 28, 2013 6:08 am

Re: Is it possible to get these things together?

by adafruit_support_bill on Thu Nov 28, 2013 9:08 pm

how do we provide the 5V power for the sensor, wave shield and the servo? Should we use an extra power source?

The wave shield and sensor can easily run from the Arduino 5v supply. Servos are a bit more demanding and electrically noisy. If you are using a small-to-mid-size servo, I'd give it a try running everything from one supply, but if you run into problems, I'd use a separate supply for the servo. Something like 5v @1A should handle it.

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

Wiring

by pcsaba on Tue Dec 03, 2013 1:19 pm

Thank you for the information!

I made a picture about the wiring. As our group is really new to this kind of stuff we are not sure if it is totally correct or not. Could you or somebody give us some feedback or advice?
Attachments
wiring graph.jpg
Wiring
wiring graph.jpg (469.81 KiB) Viewed 232 times
pcsaba
 
Posts: 3
Joined: Thu Nov 28, 2013 6:08 am

Re: Is it possible to get these things together?

by adafruit_support_bill on Tue Dec 03, 2013 1:32 pm

The pulse sensor will work on 3v-5v. Since your analog reference is set to 3.3v, I would suggest powering the pulse sensor from 3.3v also.

Also note the following caution from the AnalogReference documentation: http://arduino.cc/en/Reference/AnalogReference
If you're using an external reference on the AREF pin, you must set the analog reference to EXTERNAL before calling analogRead(). Otherwise, you will short together the active reference voltage (internally generated) and the AREF pin, possibly damaging the microcontroller on your Arduino board.

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

Please be positive and constructive with your questions and comments.