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 own 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

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

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