Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Perl Code To Control Industrial Applications?

by mje (Curate)
on Feb 11, 2014 at 09:15 UTC ( [id://1074369]=note: print w/replies, xml ) Need Help??


in reply to Perl Code To Control Industrial Applications?

There are 2 obvious choices.

Use an Arduino and Perl. Unfortunately, arduino's need to be programmed in C but then you can talk to them from Perl. So you put the interface to you hardware sensors, relays etc in the Arduino and then you can read and control them from Perl using the usb/serial port or something like HTTP if you add a network card to your arduino. I've done a little of this in the past - see monitoring our machine room temperature with nagios, perl and arduino and Version 2 electricty meter power logging

The second choice is a raspberry pi. Interfacing it to the electronics is slightly harder but there is a Perl module to talk directly to the gpio on the pi. So this would be an all Perl solution.

An arduino (something like an AT Mega) will cost you around £20 and a pi around £25 so little difference there. The arduino will need C code writing so if you want a Perl only solution it will have to be the pi. The pi also has the advantage that it already has networking although this can easily be added to an arduino.

The raspberry pi is really a small computer which has HDMI out so you can connect it to a monitor and usb to connect a keyboard and mouse. People usually install a version of Linux. It will need a power supply and it is really a bit short on memory to run an operating system - I even had problems running out of memory installing CPAN modules at first (see Raspberry Pi - will it get our children programming? and if so why not in Perl?). The arduino on the other hand can be powered off the usb port or a small battery and has loads of options to cut power usage to run for longer times on a battery.

Simple temperature probes will be fairly easy. Turning on/off heating elements will be harder as you have to isolate them from the controller. You're going to need some electronics knowledge.

  • Comment on Re: Perl Code To Control Industrial Applications?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1074369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-16 22:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found