Tag Archives: Your Projects

Be a better Scrabble player with a Raspberry Pi High Quality Camera

via Raspberry Pi

One of our fave makers, Wayne from Devscover, got a bit sick of losing at Scrabble (and his girlfriend was likely raging at being stuck in lockdown with a lesser opponent). So he came up with a Raspberry Pi–powered solution!

Using a Raspberry Pi High Quality Camera and a bit of Python, you can quickly figure out the highest-scoring word your available Scrabble tiles allow you to play.

Hardware

  • Raspberry Pi 3B
  • Compatible touchscreen
  • Raspberry Pi High Quality Camera
  • Power supply for the touchscreen and Raspberry Pi
  • Scrabble board

You don’t have to use a Raspberry Pi 3B, but you do need a model that has both display and camera ports. Wayne also chose to use an official Raspberry Pi Touch Display because it can power the computer, but any screen that can talk to your Raspberry Pi should be fine.

Software

Firstly, the build takes a photo of your Scrabble tiles using raspistill.

Next, a Python script processes the image of your tiles and then relays the highest-scoring word you can play to your touchscreen.

The key bit of code here is twl, a Python script that contains every possible word you can play in Scrabble.

From 4.00 minutes into his build video, Wayne walks you through what each bit of code does and how he made it work for this project, including how he installed and used the Scrabble dictionary.

Fellow Scrabble-strugglers have suggested sneaky upgrades in the comments of Wayne’s YouTube video, such having the build relay answers to a more discreet smart watch.

No word yet on how the setup deals with the blank Scrabble tiles; those things are like gold dust.

In case you haven’t met the Raspberry Pi High Quality Camera yet, Wayne also did this brilliant unboxing and tutorial video for our newest piece of hardware.

And for more projects from Devscover, check out this great Amazon price tracker using a Raspberry Pi Zero W, and make sure to subscribe to the channel for more content.

The post Be a better Scrabble player with a Raspberry Pi High Quality Camera appeared first on Raspberry Pi.

Raspberry Pi High Quality Camera powers up homemade microscope

via Raspberry Pi

Wow, DIY-Maxwell, wow. This reddit user got their hands on one of our new Raspberry Pi High Quality Cameras and decided to upgrade their homemade microscope with it. The brains of the thing are also provided by a Raspberry Pi.

Key features

  • Raspberry Pi OS
  • 8 MegaPixel CMOS camera (Full HD 30 fps video)
  • Imaging features from several centimetres to several micrometers without changing the lens
  • 6 stepper motors (X, Y, tilt, rotation, magnification, focus)
  • Variable speed control using a joystick controller or keyboard
  • Uniform illumination for imaging reflective surface
  • Modular design: stages and modules can be arranged in any configuration depending on the application

Here’s what a penny looks like under this powerful microscope:

Check out this video from the original reddit post to see the microscope in action.

Bill of materials

Click image to enlarge

The user has put together very detailed, image-led build instructions walking you through how to create the linear actuators, camera setup, rotary stage, illumination, title mechanism, and electronics.

The project uses a program written in Python 3 (MicroscoPy.py) to control the microscope, modify camera settings, and take photos and videos controlled by keyboard input.

Click image to enlarge

Here is a quick visual to show you the exact ports you need for this project on whatever Raspberry Pi you have:

Click image to enlarge

In the comments of the original reddit post, DIY_Maxwell explains that $10 objective lens used in the project limited the Raspberry Pi High Quality Camera’s performance. They predict you can expect even better images with a heavier investment in the lens.

The project is the result of a team at IBM Research–Europe, in Zurich, who develop microfluidic technologies for medical applications, needing to provide high-quality photos and videos of their microfluidic chips.

In a blog for IEEE Spectrum, IBM team member Yuksel Temiz explains: “Taking a photo of a microfluidic chip is not easy. The chips are typically too big to fit into the field of view of a standard microscope, but they have fine features that cannot be resolved using a regular camera. Uniform illumination is also critical because the chips are often made of highly reflective or transparent materials. Looking at publications from other research groups, it’s obvious that this is a common challenge. With this motivation, I devoted some of my free time to designing a multipurpose and compact lab instrument that can take macro photos from almost any angle.”

