Raspberry PI as a equivalent of PLC

If you did not require responsiveness that offers PLC driver you can use much cheaper solution as Raspberry pi with HATs

I will present you simple adaptation of this theory, Raspberry pi as a industrall water pomps driver

What I used:

  • Raspberry PI 2+ (generates less heat and is more relayable on harsh conditions)
  • Power HAT of my project (suplys 5V 3A to run Raspberry pi, from any voltage witin range of 9-24V)
  • MOSFET HAT witch will turn on and off 12V to switch on and off industrial relays, witch then will turn on and off softstart devices to run the pomp
  • Bufferd power suply
  • Custom 3D printed case
  • GSM module to comunicate with HTTP server to recieve commands and store telemetrics data

And the software which is most important, all function are implemented by JAVA app, that runs on modified Raspberin OS

The modification concentrate on less use of the SD card, less write cycles, I acomplish this by creating ram drive that holds system logs, and removing all not needed services and software that can afect responsivness and consumes precious write cycles

Raspberry pi is equipped in heat spreader and protected by PVE lacquer

Raspberry PI is quite robust little device and can withstand very hard environment, but my current projects are based on Raspberry PI Zero witch is cheaper smaller and generates less heat and need less power, missing ETH connectivity can by fixed by simple HAT based on ENC28J60-I/SP

And at the end some pictures

Home automation installation

The all idea started from building a new home, I realized that this is aportuninty to fit automation system right to my nieeds, not to fit my needs to what is available on the market and amound of money I can spend on this instalation, comercial solutuions can be really expensive

Basic assumption

First of all brain of this installation should be an Raspberry PI, as all we known this little computer does not have sufficient count of free input/output pin to control all elements of the system so I designet network attached interface between Raspberry and the world

This is a prototype, used version has impulse converter to power the board, why this change, it’s simple 16 of this devices in small space will generate lots of heat to much heat

The wiring

What about a difficult part, cables…. here they are, the larger box on the right is compartment for automation system

Inputs

Each of cables from the automation box goes to each room, and ends in places where will be light switches located and alarm sensors

Outputs

Second part is electrician box, because each manageable light source has to have seperate cable from electrical box to light mounting point

The secret

How it’s works ?

  • Each light source (point in the room where will be light connected to electrical grid) is connected via controller on board relay to fuses (fuses are located in separate elecrication box)
  • Each light switch is connected to controller input
  • Each alarm sensor is connected to input on the same controller

For each room is at least one controller and two extra for outdoor lights, and two in separate box to control garage door open and door bell and so on…

The software

Now te most interesting part, everything can be controlled and routed independently by software, by default the switch on the wall tuns on and off coresponding light, but just changing definition in software and the same switch can turn on and off diferent light, or more than single light, even in diferent room, I can program time cycles to switch light if became dark or to symulate presence in house, light can be turn on if sensor in room detects movement and so on ther are endles possibilities

By the way software, the app that makes all the magic is written in Java, and with some C implementation

Security

There is also security function in this, all around the home there are motion sensors mounted on the ceiling, if alarm is turned on andif sensor will detect movement then will be send email notification as well as SMS to me

All this in a fraction of the cost I would spend on commercial system, software is still in development tage I workin on adding double click to light switches and more sophisticated reactions

Network automation controller

Network automation controller with one 250V 5A relay output and two digital inputs detecting the change of short-circuit to power supply, optionly can be supplied with headers for 3 digital input\output and UART, I2C, 5V, 3V3.

In “two” simple words small device that give you ability to control or recieve signal from real world, over the network by your app using simple URL addresses,or with different firmware can be used to endless kinds of applications

In this particular situation is used as watchdog to network devices, this little device can switch off power in case of permanent hangs of monitored devices

