Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Comparing GPIO speed between Raspberry Pi 1 and 2

Raspberry Pi version 2 has changed playing rules between Linux boards. With raspberry Pi 2 here came faster CPU with four cores, RAM jumped to 1GB, so naturally we would expect faster speeds everywhere including GPIO. Joonas have ran several benchmarks to show the increase in numerical values, so we could make conclusions. He run several common tests with available software libraries and GPIO access methods. Results actually look very promising as for almost all methods speed increased twice and more. For instance Python Rpi.GPIO based raw speed increased from 70kHz to 243kHz. Shell command driven IO became also 2.5 times faster. So this is great news for everyone who was struggling to the limits. For more info and benchmark tests go to GitHub. Continue reading

Raspberry Pi GPIO benchmark update

Couple years ago Joonas from Code and Life have made pretty extensive Raspberry Pi GPIO speed benchmark. But things have changed over two years. Specifically speaking hardware of first generation Raspberry Pi remained same, but firmware and software libraries overcome series of upgrades. It became interesting how GPIO speed have changed since last check. He tested several libraries and languages. To test GPIO performance a simple pin toggle endless loop were run. Results were quite different comparing to tests done couple years ago. Lets see few of them. First of all he tested Shell based scripts. This method gave 2.9kHz square wave. When using WiringPi library toggling speed dropped down to 40Hz. So it seems that shell scripting is suitable for slow signaling. Python with Rpi.GPIO showed pretty good improvement.… Continue reading

Doorbell that takes photos with push-messages

Raspberry Pi is great for doing crazy setups. Being Linux based platform it can take photos, send emails and other messages over internet. Deddies Lab have shared his interesting setup, where he placed a webcam at the front door and when someone pushes doorbell message with photo footage is sent. First of all he hacked in to wireless doorbell where he was able to capture button press with Raspberry Pi GPIO. Then he wrote a simple Python script to send push message with date and time on event. During building there came a thought that seeing message isn’t enough as there is no info on who was at the door. The next thing he added was Logitech C270 webcam which was configured to capture snapshots and short movies. Again, python… Continue reading

Controlling lamp over Internet using Raspberry Pi

Raspberry is a great small computer that allows us easy control and internet access with just few lines of code. Jack wrote a pretty simple project where he switches objects from anywhere in the world. For his implementation he uses a remotely controlled outlet where his lamp is plugged. So he hooks Raspberry Pi to remote control by using standard 2N2222A transistors as switches. The rest is done within Raspberry Pi software. First of all he made a simple web template for turning ON and OFF. Then he set a web-server using Flask – a web development framework based on Python. It turned out pretty simple and effective solution. He set control page as home page on his Android device so he could instantly access and turn ON and OFF… Continue reading

Driving large LED display with Raspberry Pi

Having Raspberry Pi power it would be shame to drive few LEDs. How about 128×32 LED sign board? Jon purchased a stack of red LED display modules and put the min to large sign. He chained them by using shift register. This way he was free from limits in building and controlling. He didn’t use any fancy software tricks and stuck with two bits per pixel resolution what allowed him to reach 400fps. Bar graph spectrum looks really responsive. Led sign draws significant amount of power. But PC power supply unit seems to take care. In order to make better GPIO performance, code is written in C rather than python. We know that C GPIO library allows much faster GPIO triggering what is needed to send frame data serially. There… Continue reading

Power back-up for Raspberry Pi

If you are doing continuous tasks with Raspberry Pi like logging, calculating or controlling things, then you shouldn’t rely only on power adapter. If main power fails, your device will also fail and there will be no excuse of you loose your data and work progress. In such cases you should take care of power back-up. Repairhub suggests his battery power backup system for raspberry Pi. This is actually an external circuit attached to boards GPIO power and control pins. His circuit does the following: charges battery when mains is on; generates signal to GPIO when power goes off; software detects power down and few minutes shuts down computer; after shutdown power circuit is shut off to preserve battery from discharging; pi logs events with timestamps. Circuit detects power off… Continue reading