Here’s the full story about how the Raspberry Pi-powered creation came to be.

And for some extra-credit homework, you can check out this document comparing the performance of the microscope using our Raspberry Pi Camera Module v2 and the High Quality Camera. The key takeaway for those wishing to upgrade their old projects with the newer camera is to remember that it’s heavier and 50% bigger, so you’ll need to tweak your housing to fit it in.

The post Raspberry Pi High Quality Camera powers up homemade microscope appeared first on Raspberry Pi.

Make it rain chocolate with a Raspberry Pi-powered dispenser

via Raspberry Pi

This fully automated M&M’s-launching machine delivers chocolate on voice command, wherever you are in the room.

A quick lesson in physics

To get our head around Harrison McIntyre‘s project, first we need to understand parabolas. Harrison explains: “If we ignore air resistance, a parabola can be defined as the arc an object describes when launching through space. The shape of a parabolic arc is determined by three variables: the object’s departure angle; initial velocity; and acceleration due to gravity.”

Harrison uses a basketball shooter to illustrate parabolas

Lucky for us, gravity is always the same, so you really only have to worry about angle and velocity. You could also get away with only changing one variable and still be able to determine where a launched object will land. But adjusting both the angle and the velocity grants much greater precision, which is why Harrison’s machine controls both exit angle and velocity of the M&M’s.

Kit list

The M&M’s launcher comprises:

  • 2 Arduino Nanos
  • 1 Raspberry Pi 3
  • 3 servo motors
  • 2 motor drivers
  • 1 DC motor
  • 1 Hall effect limit switch
  • 2 voltage converters
  • 1 USB camera
  • “Lots” of 3D printed parts
  • 1 Amazon Echo Dot

A cordless drill battery is the primary power source.

The project relies on similar principles as a baseball pitching machine. A compliant wheel is attached to a shaft sitting a few millimetres above a feeder chute that can hold up to ten M&M’s. To launch an M&M’s piece, the machine spins up the shaft to around 1500 rpm, pushes an M&M’s piece into the wheel using a servo, and whoosh, your M&M’s piece takes flight.

Controlling velocity, angle and direction

To measure the velocity of the fly wheel in the machine, Harrison installed a Hall effect magnetic limit switch, which gets triggered every time it is near a magnet.

Two magnets were placed on opposite sides of the shaft, and these pass by the switch. By counting the time in between each pulse from the limit switch, the launcher determines how fast the fly wheel is spinning. In response, the microcontroller adjusts the motor output until the encoder reports the desired rpm. This is how the machine controls the speed at which the M&M’s pieces are fired.

Now, to control the angle at which the M&M’s pieces fly out of the machine, Harrison mounted the fly wheel assembly onto a turret with two degrees of freedom, driven by servos. The turret controls the angle at which the sweets are ‘pitched’, as well as the direction of the ‘pitch’.

So how does it know where I am?

With the angle, velocity, and direction at which the M&M’s pieces fly out of the machine taken care of, the last thing to determine is the expectant snack-eater’s location. For this, Harrison harnessed vision processing.


Harrison used a USB camera and a Python script running on Raspberry Pi 3 to determine when a human face comes into view of the machine, and to calculate how far away it is. The turret then rotates towards the face, the appropriate parabola is calculated, and an M&M’s piece is fired at the right angle and velocity to reach your mouth. Harrison even added facial recognition functionality so the machine only fires M&M’s pieces at his face. No one is stealing this guy’s candy!

So what’s Alexa for?

This project is topped off with a voice-activation element, courtesy of an Amazon Echo Dot, and a Python library called Sinric. This allowed Harrison to disguise his Raspberry Pi as a smart TV named ‘Chocolate’ and command Alexa to “increase the volume of ‘Chocolate’ by two” in order to get his machine to fire two M&M’s pieces at him.

       

Drawbacks

