Digital, Analog, Serial: Sensors and Actuators

@christine

I am in the process of making the Photon easier for High School students to use. Most of my information is summarized at Teaching High School Robotics with the Spark Photon or at http://rocksetta.com/spark-core-photon/

We have the photon working from a webpage that is easy enough for the students to use, however when I ask them to make something, they draw a blank, so we are in the process of finding out what sensors and actuators we can use with the Photon. The next step is to make it easier for the students to understand for which items we use digital, analog or serial connections. Presently digital and analog is easy to use, but I have to do a bit of work to get serial working (I know what to do just haven’t done it yet).

I need to teach which sensors and actuators will work with the Photon and how to communicate with them. Following is my list so far. If anyone has information or would like to suggest changes (what is in the wrong section), hints about include files… etc. Please comment. I work very fast but make lots of mistakes.

Also if anybody can suggest better online stores than digikey or robotshop I would like to know about them. Grove seeedstudio is awesome but I don’t think everything needs to have its own board, many of these could be a lot cheaper. (Still it is very cool what they have) http://www.seeedstudio.com/wiki/index.php?title=Main_Page#Grove

Sensors and Actuators document
*** items are included in the Photon Maker Kit https://docs.particle.io/datasheets/photon-shields/#photon-maker-kit-contents

Digital Sensors
Collision
PowerSwitch Tail II (digital activated 120 volt switch)
Push Button***
Smoke Detector
Tilt
Touch Capacitive
Water

Analog Sensors
Altitude
Air quality
Anemometer (wind)
Alcohol
Barometer
CO2
Dust
Displacement (identifies a conductive object)
Heart Rate
Electricity
EMG (Electromyogram)
Flex
Flow (liquid)
Geiger Counter
Gesture
GSR (galvanic skin response-skin conductivity)
Hall (magnetic)
Hydrophone (underwater microphone)
HVoc
Humidity
Load (force)
Temperature
Touch-range
Loudness
Luminance - light intensity
Moisture
Nunchuck
Ph
Photoresistor***
Potentiometer (Rotary)***
Potentiometer (Slide)
pressure
proximity
pulse
RFID
Slide potentiometer
Sound
Soil moisture
Temperature ***
Ultrasonic range finder
UV

Serial Sensors
FM receiver
Accelerometer
NFC tag
Multi gas
Barometer
Fingerprint
Gyroscope
Motion tracking
Color
Multi touch
GPS
Infrared temperature
Hydrophone (underwater microphone aquatic acoustics)
Microphone
PIR (passive Infrared Sensor)***
Pixy (Charmed Labs - multiple object sensing camera)
PowerSSR tail (safe-ish 120 volt dimmer plug, PWM control)

Digital Actuators
Piezo buzzer***
SPDT relay (switch)
Vibration motor***

Analog Actuators
Air Valve
IR LED***
Motor drivers (I use pololu)
LED’s***
Linear Actuators
RGB LEDs uses 3 analog channels***
Stepper Motor
Linear Servo

Serial Actuators
Micro Servo***
Serial oLED screen 128x64 graphic***

*** items are included in the Photon Maker Kit https://docs.particle.io/datasheets/photon-shields/#photon-maker-kit-contents

Possible online stores: (Please add some that you have had success with)

http://www.digikey.com/product-search/en/sensors-transducers?k=sensors&newproducts=1

http://www.robotshop.com/ca/en/catalogsearch/result/?q=Sensors+for+arduino

http://www.seeedstudio.com/wiki/index.php?title=Main_Page#Grove

This would make for an interesting list of devices. I’d recommend going through the sensors to figure out what protocols they use, since I can spot quite a few that are wrongly listed, on first glance.
Smoke detector, PIR, capacitive, collision, fingerprint… etc. are incorrect if I’m not mistaken.

Thanks @Moors7

Here is a Google Docs link to the document, as long as it is being used I will leave it open to be edited. Eventually I will need to close it for the students to have access. Feel free to move items around to the best location and to add items. Add new online stores that you like at the bottom of the sheet. Lets keep it a list, and put most of the comments on the community site.

Thanks @Moors7
@christine

I fixed up the list, can you make anymore suggestions? I want to let my students find websites with the best prices and to search for include files to operate the serial sensors/actuators.

Also the students can search for example code to operate all of the items.

(It is great to have 30 students searching for information that would take me hours and hours to find :blush: )

How accurate do you want to make that list? Do you just want an overview of possible sensors, or do you want actual sensors?
In the latter case, I think making an excel-file would be more suited, since some variables can be measure by more sensors, or one sensor can measure multiple things. There are even different variants of the same type of sensors which use different protocols.
You can then have a sensor, the things it measures, protocols that can be used, example libraries, places to buy them(optional).

One easy way of creating such a list is by going through some of the more popular stores (Adafruit, Sparkfun, etc.), and just list their sensors with their specs. They often have quite good documentation, some even with hookup guides. You can then go from that, which I think is easier than coming up with a sensor and then trying to find someone who might have them. That’s a bit like reinventing the wheel, thus energy better spent elsewhere :wink:

@Moors7

Yup. That’s what I am going to get the kids to do. The spreadsheet makes the most sense. This list is just about which sensors are available and how to control the sensors. (Digital, Analog, are easy, Serial often needs an include file). This list is just to organize things before the students get started. The Adafruit and Grove sights lump all the sensors together and it is very overwhelming for the students. With this list, I can just concentrate on digital sensors one day, then analog another day.

