• We welcome content that is not political, divisive, or offensive. If we feel your content leans this way or has the potential to, it may be removed at any time. A hot pepper forum is not the place for such content. Thank you for respecting the community!

Internet of Things (IoT) / Physical Computing

ho hum. no idea what any of that jazz is.

has anyone here actually looked into PLC's? im curious because its so much easier for my 9volt engineer brain to under stand than all this god damned code. if i ever get the time to invest, im like 90% certain it will be thrown at PLC ladder logic programming... direct logic in particular.

on another unrelated note.

i want to see a legit virtual pinball machine like this. http://www.davesclassicarcade.com/vpinball/vpinball8.html#top
but with a new OLED display with a nice matt AG coating. someone kick starter that one.
 
I'm pretty sure the OSAI controllers on the CNC's at work are mapping g-code to banks of Siemens PLC components that turn the water, vacuum, pumps etc on and off ...
 
I keep thinking about PIC, not PLC ... I have a little bit of familiarity with PIC programming, but again, no practical experience ...
 
But I did run into this while searching earlier, which looks like a bridge between the two worlds we're discussing: https://www.kickstarter.com/projects/24519005/controllino-plc-arduino-compatible
 
Maybe we'll get something going, after all ...
 
queequeg152 said:
ho hum. no idea what any of that jazz is.

has anyone here actually looked into PLC's? im curious because its so much easier for my 9volt engineer brain to under stand than all this god damned code. if i ever get the time to invest, im like 90% certain it will be thrown at PLC ladder logic programming... direct logic in particular.

on another unrelated note.

i want to see a legit virtual pinball machine like this. http://www.davesclassicarcade.com/vpinball/vpinball8.html#top
but with a new OLED display with a nice matt AG coating. someone kick starter that one.
I really think if you gave it half a shot you would prefer it to PLC's. The code I posted serves a webpage, Posts and reads content, uses that content to control a device. Pretty sophisticated really.
 
Here is some simple code  to turn a light on and off:
First import the modules to control pins and time:
import RPi.GPIO as GPIO
from time import sleep

This assigns pin 7 as output. Really just boilerplate:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)

Now turn the light on wait one second and turn it off
GPIO.output(7, 1)
sleep(1)
GPIO.output(7,0)

 
Now let's say you want to have a simple christmas light show where  two sets of lights flash at different times:
import RPi.GPIO as GPIO
from time import sleep

 
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.setup(8,GPIO.OUT)
 
GPIO.output(7, 1)
 
sleep(1)
 
GPIO.output(7,0)
GPIO.output(8,1)
 
sleep(1)
 
GPIO.output(7, 1)
GPIO.output(8,0)
 
queequeg152 said:
ho hum. no idea what any of that jazz is.

has anyone here actually looked into PLC's? im curious because its so much easier for my 9volt engineer brain to under stand than all this god damned code. if i ever get the time to invest, im like 90% certain it will be thrown at PLC ladder logic programming... direct logic in particular.

on another unrelated note.

i want to see a legit virtual pinball machine like this. http://www.davesclassicarcade.com/vpinball/vpinball8.html#top
but with a new OLED display with a nice matt AG coating. someone kick starter that one.
 
What frosty said, and ...
 
http://learnpythonthehardway.org/book/
 
eh. if i were to seriously pursue any particular language it would probably be fortran...
i took C as a freshman, but what i use most is matlab.

it sounds stupid, but fortran is what most engineers use to do serious analysis work. for what ever reason its like an order of magnitude faster than matlab.
 
Excellent support for floating point math, I think, is the reason ...
 
Python is becoming *that* now, though ...
 
It's recently replaced Java as the medium on which CS degrees will be built, and, there are excellent libraries (NumPy, SciPy) in that space ...
 
You'll note that I didn't list Haskell as one I've dabbled with, but I'd go so far as to say that Haskell is the preeminent choice in that space, nowadays ...
 
Following Grant's yesterday porn,
here are few arduino boards I've built ... quite few years ago.
These don't look good in any way one might even call them offending, but they were  just things put together that worked.
Bear in mind that was the era of serial arduino and atmega8, it was the rise of arduino, the beginning!
Arduino itself was built in the spirit of DIY.
I only wish I had that 70's porn filter on hand :)
 