In his video, Harrison explaining that other snack-launching machines involve a spring-loaded throwing mechanism, which doesn’t let you determine the snack’s exit velocity. That means you have less control over how fast your snack goes and where it lands. The only drawback to Harrison’s model? His machine needs objects that are uniform in shape and size, which means no oddly shaped peanut M&M’s pieces for him.

He’s created quite the monster here, in that at first, the machine’s maximum firing speed was 40 mph. And no one wants crispy-shelled chocolate firing at their face at that speed. To keep his teeth safe, Harrison switched out the original motor for one with a lower rpm, which reduced the maximum exit velocity to a much more sensible 23 mph… Please make sure you test your own snack-firing machine outdoors before aiming it at someone’s face.

Go subscribe

Check out the end of Harrison’s videos for some more testing to see what his machine was capable of: he takes out an entire toy army and a LEGO Star Wars squad by firing M&M’s pieces at them. And remember to subscribe to his channel and like the video if you enjoyed what you saw, because that’s just a nice thing to do.

The post Make it rain chocolate with a Raspberry Pi-powered dispenser appeared first on Raspberry Pi.

Fix slow Nintendo Switch play with your Raspberry Pi

via Raspberry Pi

Is your Nintendo Switch behaving more like a Nintendon’t due to poor connectivity? Well, TopSpec (hosted Chris Barlas) has shared a brilliant Raspberry Pi-powered hack on YouTube to help you fix that.

 

Here’s the problem…

When you play Switch online, the servers are peer-to-peer. The Switches decide which Switch’s internet connection is more stable, and that player becomes the host.

However, some users have found that poor internet performance causes game play to lag. Why? It’s to do with the way data is shared between the Switches, as ‘packets’.

 

What are packets?

Think of it like this: 200 postcards will fit through your letterbox a few at a time, but one big file wrapped as a parcel won’t. Even though it’s only one, it’s too big to fit. So instead, you could receive all the postcards through the letterbox and stitch them together once they’ve been delivered.

Similarly, a packet is a small unit of data sent over a network, and packets are reassembled into a whole file, or some other chunk of related data, by the computer that receives them.

Problems arise if any of the packets containing your Switch game’s data go missing, or arrive late. This will cause the game to pause.

Fix Nintendo Switch Online Lag with a Raspberry Pi! (Ethernet Bridge)

Want to increase the slow internet speed of your Nintendo Switch? Having lag in games like Smash, Mario Maker, and more? Well, we decided to try out a really…

Chris explains that games like Call of Duty have code built in to mitigate the problems around this, but that it seems to be missing from a lot of Switch titles.

 

How can Raspberry Pi help?

The advantage of using Raspberry Pi is that it can handle wireless networking more reliably than Nintendo Switch on its own. Bring the two devices together using a LAN adapter, and you’ve got a perfect pairing. Chris reports speeds up to three times faster using this hack.

A Nintendo Switch > LAN adaptor > Raspberry Pi

He ran a download speed test using a Nintendo Switch by itself, and then using a Nintendo Switch with a LAN adapter plugged into a Raspberry Pi. He found the Switch connected to the Raspberry Pi was quicker than the Switch on its own.

At 02mins 50secs of Chris’ video, he walks through the steps you’ll need to take to get similar results.

We’ve handily linked to some of the things Chris mentions here:

 

 

To test his creation, Chris ran a speed test downloading a 10GB game, Pokémon Shield, using three different connection solutions. The Raspberry Pi hack came out “way ahead” of the wireless connection relying on the Switch alone. Of course, plugging your Switch directly into your internet router would get the fastest results of all, but routers have a habit of being miles away from where you want to sit and play.

Have a look at TopSpec on YouTube for more great videos.

The post Fix slow Nintendo Switch play with your Raspberry Pi appeared first on Raspberry Pi.

Go back in time with a Raspberry Pi-powered radio

via Raspberry Pi

Take a musical trip down memory lane all the way back to the 1920s.

