What am I doing with Arduino and Raspberry Pi?

Hello.

My Facebook disciple know more already then my beloved blog reader. A few days ago I posted the following pictures in Facebook:

The description was:

Da bomb is in da house… and working quite fine :)
What is that, beside of a beautiful piece of art of colored wires and electric stuff.
Of course it is not exploding :) It is a small stand-alone measuring station. It contains:
1x Arduino Pro Mini -> The micro controller which is processing all the data
1x Power supply -> No cool e-stuff without a bit electricity
2x Photo resistor -> to measure the amount of light around (of course, both give different values… ^^)
1x DHT11 -> Measures temperature and humidity
1x DHT22 -> Measures temperature and humidity as well… the newer model of the DHT11
1x LM35 -> Measures temperature… I fucked it when I mistaken plus and minus :( It is still sending values… but useless ones.
1x MQ-2 -> Measures the amount of smoke/lpg/co gas in the air.
1x 1.8” TFT with SD card -> To display the values and it is also writing all data in a log file on a sd card for later processing.
So far… will be continued…  :)

So… why do I play around with it?

An Arduino is a micro controller. Actually a micro controller on a board with some more stuff, to make it easier to work with it for the people. It got invented from Massimo Banzi and David Cuartielles (and named after a pub… yeah yeah :) ). David Mellis developed the programming language for it. The whole system is open source. That means everybody can see the sources, how it works. That’s why there are also copies of the original Arduino available and even you could solder your own one. It’s a quite easy way to get in touch with the micro controller stuff.
But lets have a look to another kind. As I mentioned in the headline already, there is also a ‚Raspberry Pi‘.

The Raspberry Pi is similar to Arduino, but also different. The Raspberry Pi is more a micro computer then a controller. He consist a 700MHz ARM processor (the same CPU architecture as in mobile phones), 512MB RAM, etc. As operating system is usually Linux installed. Here is one big difference, the Raspberry Pi have a operating system, the Arduino doesn’t.

So, what does it mean now?

Both boards have GPIO pins. That are connectors on which we can connect sensors and such sttuff. One sensor is for example the DHT22… a sensor which is measuring the temperature and humidity. I can connect this sensor now to the Arduino and the Raspberry Pi. A small program written and it will show me the values of the sensor.

So, one board is enough!?

In general yes. But it is always a question of what we want to do.
With the Raspberry Pi the possibilities are much bigger, because we can make a lot more with the board as just reading sensor values. We have much more storage available. We can install software and have even a GUI (graphic user interface). We can write emails, texts, we can program and much more. Its a full computer, just a bit limited in its resources. But therefore it consumes more electricity.

I mean ‚consuming more electricity‘ is relative here. 3.5 Watt is usually not worth a word! But if you want to create (for example) a stand alone weather which have a battery as power supply, then is 3.5 watt a very bad consumption and the weather station will not even run 1 day. Here is a solution needed which is running with as less power as possible. And here comes the Arduino in the game. That is his strength. Doing a job (like reading sensor values) and consume almost no electricity.

Why do I get in touch with this strange stuff?

Don’t worry, I didn’t went to become a bomb builder;) (Hello NSA… and again a match with a keyword… congratulation! ;) )
Well, some know that I have a new project in my head. I want to travel around with a camper. To do so, I need to take my work with me. That means internet and electricity in the camper. But power will be very limited and my current computer have a consumption of approx 200 watt. So, this one is out of the game. I need a more battery-saving alternative is needed. Then I ‚met‘ the Raspberry Pi. It was clear that this small computer can not replace a working station, but it can be used to do at least some of the job. 3.5 watt is a good number for a 24h server. Even 3.5 * 24 is also 84 watt per day – in the theory – but I hope in praxis it will be a bit less, as the RPi is slowing down in times of not usage. I just testing it with a 10.400 mAh battery.

