Monthly Archive:January 2017

Bynora

Use Raspberry pi to driver Servo Motor

Use the following diagram to connect a Servo Motor.

PWM
A couple of notes before you get started:
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you! In this case we’ll be using a PCA9685 PWM controller to connect our Servo to the Pi. We’ll also be using an external 5v power supply to provide power to the Servo.
To add a PWM Output you will need a PWM controller. For this example we will use a PCA9685 PWM I/O Controller. This tutorial assumes you already have the PCA9685 connected. Refer to the PCA9685 Tutorial if you need assistance with that part.
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.
Step 1
Connect power from the external power source to the PCA9685. Also connect power from one of the output channels (V+) on the PCA9685 to the servo motor (red).
Step 2
Connect ground from the external power to the PCA9685. Also connect ground (GND) from the PCA9685 (GND) to the relay (black).
Step 3
Connect the control channel (PWM) from the PCA9685 to the relay (yellow).
Step 4
You’re done! You can now add the Servo Motor to your dashboard, controlling it through the PCA9685 (Channel 15 in our example).

Bynora

Use Raspberry pi to driver a Relay

Use the following diagram to connect a Relay Switch.

PWM

A couple of notes before you get started:
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you! For this example, we will use our relay switch to switch an LED on/off.
Relay switch boards come in many sizes, allowing you to connect and control several devices. In our case, we will use a board with 2 inputs but only connect our device on the first channel.
The voltage required by your relay switch may differ from that used in the example. Please refer to the specifications of your device to verify power requirements.
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.

Step 1
Connect 5v power from the Pi Cobbler to the relay board.

Step 2
Connect ground from the Pi Cobbler to the relay board.

Step 3
Connect the relay control pin (IN1) to a GPIO pin on the Pi Cobbler, in this case Channel 13.

Step 4
Connect 3V power from the Pi Cobbler to the LEDs longer pin, through the resistor.
Step 5
Connect the relay (K1) common (CO) pin to ground. Also connect the normally open (NO) pin to the LEDs short lead. You may chose the normally closed (NC)
pin of the relay instead, depending on your needs.
Step 6
You’re done! You can now add the Relay Switch to the dashboard and use it to control the LED on GPIO 13.

Bynora

Use Raspberry pi to driver Photoresistor Luminosity sensor

Use the following diagram to connect your Photoresistor.

PWM

PWM
A couple of notes before you get started:
In order to use an analog sensor with the Raspberry Pi we must use an Analog to Digital converter. If you use CP3008 please kindly refer to diagram 1, if you use MCP3204 for this task, please kindly refer diagram 2 as above.
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.
Step 1
Connect power from the Pi Cobbler to the Photoresistor.
Step 2
Connect the Photoresistor to ground through a 10K pull-down resistor.
Step 3
Connect the Photoresistor to the MCP3008/MCP3204.
Step 4
You’re done! You can now add the Photoresistor to your dashboard, using the MCP3008 Channel 0 to read values from the sensor.

Bynora

Use raspberry pi to drive PIR Digital Motion Sensor

Use the following diagram to connect your Digital Motion Sensor.

PWM
A couple of notes before you get started:
Make sure Raspberry Pi is powered off when connecting wires.
When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.

Step 1
Connect 5V power from the Pi Cobbler to the Motion sensor.
Step 2
Connect the Motion Sensor to one of the GPIO pins on the Pi Cobbler, GPIO 17 in this case. Be sure to connect a resistor between the GPIO pin and the motion sensor.
Step 3
Connect ground from the Pi Cobbler to the Motion sensor.
Step 4
when you’re done,you can add the Digital Motion sensor to your dashboard as following instruction, using GPIO 17 as the input channel.
Add new >> Device/Widget >> select Digital motion sensor>> select channel 17 >> Add sensor

Bynora

RPI Tutorial- BMP180 Barometric Pressure & Temperature sensor

Use the following diagram to connect your BMP180 Barometric Pressure / Temperature sensor.

PWM

A couple of notes before you get started:

  • The BMP180 has a default I2C address of 0x77. Cayenne will automatically use this address when adding the BMP180 through the Add Device process.
  • Make sure Raspberry Pi is powered off when connecting wires.
  • When using a GPIO ribbon cable, make sure the power wire (it’s a different color than the others) is connected to the corner of your Raspberry Pi and the top of your Pi cobbler.
  • The provided diagram is just an example of how to connect the sensor. There are many ways to connect sensors and extensions, so try what works best for you!
  • Some full-size breadboards (used in diagrams below) have a powerline that is separated in the middle. If this is the case, be sure your sensors are connected on the same half of the breadboard as your Pi Cobbler.

When you get done, you can now add the BMP180 to your dashboard.