Technical specs:

  • power supply: DC12V 60mA
  • relay output: NO 250VAC 5A / 30VDC 5A
  • analog inputs: 2x monitoring state of the switch, contactor, relay, 12V 1.5A
  • LAN standard: 10Mb/s FD
  • dimensions: 79x77x19mm
  • frame for mounting: DIN TS35 rail
  • MCU: Atmega 328PU
  • protection: each board is protected by PVE lacquer
  • can be mounted in blocks on TS35 rail or on a custom mounting plate

And some image to illustrate example application

Raspberry PI Power HAT

What is it?

Power HAT for Raspberry PI, can deliver up to 3A of power from DC source 8-30V Board is fully assembled and ready to use

Why did you make it?

USB-micro is so fragile and unreliable. So I created this

What makes it special?

It’s cheap simple and durable, has one controllable led and one button

Technical specs:

  • input power supply: DC8-30V
  • power delivery up to 3A
  • dimensions: 97x56x22mm
  • frame for mounting: DIN TS35 rail
  • protection: each board is protected by PVE lacquer
  • one LED controllable by Raspberry PI
  • one button

https://www.tindie.com/products/jastrzab/raspberry-pi-power-hat/

Raspberry PI Input/Output HAT

What is it?

Input/output HAT for Raspberry PI. The NO relay output can switch on and off AC/DC circuits. The input can detect state of switch or relay connected between PLUS (+) terminal and INPUT terminal

Can be delivered with or without soldered gold-pins connector, one 20 pin female connector is included and one 2 pin, one 20-pin male connector

Why did you make it?

To receive signals from or control elements of environment, for example to receive signal from ordinary motion sensor and be able to turn on alarm siren and make from Raspberry PI simple alarm

What makes it special?

It’s cheap simple and durable

Technical specs:

  • output relay: NO 10A 250VAC/10A 30VDC
  • input: 500mA 40V
  • dimensions: 97x56x22mm
  • frame for mounting: DIN TS35 rail
  • protection: each board is protected by PVE lacquer

https://www.tindie.com/products/jastrzab/raspberry-pi-inputoutput-hat-2/

Board, arduino compatible with web server and ARK terminals

  • Arduino compatible board that can be attached and controlled via ethernet network, with built in buck converter, equipped in all digital and analog inputs/outputs.

Board is fully assembled and programed to be controllable via network, has build in HTTP server that can receive requests to set or read digital or analog pin state also with PWM.

Board can be programed with custom program but this require external programer for example Arduino UNO, board is fully compatible with this board.

The advantage over UNO is built in impuls converter that can deliver up to 2A of power, screw terminals to connect with external signal source and THT durable construction ready for implementation.

In this way you can control digital PIN and analog PIN or communicate with I2C devices or sends or receives transmission through UART, amount data that can be send or recieved is limited because limitation of Atmega328 MCU, but can be used to basic operation with external devices

Technical specs:

  • input power supply: DC7-40V
  • power usage: ~100mA (board alone)
  • LAN standard: 10Mb/s FD
  • dimensions: 113x58x24mm
  • frame for mounting: DIN TS35 rail
  • MCU: Atmega 328PU
  • protection: each board is protected by PVE lacquer
  • power suply for 5V rail: inpuls converter max 2A
  • power suply for 3v3 rail: linear converter max 500mA

Input/Output capability:

  • 6x – analog input
  • 3x – PWM output
  • 9x – digital input\output
  • 1x – I2C interface
  • 1x – UART interface
  • 1x – 5V power suply
  • 1x – 3V power suply

*all inputs/outputs are controllable via Web API

Store link

Continue reading “Board, arduino compatible with web server and ARK terminals”

Barometer

● Selectable pressure unit (hPa, mmHg, inHg, atm, psi)
● Barometric altimeter (m, ft)
● Easy to use calibration
● Able to save user reading
● History of readings with graph
● Pressure change trend
● Scalable desktop and lock screen widget
● Ability to export readings history to CSV file
● Ability to save current graph view to image file

How to calibrate ?
Slide pressure indicator to expected position and click +/- button on action bar