ArduinoBut I guess the RPi will be quite busy with all the task I have in mind for it :) As following:

  • NAS with external SSD
  • Local web server for development
  • Automatic connection control system for internet sources (Sat-DSL, WLAN, GPRS, etc.)
  • Desktop for internet, watching movies, programming, etc.
  • Central data processing unit for decentralized Arduinos with their sensors (weather sation (somewhere outside), camera modul in the front of the camper, motor sensor, gas sensro, etc.)

The are the rough tasks which the poor little guy needs to do.

I also need to note that I am testing the little PRi already and I need to mention that I am absolutely positive surprised. The little guy is not that weak as I thought. (Always with the consumption of 3.5 watt in mind… CPU without cooling!). The GUI is running properly. Also movies running with VLC. Icedove (the Linux version of Mozilla Thunderbird) needs a few more seconds, until its loading my several thousand emails. But then its ready for use. LibreOffice (like MS Office) the same. There are even games for the Raspberry Pi. I tried Mindcraft for a while and it is running smoothly.
As I said, with the hardware in mind, is this little computer a technical marvel.

And the Arduino joint my ‚tool box‘ when my play instinct got activated. :) This stuff is so awesome for me now, that I can’t stop playing with it :) Real addiction factor! When you made your first circuit, the first script is written and transferred to the Arduino and the LED really starts to blink… then you feel a bit like god… ‚This LED is blinking now because I wanted it!‘ :D
And then further… measuring temperatures, lighting up LEDs, reading light intensity (is it night, how strong is the sun shining, etc.), reading GPS coordinates and showing on a map, flame sensor (is it burning?), noise sensor, displays to show information, … and much more. The possibilities are almost endless. With a bit of creativitiy is it possible to make some really cool projects.

And in MY endless creativity (*cough*) I have the following projects in mind (in the camper).

      • Weather station with sensor for temperatur, humidity, air pressure, light intensitiy, Geiger-Müller tube, GPS, etc.
      • Camera module in front of the camper, which is making a picture every hour and is uploading it when internet connection is online)
      • Gas sensor at the gas bottles, in the kitchen and at the heating. Also gas sensor for the gas which the thieves like to use.
      • Connction to the engine electronic. For example to read the error buffer of the engine computer. Its not with every car possible… will see.

I think to remove the doorhandles and use instead a key card / fingerprint reader to open the doors. Instead of a key. The would confuse some thieves. ;)

 

Of all this data I want to make my own little black-box. But primarily I want to store this data in a database and put it online that everybody (who is interested) can see the data. (GPS data for security reasons with a time delay, of course ;) ) But that is all still up in the air. At the moment I still play around with both boards and try to build some stable systems. To test and get experience with it.

So, if you want to have a look at the micro controller world, then check out Arduino and / or the Raspberry Pi. I can highly recommend both systems. Is fun like hell and not hard to learn at all.

Best wishes
Gordon

Was ist ein Arduino und Raspberry Pi?

Hallo zusammen.

Meine Facebookjünger wissen schon wieder mehr als meine lieben Blogleser. Vor einigen Tagen habe ich die folgenden Bilder bei Facebook hochgeladen:

Die Beschreibung dazu war:

Was ist das, außer eines wunderschönen Stück Kunst mit bunten Kabeln und elektronischem Zeug?
Natürlich explodiert es nicht.  Es ist eine kleine Messstation.
Es beinhaltet:
1x Arduino Pro Mini -> Der Mikrocontroller der die Daten verarbeitet
1x Stromversorgung -> Kein geiles Elektrozeug ohne Strom
2x Photoresistor -> Misst die Menge an Licht in der Umgebung (also wie hell es ist) (beide Sensoren haben natürlich unterschiedliche Werte… ^^)
1x DHT11 -> Misst Temperatur und Luftfeuchtigkeit
1x DHT22 -> Misst auch Temperatur und Luftfeuchtigkeit… das neuere Model vom DHT11
1x LM35 -> Misst Temperatur… Ich habe es kaputt gemacht als ich Versehentlich Plus und Minus vertauscht habe  Sendet noch Daten… aber Schrott.
1x MQ-2 -> Misst den Gehalt von Rauch/LPG/CO Gas in der Luft.
1x 1.8″ TFT mit SD Karte -> Zum Anzeigen der Werte und schreibt auch alle Werte in eine Log-Datei auf die SD Karte um die Daten später weiter auswerten zu können.

