Kaikki kirjoittajan TJuTZu artikkelit

Single board computers

LattePanda

LattePanda is featured with quad-core 1.8Ghz, 2/4G RAM, 32/64 GB eMMC, WIFI, Bluetooth 4.0 and USB 3.0, plus onboard Arduino processor!

CHIP

CHIP – The World’s First Nine Dollar Computer. Kickstarter

UDOO

UDOO. Discover new single board computer with Wi-fi and Quad-core CPU supporting easy Android-Linux switch and fully compatible with Arduino.

Pine 64

PINE64 is an open source platform from both hardware to software. It’s a versatile single board computer capable of running today’s most advanced 64 bit version of Android and Linux.

Orange Pi

Orange Pi. It’s an open-source single-board computer. It can run Android 4.4 , Ubuntu, Debian, Rasberry Pi Image, it uses the AllWinner H3 SoC, and has 1GB DDR3 SDRAM

Ambient light on Raspberry Pi running Openelec with APA102 Led strip

Raspberry Pi running Ambient light

Build

On this article I will assume that openelec is already installed on Pi. Openelec image can be found from Raspberry Pi downloads or directly from get-openelec.

apa102-rpi_bb
On my build I am taking power to APA102 led strip directly from RPi. That is now the way it should be done but it seems to work.

My configuration based on configuration used with WS2801 LED strip.
hardware_ws2801_connection
On Raspberry Pi 2 MOSI and SCLK pins are at the same position.

Hyperion

Hyperion is used to control led strip

Install Hyperion, see instructions on https://github.com/tvdzwan/hyperion/wiki/Installation-on-RPi-with-OpenELEC

On SSH command line get installation file

curl -L --output install_hyperion.sh --get https://raw.githubusercontent.com/tvdzwan/hyperion/master/bin/install_hyperion.sh

And run it

sh ./install_hyperion.sh

Hyperion configuration

Create configuration file by using HyperCon. See instructions on Git page https://github.com/tvdzwan/hyperion/wiki/configuration

To be able to use apa102 led strip following configuration changes need to be made on HyperCon

TAB_Hardware

Type:

Adalight

Output:

/dev/spidev0.0

Baudrate:

900000

RGB Byte order:

BGR

 

Rest of the configuration on this page depend how many leds are used and how those are constructed. See more instructions from HyperCon Git

TAB_External

On Effect engine set

Directory:

/storage/hyperion/effects

 

On created hyperion.config.json file change Type from Adalight to apa102

APA102

And copy created configuration file hyperion.config.json in Openelec directory /storage/.config

Since we are using apa102 Leds we need to enable SPI on raspberry Pi. By default SPI is not available.

On SSH command line

mount -o remount,rw /flash
nano /flash/config.txt

At the end of file add

dtparam=spi=on

Press Ctrl-x , Y , Enter to save changes

Set directory readonly

mount -o remount,ro /flash

And reboot Pi

reboot

When Openelec start led strip should show rainbow colors and Ambient light should be running.

Sources:

raspberry-pi-pircam

Raspberry Pi motion detection IR Camera with IR lights

RaspCam10

Raspberry Pi camera module with PIR motion detector with external IR Lights

  • HW version 2.0
  • SW version 1.7.1

Camera shoot video as long movement is detected and take image every 10 minutes.

Application takes care that old recordings are removed and there is always enough disk space available. The amount of free disk space can be set on application settings.

This work is still in progress. Next I am planning to add possibility to store recordings on external server and change the schematic so that single 12V power is used instead of 5V and 12V  which are used in this configuration.

Components

  • Raspberry Pi
  • Raspberry Pi noir camera
  • HC-SR501 Adjust Pyroelectric Infrared IR PIR Motion Sensor Detector
  • 48 LED illuminator IR Infrared Night Vision
  • Switch
    • DB681 darlington transistor
    • 2,2 kΩ resistor
    • 1000 µF capacitor

The total cost of camera is around 70€

The related code is published at GitHub

Schematic

Raspberry_Pi_Camera

The idea in this configuration is that when motion is detected python application gets information of it and it will turn the illuminator on and start recording. Recording continue until movement is no longer detected.

The whole system is packed into standard casing since I don’t have 3D printer to create custom case.

RaspCam08 RaspCam07

I used TIP 120 based configurations as a base of my build. Since TIP 120 was not available locally I used DB681 darlington transistor instead. The 1000 µF capacitor was added to remove flicker. Without capacitor it light was flickering when standard 12v power source was used.

RaspCam04

The switch was build on separate board and connected to Raspberry Pi and insulated from Pi by using bike tire inner tube. On my original build switch was located on separate case.

RaspCam01 RaspCam02 RaspCam03 RaspCam05 RaspCam06

In this configuration PIR is connected on 5v, GND and GPIO4. Switch uses GPIO 24.

RaspCam09