Scan the QR Code

Remote Camera

  • Remote Camera, have phone and tablet or second phone and want to reach where eyes can’t reach, or want to look on your sleeping baby from other room, take picture without revealing this, this app is just for you. Communication takes place directly between two devices equipped with this software, communication doesn’t result in any charges, but distance is limited.

How to use it ?

  1. instal app on both devices
  2. on first device turn on Server
  3. on second device, find device with name or address that matches to first device name or address and tap on it to establish connection
  4. if connected, you can make pictures or just see what first device is seeing but on second device

Remember about !

  • Devices must be within the communication range or in the same network for WIFI connection
  • Bluetooth adapter must be enabled and devices must be paired for Bluetooth connection
  • WIFI connection must be established for WIFI connection
  • Pictures are saved on server side
  • Preview smoothness depends on device and connection performance
  • Electromagnetic interference, obstacles and distance can cause communication problems even connection break
  • If preview is stopped try to reconnect, if connection will be unsuccessful then restart server

Windows and Linux, Systems equipped with Java software can control camera on mobile device via WIFI using Remote Camera

  • left button – take picture
  • right button – take focus
  • middle button – turn on/off flash ligth
  • scroll wheel – zoom in/out
  • scroll wheel + shift – change window size
  • scroll wheel + ctrl – change exposure compensation
  • up/down arrow – change window size
  • left button + shift – save locally received frame
  • enter – start/stop video recording

Scan the QR Code

Sound Detector

  • Turn your phone into a remote audio surveillance device or baby alarm or just a sound recorder, you can also detect sound for other apps such as Tasker or Automagic

Program uses built-in microphone so effects can be unsatisfying, reaction time depends on device performance and sample rate frequency, maximum sampling rate, will not work on all devices

FEATURES
recording only when sound is detected in mp3 format
● send SMS when sound is detected
● send EMAIL when sound is detected, attachment available only if continuous recording is disabled
● continuous recording, create one big recording for all events
● event recording, create new recording for each event, but close events still can be merged in one recording
● sensitivity adjustment with sensitivity calibration helper
● adjustable length of recording, after sound is detected
● can work when screen is switched off
● event log, counter
● records duration limit
● records output file size limit
● select folder for records
● ability to send notifications to other applications such as for example Tasker, when it detects sound
● ability to control detector by other applications such as for example Tasker or Automagic
● widget to quickly enable or disable detector
● adjustable delay from turning to record or between events
● temporary storage feature

ATTENTION
To use widget you need to move program to phone memory

Scan the QR Code

Motion Detector

  • Change your device to a motion detector, or remote surveillance camera or even spy cam with motion detection functionality, you can also detect motion for other apps such as Tasker or Automagic

Program uses device’s built-in camera so effects can be unsatisfying, reaction time depends on device performance and frame size, maximum and minimum size of recorded frames depends on the device.

FEATURES
● save images captured when motion is detected
● upload captured images to FTP server
● post images on HTTP server (for advanced users)
● send an EMAIL with captured image
● sound when motion is detected
● select which camera to use, front or rear
● adjustable detector sensitivity and resolution
● change image resolution recorded by detector
● set active zone, motion will be detected only within the zone
● adjust exposure compensation and exposure lock, not all devices support these features
● can work when screen is switched off, at least it should
● event counter, log
● profiles for settings
● change image destination folder
● send notifications to other applications such as for example Tasker, when it detects movement
● control detector by other applications such as for example Tasker or Automagic
● ability to control detector by Broadcast Intent
● set how many events, will trigger reactions
● print event time and date on every frame
● widget to quickly enable or disable the detector
● time lapse function
● temporary storage feature

ATTENTION
● To use widget you need to move program to internal memory
● Default position is when the device lies on the longer side

Permission Read Phone State is used to detect incoming call, and silence alarm when it`s switched on

 

Scan the QR Code