I get what you’re trying to do, but have to disagree with it, since it’s just not that easy.
Let’s take a temperature sensor for example, you’ve got thermistors, analog sensors, and digital sensors, using different protocols. There’s a bit more on that here.

It’s going to be really confusing for students to find that a sensor they’ve looked up the day before also seems to work on different protocols, even though it was clearly listed as something else.

If you go through the mayor websites, and start with their first sensor, you can list its interesting characteristics without having to search for them. Rather than specifically searching for analog temperature sensors, you just list a temperature sensor you encounter with the protocol that that one uses.

This makes the whole process a lot easier since you don’t have to scout for sensors that may, or may not, exist. By going through the stores, you’re 100% certain they exist. Once you’ve got a decent list together, you can filter them on the characteristics you’re interested in: type of sensor, protocol, store, etc.

A nice website is mysensors.org, since they’ve also got quite a few sensors with examples listed :smile:

Good points, but they will be covered when we start testing if the sensors work.

Today is Tuesday, this idea is Wednesday’s lesson, still working on what to do Friday. Student’s are coming up with amazing final projects and we need sensor information to plan how to build their creations. I will have to look at this again next semester. For now, the show must go on.

Thanks for your help @Moors7. I was a little sad more people did not give input about different sensors as I think there are several more sensors out there that I do not know about. :pensive:

@christine @peekay123 @BDub @bko @ScruffR @Moors7

I would now like, in a few days, to teach my robotics class about serial sensors, since they are doing really well with analog and digital sensors on a webpage and using IFTTT for internet reporting.

I am curious which serial sensors use include files that have already been ported to the photon? I have searched through the libraries, but it is a bit confusing as the libraries are for many devices not necessarily just serial sensors.

I do have a grove photon starter kit see the link

http://www.seeedstudio.com/depot/Grove-Starter-Kit-for-Photon-p-2179.html

which has a great github site at

I would really like to find an online version of the manual as the github site does not make much sense without the manual. So if you go through the information you can find three useful include files:

ChainableLED.h for the stringable LED

MMA7660.h for the accelerometer

TM1637.h for the 4 digit display.

This is all very good and works great.


Grove also has a really interesting site at

http://www.seeedstudio.com/wiki/I2C_And_I2C_Address_of_Seeed_Product

which looks like a gold mine for I2C serial products.


I have also done some work:

Pixy.h and TPixy.h for the Pixy Camera

http://cmucam.org/projects/cmucam5/wiki/Introduction_and_Background

for which I have ported the includes at my github at


I have found a few includes for sparkFun products. The SparkFun site is at

https://www.sparkfun.com/categories/23?page=all

but that site is a mix of digital, analog and serial sensors making things very difficult to teach.

Searching the Particle.io Libraries I have found these header files but I never know if these are fully working or a work in progress. Also the libraries are a mix of many things not just serial sensors. Here are a few include files that look promising:

InternetButton.h,
RelayShield.h,
PowerShield.h,
Serial_LCD_SparkFun.h,
neopixel.h,
OneWire.h,
Adafruit_DHT.h,
SparkFunMicroOLED.h,
Particle-BaroSensor.h,
FastLED.h,
TinyGPS++.h,
Monitor.h,
captouch.h


I would like to introduce to my students the following serial sensors:

Accelerometer
NFC Tag
Multi gas
Barometer
Fingerprint
brain wave
Gyroscope
Motion tracking
Color
Multi touch
GPS
Infrared temperature
Hydrophone (underwater microphone aquatic acoustics)
Microphone
PIR (passive Infrared Sensor)***

Does anyone have any suggestions for include files that have already been ported to the Photon? OR any suggestions for sites that like the Grove or sparkFun have serial sensors that work well with the photon?

These are Particle libraries and are known to work

  • InternetButton.h (the Internet Button also includes accelerometer support, and NeoPixel control)
  • RelayShield.h
  • PowerShield.h (includes I2C communication with the power gauge chip)

Instead of Adafruit_DHT I’d rather use Piettetech_DHT.

SparkFunLSM9DS1 library also works perfect with their accel/gyro/magnetometer shield.

2 Likes

@rocksetta, if you look in my github repo, you will find many libraries I ported for the Core which can easily be updated, if necessary to run on the Photon. There are libs for low cost RFID readers, one for the Adafruit fingerprint reader, MMA7660 accelerometer, etc. The web IDE also has TinyGPS for GPS modules. I don’t believe any of us Elites know all the libraries on the IDE so you will need to do some discovery. :smile:

1 Like

@peekay123

Your site is at https://github.com/pkourany?tab=repositories

wow you have been a busy person. Thank you.

Fingerprint at https://github.com/pkourany/FPS_GT511C3_Library

mp3 at https://github.com/pkourany/Adafruit_VS1053_Library

multi-click at https://github.com/pkourany/clickButton

RFID at https://github.com/pkourany/MFRC522_RFID_Library

Adafruit MLX90614 sensors at https://github.com/pkourany/Adafruit-MLX90614-Library

and a ton more. I had never seen this github @peekay123. you are amazing!

1 Like

@rocksetta, clickButton is available on the IDE (I love that library) and most others should be good to go since I recently updated some of them. Let me know what doesn’t work and I’ll update as necessary. :wink:

1 Like

@peekay123 Ok, will do.

Your repository is going to be my lesson :smile:

Each student can pick a repo and report about what it does, hopefully a few students will use your repo’s for their final projects.

3 Likes

Good choice, learn from the best :+1:

1 Like