So… was ist das nun und warum mache ich damit rum?

Ein Arduino ist ein Mikrocontroller. Eigentlich ein Mikrocontroller auf einer Platine mit noch ein paar anderen Sachen. Alles in allem ein Arduino. Der wurde von Massimo Banzi und David Cuartielles entwickelt (und benannt nach einer Bar… ja ja :) ). David Mellis hat dann noch die Programmiersprache dazu geschrieben. Das gesamte System ist Quelloffen. Das heißt man kann alles einsehen. Wie der Arduino aufgebaut ist. Deswegen gibt es auch schon viele fleißige Kopierer und im Grunde könnte man sich seinen Arduino sogar selbst zusammenlöten. Mit dem Arduino kann man recht einfach in die Elektronik einsteigen. Doch kommen wir erst einmal noch zum anderen Vertreter. Denn in der Überschrift steht auch etwas von einem Raspberry Pi.

Der Raspberry Pi ist dem Arduino ähnlich, aber doch unterschiedlich. Der Raspberry Pi ist mehr ein Mikrocomputer als ein Controller. Denn er besitzt einen 700MHz ARM Prozessor (also die gleiche CPU Architektur wie in Handys), 512MB Arbeitsspeicher, etc. Als Betriebssystem kommt überwiegend Linux zum Einsatz. Hier ist einer der großen Unterschiede… der Raspberry Pi hat ein Betriebsystem, der Arduino nicht.

Und was heißt das nun?

Beide Boards haben GPIO Pins. Das sind einfach Anschlüsse an die man z.B. Sensoren anschließen kann. Ein Sensor ist z.B. der DHT22… ein Sensor mit dem man die Temperatur und die Luftfeuchtigkeit messen kann. Diesen Sensor kann man nun an den Arduino und auch an den Raspberry Pi anschließen. Ein kleines Programm geschrieben und schon zeigen beide die Daten an, die sie vom Sensor erhalten.

Dann reicht doch ein Board!?

Im Prinzip schon. Aber es kommt immer darauf an was man machen will.
Am Raspberry Pi sind die Möglichkeiten um weiten größer, wenn man an dem Board auch sonst noch etwas machen möchte. Es steht mehr Speicher zur Verfügung, Software kann installiert werden und sogar eine grafische Benutzeroberfläche steht zur Verfügung. Man kann mit dem Raspberry Pi online gehen, eMails abrufen, Texte schreiben, Programmieren (natürlich) und viel mehr. Es ist ein vollwertiger Computer, nur ein wenig Limitiert in den Ressourcen. Dafür verbraucht er aber auch mehr Strom.

Wobei ‚mehr Strom verbrauchen‘ natürlich relativ ist. 3,5 Watt ist im Normalfall nicht erwähnenswert! Wenn man aber z.B. eine kleine Wetterstation bauen möchte und diese möglichst autark mit Batterien und Solar betrieben werden soll, dann sind 3,5 Watt doch schon extrem schlecht. Dann braucht man eine Lösung die kaum Strom verbraucht. Hier kommt der Arduino ins Spiel. Das ist seine Stärke. Stumpf eine Arbeit verrichten (z.B. Sensorwerte auslesen) und dabei möglichst wenig Strom verbrauchen.

Und warum beschäftige ich mich jetzt mit diesem komischen Zeug?