arduino1.jpg

 
This is based on the original arduino serial signle sided board v2.0 design.
That version was never manufactured, it was just published on the site for people to build themselves.
I used male headers because .. oh well because it was all I had back then.
This is build on a protoboard because I couldn't get a decent way to drill the boards back then, I could etch them just fine
but it was a different story for drilling.
So it was perfboard all the way an it did work and you can easily modify them later.
Why connecting with the wires on the components side ? Well those are 2.54mm perfboards, it's kinda difficult to
adopt an etched board design to a perfboard, so I've just went the quick and dirty way.
 
arduino1-sside.jpg

 
I guess I cannot call it original single sided board because it has wires/traces on both sides.
 
 
Later I decided to build the updated version of single side board, severino that was v3.0.
 
arduino2.jpg

 
Still atmega8, still perfboard, female headers this time. Oh! you cannot see in this picture I've actually used shorter female headers here (because I didn't have anything else then) and later I've inserted normal height female headers over the existing ones and glud'em down with hot glue. Notice how I bent every capacitor (polarized ones and the oscillator caps) on the board, just to be able to insert shields over it :)
On the right there is a larger heat sink, it's a 3V3 regulator that the original design didn't have and I needed that for the 3V3 shields .. like the network shield was very popular back then.
The rather large heat sink was because I made a poor choice in 3.3V regulator back then, I've used a LM317 in lack of anything else.
 
So here's the network shield
 
arduino3.jpg

 
featuring enc28j60 by microchip a very difficult to get chip at that time and a very 5V intolerant chip (arduino was only 5V back then).
Aside from the network chip every component on this board was salvaged from other project or older boards.
ethernet jack and magnetics came from a 10M network card (+ some 49.9ohms 1% resistors), red/green leds I stole from a 'newer' 10Mb network card :)
Level shifter on right above corner I stole from a broken pc motherboard/
Other components are just scrap that you find in your drawer.
The beauty about this board is that it really worked (and it still works, I think), it's really nice to be able to ping an atmega8 arduino that allowed around 7k of bytes code.
 
arduino3-sside.jpg

 
Solder side, I don't know why, somehow it reminds me of cordwood circuitry. :)
Ugly? yes, works? definitely.
 
Don't worry, meanwhile I bought modern real manufactured arduinos, I do not use those anymore,
I do occasionally miss the serial port with the DB9 connector and the noise it generated on the MCU.
 
Python is what you use when your time is more valuable than processor time. It is the fastest language to develop applications. While it is not the fastest language, you will still see it is used in high speed applications like Foreign exchange and stock arbitrage. People spend 10's of millions to have fast systems and then use python because you can develop algorithms faster.
 
I'll bet you that python will run anything you developed in matlab much faster.
lucilanga said:
Following Grant's yesterday porn,
here are few arduino boards I've built ... quite few years ago.
These don't look good in any way one might even call them offending, but they were  just things put together that worked.
Bear in mind that was the era of serial arduino and atmega8, it was the rise of arduino, the beginning!
Arduino itself was built in the spirit of DIY.
I only wish I had that 70's porn filter on hand :)
 
arduino1.jpg

 
This is based on the original arduino serial signle sided board v2.0 design.
That version was never manufactured, it was just published on the site for people to build themselves.
I used male headers because .. oh well because it was all I had back then.
This is build on a protoboard because I couldn't get a decent way to drill the boards back then, I could etch them just fine
but it was a different story for drilling.
So it was perfboard all the way an it did work and you can easily modify them later.
Why connecting with the wires on the components side ? Well those are 2.54mm perfboards, it's kinda difficult to
adopt an etched board design to a perfboard, so I've just went the quick and dirty way.
 
arduino1-sside.jpg

 
I guess I cannot call it original single sided board because it has wires/traces on both sides.
 
 
Later I decided to build the updated version of single side board, severino that was v3.0.
 