Sick of listening to the same dozen albums on repeat, or feeling stifled by the funnel of near-identical YouTube playlist rabbit holes? If you’re looking to broaden your musical horizons and combine that quest with a vintage-themed Raspberry Pi–powered project, here’s a great idea…

Alex created a ‘Radio Time Machine’ that covers 10 decades of music, from the 1920s up to the 2020s. Each decade has its own Spotify playlist, with hundreds of songs from that decade played randomly. This project with the look of a vintage radio offers a great, immersive learning experience and should throw up tonnes of musical talent you’ve never heard of.

In the comments section of their reddit post, Alex explained that replacing the screen of the vintage shell they housed the tech in was the hardest part of the build. On the screen, each decade is represented with a unique icon, from a gramophone, through to a cassette tape and the cloud. Here’s a closer look at it:

Now let’s take a look at the hardware and software it took to pull the whole project together…

Hardware:

  • Vintage Bluetooth radio (Alex found this affordable one on Amazon)
  • Raspberry Pi 4
  • Arduino Nano
  • 2 RGB LEDs for the dial
  • 1 button (on the back) to power on/off (long press) or play the next track (short press)

The Raspberry Pi 4 audio output is connected to the auxiliary input on the radio (3.5mm jack).

Software:

    • Mopidy library (Spotify)
    • Custom NodeJS app with JohnnyFive library to read the button and potentiometer values, trigger the LEDs via the Arduino, and load the relevant playlists with Mopidy

Take a look at the video on reddit to hear the Radio Time Machine in action. The added detail of the white noise that sounds as the dial is turned to switch between decades is especially cool.

How do you find ten decades of music?

Alex even went to the trouble of sharing each decade’s playlist in the comments of their original reddit post.

Here you go:

1920s
1930s
1940s
1950s
1960s
1970s
1980s
1990s
2000s
2010s

Comment below to tell us which decade sounds the coolest to you. We’re nineties kids ourselves!

The post Go back in time with a Raspberry Pi-powered radio appeared first on Raspberry Pi.

Retro Nixie tube lights get smart

via Raspberry Pi

Nixie tubes: these electronic devices, which can display numerals or other information using glow discharge, made their first appearance in 1955, and they remain popular today because of their cool, vintage aesthetic. Though lots of companies manufactured these items back in the day, the name ‘Nixie’ is said to derive from a Burroughs corporation’s device named NIX I, an abbreviation of ‘Numeric Indicator eXperimental No. 1’.

We liked this recent project shared on reddit, where user farrp2011 used Raspberry Pi  to make his Nixie tube display smart enough to tell the time.

A still from Farrp2011’s video shows he’s linked the bulb displays up to tell the time

Farrp2011’s set-up comprises six Nixie tubes controlled by Raspberry Pi 3, along with eight SN74HC shift registers to turn the 60 transistors on and off that ground the pin for the digits to be displayed on the Nixie tubes. Sounds complicated? Well, that’s why farrp2011 is our favourite kind of DIY builder — they’ve put all the code for the project on GitHub.

Tales of financial woe from users trying to source their own Nixie tubes litter the comments section on the reddit post, but farrp2011 says they were able to purchase the ones used in this project for about about $15 each on eBay. Here’s a closer look at the bulbs, courtesy of a previous post by farrp2011 sharing an earlier stage of project…

Farrp2011 got started with one, then two Nixie bulbs before building up to six for the final project

Digging through the comments, we learned that for the video, farrp2011 turned their house lights off to give the Nixie tubes a stronger glow. So the tubes are not as bright in real life as they appear. We also found out that the drop resistor is 22k, with 170V as the supply. Another comments section nugget we liked was the name of the voltage booster boards used for each bulb: “Pile o’Poo“.

Upcoming improvements farrp201 has planned include displaying the date, temperature, and Bitcoin exchange rate, but more suggestions are welcome. They’re also going to add some more capacitors to help with a noise problem and remove the need for the tubes to be turned off before changing the display.

And for extra nerd-points, we found this mesmerising video from Dalibor Farný showing the process of making Nixie tubes:

The post Retro Nixie tube lights get smart appeared first on Raspberry Pi.