Keine Angst, ich bin nicht unter die Bombenbauer gegangen ;) (Hallo NSA… und wieder einmal das Stichwort gefunden… Gratulation! ;) )
Nun, manche wissen ja das ich ein neues Projekt im Kopf habe. Ich möchte mit einem Wohnmobil durch die Gegend gondeln. Dabei möchte ich meine Arbeit natürlich mitnehmen. Das heißt Internet und Strom in den Camper. Da Strom knapp sein wird und mein Heimrechner im Schnitt um die 200 Watt verbraucht, fällt das flach. Eine stromsparende Lösung muss her. Da bin ich auf den Raspberry Pi aufmerksam geworden. Natürlich ist mir klar das dieses System keinen Arbeitsrechner ersetzen kann (schön wäre es). Aber als 3,5 Watt Knecht kann er doch einige Aufgaben übernehmen. 3,5 Watt … das sind bei 24 Stunden zwar auch 84W/h – in der Theorie – aber ich hoffe in der Praxis wird es weniger, da der RPi bei Nichtbenutzung ‚runter-schaltet‘. Ich teste gerade mit einem 10.400mAh Akku.

ArduinoAber ich vermute mal das er gut beschäftigt sein wird. Wenn ich alles realisieren kann, was ich vorhabe, dann wird er für folgende Aufgaben eingesetzt:

  • NAS mit externer SSD
  • Lokaler Webserver zum Testen
  • Automatische Verbindungskontrolle der Internetsourcen (Sat-DSL, WLAN, GPRS,etc.)
  • Desktop für Surfen, Film schauen, Musik hören, Programmieren, etc.
  • Zentrale Datenverarbeitungsstation für dezentrale Arduinos mit ihren Sensoren (Wetterstation (irgendwo außen), Kameramodul vorn im Camper, Motorsensoren, Gassensoren, etc.)

Das sind so die groben Arbeiten die das arme kleine Teil verrichten muss.

Ich muss aber auch gleich dazu schreiben das ich den kleinen RPi schon ordentlich teste und möchte betonen das ich sehr positiv überrascht bin. Der kleine ist gar nicht so schwach auf der Brust wie ich vermutet hatte. (Immer mit den 3,5 Watt Stromverbrauch im Hinterkopf… CPU ohne Kühlkörper!!). Die Grafische Oberfläche läuft flüssig. Auch Videos lassen sich mit VLC anschauen. IceDove (Linuxversion vom Mozilla Thunderbird) braucht eine ganze Weile bis es meine zig Tausend Emails eingelesen hat und sich öffnet. Aber meine eMailkonten sind auch schon extrem… mal ehrlich. LibreOffice (Linux Textverarbeitung wie MS Office) dauert auch ein paar Sekunden länger, öffnet sich dann aber und es lässt sich flüssig damit arbeiten. Es gibt sogar Spiele für den Pi. Ich habe kurz Mindcraft probiert und es läuft absolut flüssig.
Wie gesagt, mit bedacht auf die Hardware und den Verbrauch ist dieser MiniComputer ein Wunderwerk.

Und der Arduino kam hinzu als der Spieltrieb in mir ausgelöst wurde. Das Zeug hat es mir jetzt so angetan, ich kann nicht genug bekommen. Absoluter Suchtfaktor! Wenn man erst einmal seine erste Schaltung zusammengesteckt hat, das erste Skript auf den Arduino überspielt ist und dann die LED wirklich anfängt zu blinken… dann fühlt man sich ein bisschen wie Gott. … Diese LED blinkt jetzt weil ICH es so will. :D
Dann geht es weiter… die Temperatur messen, LEDs leuchten lassen, Lichtstärke auslesen (Ist es Nacht? Wie stark scheint die Sonne? etc.), GPS Koordinaten ermitteln und in einer Karte anzeigen, Flammensensor (Brennt es?), Geräuschsensor (Hat da wer Gehustet?), Displays zum Anzeigen von Informationen, Schalten von Schaltern auf digitalem Knopfdruck (geht auch über das Internet!)… die Möglichkeiten sind fast unendlich. Mit Kreativität kann man super tolle Sachen damit machen.