arduino2.jpg

 
Still atmega8, still perfboard, female headers this time. Oh! you cannot see in this picture I've actually used shorter female headers here (because I didn't have anything else then) and later I've inserted normal height female headers over the existing ones and glud'em down with hot glue. Notice how I bent every capacitor (polarized ones and the oscillator caps) on the board, just to be able to insert shields over it :)
On the right there is a larger heat sink, it's a 3V3 regulator that the original design didn't have and I needed that for the 3V3 shields .. like the network shield was very popular back then.
The rather large heat sink was because I made a poor choice in 3.3V regulator back then, I've used a LM317 in lack of anything else.
 
So here's the network shield
 
arduino3.jpg

 
featuring enc28j60 by microchip a very difficult to get chip at that time and a very 5V intolerant chip (arduino was only 5V back then).
Aside from the network chip every component on this board was salvaged from other project or older boards.
ethernet jack and magnetics came from a 10M network card (+ some 49.9ohms 1% resistors), red/green leds I stole from a 'newer' 10Mb network card :)
Level shifter on right above corner I stole from a broken pc motherboard/
Other components are just scrap that you find in your drawer.
The beauty about this board is that it really worked (and it still works, I think), it's really nice to be able to ping an atmega8 arduino that allowed around 7k of bytes code.
 
arduino3-sside.jpg

 
Solder side, I don't know why, somehow it reminds me of cordwood circuitry. :)
Ugly? yes, works? definitely.
 
Don't worry, meanwhile I bought modern real manufactured arduinos, I do not use those anymore,
I do occasionally miss the serial port with the DB9 connector and the noise it generated on the MCU.
woah those boards are like desperate women; ugly and beautiful at the same time
 
Thanks for sharing ...
 
I've built some calculators and other simple little Sparkfun/AdaFruit soldering-learning stuff, and I have the pictures somewhere and will share them when I track them down (was a bit ago, now) ...
 
Swamped in CAD tonight, but I have a fun idea for folks who come here ...
when i was focused on webdev, choosing ruby over python seemed like the "right" choice ... now, not so much ...
 
That propane regulator ... a really nifty piece of work!
Everybody should have a 3D printer in their basement.
 
Oh I think they got wifi problems, every other picture, there is an Ethernet cable hooked up. :)
 
Nicely done, however I do not think we can bake pizza @1800 :)
 
that kiln is wicked cool.
can you get it hot enough to heat treat like... steel alloys? like HSS
edit:

1800?! ahh thats cool. you could make pottery n junk in there.

what do you use it for if i may be so bold.
 
Note: that one's not mine!
 
But, as my gf works w/ glass bead jewelry and stuff, it's likely used for glass dinner plates, bowls, and jewelry etc ...
 
I've priced those hexagonal kilns before, it's not too terrible ...
 
I was finding them to range from about $650 - $1200 ...
 
I have that info somewhere, which I can try to share w/ a little time to hunt it down ...
 
Even found one that was pretty damn powerful on 110, if I recall ...
 
Also of note, especially in terms of relevance here, the bricks you use in the kiln are cordeirite or whatever, the best material for pizza stones and heat bricks for your grill etc (and sold at MUCH lower prices than pizza stones typically are) ...
 
Overkill. Must be an engineer to make something so simple complicated. We're talking a thermostat, a timer and a hot plate.

My humble opinion
 
frosty said:
Quick q if I put a bunch of bricks in a grill and let it heat up can I get close to baking in a grill
 
I don't see why not ... the kamado grills are outdoor ovens anyways ...
frosty said:
Overkill. Must be an engineer to make something so simple complicated. We're talking a thermostat, a timer and a hot plate.

My humble opinion
 
First, engineers don't make things unnecessarily complicated, but "architects" do =)
 
The code spike for a PID controller is pretty simple and there's pseudo code all across the net, man ...
 
prev_error = 0
integral = 0
loop_start:
  local_error = setpoint - measured_value
  integral += (local_error * dt)
  derivative = (local_error - prev_error) / dt
  output = Kp * local_error + Ki * integral + Kd * derivative
  prev_error = local_error
  wait(dt)

  goto loop_start
 
Back
Top