Background on the two setup’s
- The Raspberry Pi has a Linux-based Operating System. Linux is what the business community uses to run production servers. It can do all kinds of things like: Host Websites, databases , web-services, connectivity and lots more. It is also very configurable and almost anything can be automated.
- Arduino is a real-time micro-controller that can connect to almost any sensor(input) you can think of. It can also control Servo Motors , Stepper motors, Actuators, Relays, Heaters and more.
Example of what can be done by combining the two systems:
- Tracking systems – Arduino’s can connect to power meters and water flow meters. The data from the sensors can be processed on the Raspberry Pi and be analyzed.
- Weather Station – An Arduino can be hooked up to a weather station. The data from the sensors is sent to the Raspberry Pi where it’s stored on a database. The data can then be displayed on a webpage with graphs and all kinds of indicators. A more advanced setup can trigger SMS alerts to be sent when conditions change. Example : Max temperature, Wind speed , Atmospheric Pressure.
- Home Automation – Lights , fans and heaters can be switched on with the Arduino via relays. The Raspberry Pi can have a webpage that you can be accessed from your tablet or mobile phone to switch things on or off.
- Security Systems – Window and door sensors can be installed and connect to an Arduino. The Raspberry Pi can act as a command center. With a bit of work your mobile phone can be configured to connect to the Raspberry Pi and send notifications if some of the windows or doors are open when you are more than 50 meters away from your home. I am not joking, your home’s GPS location is fixed and most modern mobile phones have built in GPS making it easy to calculate distance between you and your un-locked front door. : )
- Automated Machines (CNC) – We recommend GRBL for this task. GRBL is a G-Code interpreter that runs on an Arduino UNO board. A CNC shield is needed and that in turn moves the CNC’ed Milling machine. The Raspberry Pi will act as an interface where you send it a CAD design file and it converts it to G-Code that GRBL can understand. This can also be done remotely over the internet.
WARNING : Most Arduino micro-controllers run on 5 volts where as the Raspberry Pi’s run on 3.3 volts. For this reason we do not recommend that you connect them directly.
The Arduino can be plugged into the Raspberry Pi via USB but because the Raspberry Pi only has two USB ports we are going to use the Raspberry Pi’s General Purpose Input Output pins. Linking this way is also faster because the USB layers are removed on both setup’s.
To overcome the voltage differences we will build a “Level Shifter” to do the voltage conversions.
- BSS138 / 2N7000 MOSFET (1 for each line)
- 10K Resistors (2 for each line)
I have created a prototype shield and I am waiting for some professionally made boards to arrive. I will write a follow-up article as soon as I receive the items…
Till next time.