In meiner unendlichen Kreativität (hüstel) habe ich (bis dato) folgenden Verwendungszweck dafür.

  • Wetterstation mit Sensoren für Temperatur, Luftfeuchtigkeit, Luftdruck, Lichtintensität, Geiger Zähler, GPS, etc.
  • Kamera in der Front des Campers (soll automatisch jede Stunde 1 Foto machen und bei Internetverbindung Online stellen)
  • Gassensor bei den Gasflaschen, im Küchenbereich und bei der Heizung. Auch Gassensoren für das Gas das Diebe gern Benutzen um die Bewohner ‚einzuschläfern‘.
  • Anschließen an die Motorelektronik. Damit kann z.B. der Fehlerpuffer des Fahrzeugcomputers ausgelesen werden. Bei manchen Fahrzeugen möglich.
  • Ich überlege die Türen mit einer Schlüsselkarte/Fingerabdrucksensor öffnen zu lassen, anstatt mit einem Schlüssel. So könnte man Einbrecher ein wenig verwirren ;)

Aus den Daten möchte ich dann eine kleine Blackbox bauen. Besonders sollen die Daten aber ins Internet gehen und allen zur Verfügung stehen. (Die GPS Daten natürlich Zeitversetzt ;) ). Aber das ist noch Zukunftsmusik. Im Moment experimentiere ich mit beiden System rum und werde versuche jetzt ein paar Stabile System aufzubauen. Zum Testen und Erfahrungen sammeln.

Also wenn ihr mal in die Welt der Mikrokontroller und Einplatinen-Computer reinschnuppern wollt… Arduino bzw. Raspberry Pi kann ich nur empfehlen. Macht total Spaß und ist gar nicht soo schwer. ;)

Liebe Grüße
Gordon

Happy New Year 2015

Hello.

I’d like to still wish you a Happy New Year 2015, if I haven’t done it already :)
I hope you had a great New Years Party and your targets for 2015 are reachable ;)

We spent New Year quite modest. At a – more or less – lonely place with Jim and Christos. We met, unpacked the cameras, heated up the Glühwein, prepared a snack and then photographed the 5 rockets at midnight and then we let the things slide.

It was nothing wild, but still it was a wonderfull evening. Quite and relaxed  with good friends.

It was also the last New Year here on the island. In a few weeks I will finally say Good Bye. But later more about it. There are many big plans for the new year. I hope they are not to high to reach. :)

So, then I wish you a Happy New Year again and that 2015 will become an awesome Year! ;)

Frohes Neues Jahr 2015

Hallo.

Ich möchte Dir noch ein Frohes Neues Jahr wünschen, falls ich es noch nicht getan habe. :)
Ich hoffe Du bist gut reingekommen und die Ziele für 2015 sind in erreichbarer Höhe gesteckt ;)

Wir haben Sylvester recht bescheiden Verbracht. An einem – mehr oder weniger – einsamen Platz haben wir uns mit Jim und Christos getroffen, die Kameras ausgepackt, Glühwein warm gemacht, einen Snack vorbereitet und dann die 5 Raketen um Mitternacht fotografiert und die lieben Gott einen guten Mann sein lassen.
Es war nichts wildes, aber trotzdem ein wundervoller Abend. Ruhig und entspannt mit ein paar guten Freunden.

Es war aber auch das letzte Neujahr hier auf der Insel. In wenigen Wochen werde ich dann auch endlich Good Bye sagen. Aber dazu später mehr. Pläne gibt es viele und große für das neue Jahr. Hoffen wir mal das sie nicht zu hoch gesteckt sind. :)

Na dann, Frohes Neues und auf das 2015 ein geiles Jahr wird ;)