Monthly Archives: February 2020

Empty Vessels: a performance of robots, cellos, and artificial intelligence

via Pololu Blog


Artist David Gardener contacted us recently to share his work, Empty Vessels (seen in the above video), an immersive audio visual installation that explores the connection between machines, data, and their environment. The piece features three cellos played by custom built robotic structures that perform music composed in real time. It premiered in November 2019 at the Society for Arts and Technology in Montreal, where it performed for sold out audiences for two weeks! David was kind enough to answer our questions about the piece and allow us to share his answers along with some more footage and pictures with you below:

How long did you work on the piece?

The project started as an idea by myself (David Gardener) and Greg Debicki about a year ago. It remained an idea for most of the year until we were approached by the Society for Arts and Technology in Montreal (SAT) for help funding the project, where we could work on the project as artists in residence. At the end of the residency (in November) we would also premiere the show. This gave the project a very fast timeline taking just two and a half months from concept to presentation for two weeks of shows. I think it is probably the quickest timeline I have ever worked to, having to design, engineer & build the whole project.

Can you tell us which products of ours you used and how they were used in your project?

For the project I used the following components from Pololu:

These were used to drive linear slides that moved the note sliders up and down the fingerboard. The reason for using this method was because I am a cellist myself, and the ability to slide between notes is really important in the sound of the cello. Unlike a guitar, there are no frets on a cello’s fingerboard, so the note sliders have to move to very accurate positions on the fingerboard to make sure that the notes are nicely in tune. On startup the motors would all drive the sliders to a home position using a limit switch. From there they would move to the different notes just by driving the motors to pre-defined positions. I decided to use a slider per string on each cello to maximise the amount of notes that could be played simultaneously, meaning they could play 12 note chords, or fast melody lines by splitting the melody across the 3 cellos.

Did you design the slider systems for the fingerboards? It looks like some of the parts might be 3D printed; are the design files available anywhere?

Yes, I designed the whole robotic system from scratch. The cello is such a beautiful instrument in both design and sound. However it is designed specifically for a human body, none of the strings are parallel or in the same plane even, they all diverge towards the bridge. I didn’t want to change the actual instrument in any way for this project. This complicated the build a lot! On top of that, no two instruments are the same, so I had to make sure that the parts could be adjusted in the different planes depending on the instrument they were attached to. Another difficulty is at the top end of the finger board the strings are very close together meaning the sliders all had to be very thin so as not to collide with each other. In the end all these considerations led me to the decision that I would 3D print all the parts. With such a short build timeline, this meant I could design and print revisions of all the parts much quicker than if I was making all the parts by hand in the workshop.

The designs for the parts are not available at the moment as they are very much working prototypes! I plan to upload them for anyone that wants to see them at a stage in the future that I am happy with them.

Can you tell us what your motor control setup is? (What motor drivers are you using, how are you processing the encoders, how are you coordinating all the movement, etc.?)

So I think I answered this in question 2. But a more general overview of the working of the cellos is – The main brain of the three cellos is the software MAX MSP (running on a PC). This would send position data over serial to an Arduino which then told the RoboClaws the next position to send the motors to. The RoboClaws were running in closed loop mode so they were dealing with the encoders directly.

We noticed you have some fans pointed at the upper bank of motors on each cello. Are the motors or controllers overheating, or is that to protect the cellos from getting too warm?

That is funny. Yes, originally I was using your 4.4:1 gear ratio 12 V motors as I really wanted the note sliders to be whizzing up and down the fingerboards like a cello maestro. But after burning out some of the motors by driving them too hard, I decided to switch to the next gear ratio down (and actually even they were getting hot). But by this point I had already locked off the design and ordered all the motors as the opening night for the piece was in three weeks. So to make sure I didn’t lose any more motors, I added some forced air cooling (just a silent fan sat on a bar stool pointed at the motors of each cello)… it added a slight bit of rock ‘n’ roll to the show.

Can you give us some details about how the music is generated?

So the project is headed towards having a fully artificially intelligent score where the music is generated on the spot and then played. The project is designed to also play in a museum environment where it will sit and play for its audience forever evolving music, with the intensity of the compositions controlled by the number of people it is playing to. However, it is currently in a more generative state where it will play music based on a set of musical rules from which it generates the music. This is where my collaborator Greg came into the project, developing patches in MAX MSP that generate the compositions and then work out which string on which cello to send each note to.

Is the piece on exhibit anywhere currently, or are there any planned exhibits coming up?

The piece was shown for a week at the SAT at the end of last year, but it was almost totally sold out so an extra week was added straight after that. The cellos are now back in my studio, where they will be upgraded. They are scheduled for another two weeks of shows at the SAT from March 24th 2020. There are some other shows in Montreal where it will be shown as part of some electronic music and tech festivals (unannounced as of right now). It is then planned for a European tour late summer 2020. It is best to keep track of the dates from my Instagram, @montreal_life_support.

Do you have a website or any social media channels where people can follow your work?

Instagram is probably the best. These are the handles:

Other than that I will be releasing a making-of style video documenting the build in the coming weeks on the YouTube channel.

Cat tax!

Thanks so much to David for sharing your work with us and answering all our questions. For readers in the Montreal area near the end of March/beginning of April, visit the Society for Arts and Technology’s website for showtime and ticket information.

Be All That You Can XBee

via SparkFun: Commerce Blog

Hello everyone and welcome back. We have a ton of new products to get through and it all starts with a new version of our popular XBee Wireless Kit that now uses XBee 3. Following that we have two new versions of the NVIDIA Deep Learning Institute Course Kit, one with a Jeton Nano and one without. Four new Pirate Audio boards from Pimoroni are also here, along with new quantities on our most popular addressable LEDs. That's not all though - we have to talk about a very special sale that starts tomorrow, too.

Leap Day is kind of like a free extra day to enjoy working on your projects, and we’re here to help make sure you have the parts for it! Enter the Leap Day Sale, this Saturday only. We’re adding deeper discounts to our sale category and adding new items to the list!

Rules & Information:

The sale will run from 12:00 a.m. MT to 11:59 p.m. MT on Saturday, February 29th. No rainchecks or backorders will be allowed. Distributor accounts will not be eligible for sale prices. We will not be allowing the combining of orders during this sale.

Please note: We will be working hard to get as many orders out as quickly as possible, but we cannot guarantee same-day shipping during the sale day.


Now let's take a closer look at all our new products.

There's no liftoff let-down this week

SparkFun XBee 3 Wireless Kit

SparkFun XBee 3 Wireless Kit

KIT-15936
$94.95

This is the SparkFun XBee 3 Wireless Kit, the perfect box full of goodies to get you started using XBees. Inside this kit you will find two XBee 3 Modules, one XBee Explorer, one Xbee Shield, and a set of Arduino R3 headers to solder onto the shield. Our entire goal for the XBee Kit was to make wireless communication simple. Connect one XBee to the shield and your Arduino, and connect the other XBee to the Explorer board and your computer, and you'll be able to seamlessly - and wirelessly - pass serial data to and from your Arduino! Using this connection, you can transmit remote sensor data, send data from your computer to update a scoreboard, or drive a robot from your keyboard!


SparkFun DLI Kit for Jetson Nano

SparkFun DLI Kit for Jetson Nano

KIT-16308
$174.95
SparkFun DLI Kit (without Jetson Nano)

SparkFun DLI Kit (without Jetson Nano)

KIT-16389
$74.95

With the release of the Jetson Nano™ Developer Kit, NVIDIA® empowers developers, researchers, students and hobbyists to explore AI concepts in the most accessible way. Reinforcing its commitment to widening accessibility to and innovation in the area of deep learning, NVIDIA has created a free, self-paced, online Deep Learning Institute (DLI) course, “Getting Started on AI with Jetson Nano.” SparkFun now offers two versions of the DLI Kit, one with a Jetson Nano and one without.The goal of the course is to build foundational skills to enable anyone to get creative with the Jetson Developer Kit.


Pimoroni Pirate Audio Speaker for Raspberry Pi

Pimoroni Pirate Audio Speaker for Raspberry Pi

WIG-16323
$24.95

Pump out some mini beats with the PiMoroni Pirate Audio Speaker for the Raspberry Pi. The Pirate Audio Speaker is perfect for making a Lilliputian radio, sound effect player, or even as a teeny-weeny game console! The built-in 1W speaker isn't the loudest, but it's great fun for lots of projects. The display and playback buttons let you control your audio or sound effects in a jiffy. Use our Pirate Audio software to play local audio files (MP3, FLAC, etc.) or stream from services like Spotify.


Pimoroni Pirate Audio 3W Stereo Amp for Raspberry Pi

Pimoroni Pirate Audio 3W Stereo Amp for Raspberry Pi

WIG-16324
$24.95

Bring an old radio or set of speakers into the 21st century with Pirate Audio 3W Stereo Amp for Raspberry Pi! The push-fit connectors on the Pirate Audio 3W Stereo Amp make it super simple to connect up a set of speakers, whether they're bookshelf or floor-standing speakers, or the speakers in an old radio. Play crisp digital audio from local files (MP3, FLAC, etc.) or stream from services like Spotify. The combined DAC and amp gives you crisp 24-bit/192KHz digital audio through your connected stereo speakers (or mixed-down mono through a single channel).


Pimoroni Pirate Audio Line-Out for Raspberry Pi

Pimoroni Pirate Audio Line-Out for Raspberry Pi

WIG-16325
$24.95

Plug the PiMoroni Pirate Audio Line-out for Raspberry Pi into your hi-fi amp or powered speakers, then sit back, relax and soak in the rich, digital audio. This board is perfect for upgrading an existing hi-fi amp and speakers, or a set of powered monitors, with digital audio from local audio files (MP3, FLAC, etc.) or from streaming services like Spotify. The DAC on Pirate Audio Line-out gives you crisp 24-bit/192KHz digital audio through its 3.5mm stereo jack. It has a high-quality I2S DAC, high-res color display, and playback control buttons.


Pimoroni Pirate Audio Headphone Amp for Raspberry Pi

Pimoroni Pirate Audio Headphone Amp for Raspberry Pi

WIG-16326
$24.95

The ultimate hackable headphone amp for your desk! Build your own home-brew iPod Nano with the PiMoroni Pirate Audio Headphone Amp! It's an all-in-one solution, with gorgeous album art display, track info and playback controls for playing your local audio files (MP3, FLAC, etc.) or streaming music from Spotify. The DAC and headphone amp give you crisp, digital amplified audio through your wired headphones.


SMD LED - RGB WS2812B (Whole Reel)

SMD LED - RGB WS2812B (Whole Reel)

COM-16347
$475.00

The WS2812B (or "NeoPixel") may look like a common 5050-sized (5x5mm) SMD LED, but there’s actually an integrated control circuit embedded inside there too. Sometimes you don't need 10 or even 50, maybe you need a whole reel of 1,000! If you are the person who needs that many, this is the perfect quantity for you.


That's it for this week! As always, we can't wait to see what you make! Shoot us a tweet @sparkfun, or let us know on Instagram or Facebook. We’d love to see what projects you’ve made!

Never miss a new product!

comments | comment feed

Enginursday: Fixing the ESP32 Thing Plus

via SparkFun: Commerce Blog

Recently, we released v20 of the ESP32 Thing Plus board. After releasing v10, we received some feedback that some boards weren’t able to upload code and the CP2102 was getting hot. It wasn’t a widespread problem, but it was a consistent problem for people that had the issue. When I was testing the board for example, I was able to upload code using both the USB ports on the computer, as well as my powered USB hub without issue. The USB power adapters didn’t cause any problems for me, except one, which helped figure out what was causing the problem.

FLIR image of a toasty CP2012

The problem was a result of inrush current, specifically with switch mode power supplies. Switch mode power supplies have soared in popularity because they allow for smaller and more efficient power supplies, and can be found in nearly all electronics from phone chargers to desktop computers. They achieve this by increasing the AC frequency, which allows the transformers to be smaller by switching at a higher frequency, and by using a buck converter, they switch current through an inductor to charge a capacitor to a specific voltage.

Buck Converter Switching Circuit

Without diving too much into the theory, inductors store energy in a magnetic field and resist the change in current. When an inductor sees a change in current, it tries to maintain that current by increasing the voltage until they run out of energy. This is why in our relay boards we use a diode across the coil to limit flyback voltage spikes, which could cause damage the switching transistor, as shown below.

alt text

Click the image for a closer look!

Finding the problem


Back to the ESP32 Thing Plus though. Now that I had a power supply that was able to replicate the problem some of the users were experiencing, I was able to connect my oscilloscope to the VBUS pin to see what was happening:

Oscilloscope trace of VUSB

After seeing the peak voltage of 8.24V, I went back to the datasheet for the CP2102 and saw that the absolute maximum input voltage on VBUS was 5.8V. I performed the same test with a linear power supply, which still had a small overshoot, but at only 5.68V it was at least below the limit:

Linear Power Supply Response

I suspected the problem was a result of inrush current and I turned my attention to the ceramic capacitors, which have a low equivalent series resistance (which you can learn more about here). Having a small ESR value is good because it allows the capacitor to respond quickly to voltage ripple, but when it first charges up it can cause a large initial spike in current. At first it might be tempting to just remove capacitors, but as the waveform below shows, without capacitors the ripple from the switching power supply would generate too much high frequency noise on the VBUS rail.

Oscilloscope trace of VUSB without bypass capacitors

Without the capacitors though, we can see that the initial voltage spike is gone. Knowing that the low ESR capacitors are causing a problem but that removing capacitors creates a new problem, I needed to find the middle ground, which can done by adding intentionally adding ESR to capacitors with a small value resistor in series with the capacitor. Another problem, however, is that because of where the capacitors are placed, adding a series resistor to the capacitors would add a lot of time reworking the board to move traces and vias.

Highlight of Capacitors connected to VBUS

Before investing the time moving traces around, there was more room available around the CP2102, which gave me another idea. After checking with the datasheet again to see that the input current for the CP2102 was around 20mA during normal operation, I wanted to see if adding a resistor in series between VBUS and the supply pins of the IC could fix the problem. After using my decade resistance box, I settled on value of 10 ohms, which produced the following result:

Oscilloscope traces on the high side and low side of the 10 ohm resistor

The yellow trace is on the high side of the resistor connected to VBUS, and the blue trace is connected to the low side of the resistor connected to the supply pins of the CP2102. As you can see, the spike still makes it through the resistor, but instead of reaching a peak voltage of 8.3V it only peaks at 4.48V. The time scale of 5us/div makes it look like the CP2102 drops back down to around 3V and stays there, but the actual voltage drop with this supply is around 200mV and gets to a steady state voltage within 200us.

As engineers, the goal is to have a test procedure that can thoroughly test your design to identify limits and fix them before it lands in the hands of customers. But just like when the Raspberry Pi added USB-C, mistakes can still happen when you use components for the first time.

comments | comment feed

A birthday gift: 2GB Raspberry Pi 4 now only $35

via Raspberry Pi

TL;DR: it’s our eighth birthday, and falling RAM prices have allowed us to cut the price of the 2GB Raspberry Pi 4 to $35. You can buy one here.

Happy birthday to us

In two days’ time, it will be our eighth birthday (or our second, depending on your point of view). Many of you set your alarms and got up early on the morning of 29 February 2012, to order your Raspberry Pi from our newly minted licensee partners, RS Components and Premier Farnell. In the years since, we’ve sold over 30 million Raspberry Pi computers; we’ve seen our products used in an incredible range of applications all over the world (and occasionally off it); and we’ve found our own place in a community of makers, hobbyists, engineers and educators who are changing the world, one project, or one student, at a time.

The first Raspberry Pi

When we first started talking about Raspberry Pi 1 Model B back in 2011, we were very clear about what we were trying to build: a desktop Linux PC with interfacing capabilities for $35. At the time, it seemed obvious that our low price point would come with compromises. Even though you could use your Raspberry Pi 1 to watch HD video, or play Quake 3, or compile the Linux kernel, or automate a factory, some things – like browsing modern, JavaScript-heavy websites – were out of reach.

Our very first website led with an early prototype running an Ubuntu 9.04 desktop

Improving performance

Every subsequent product – from quad-core Raspberry Pi 2 in 2015, to 64-bit Raspberry Pi 3 in 2016, to Raspberry Pi 3+ in 2018 – whittled down those compromises a little further. By offering steadily increasing processing power at a time when the performance of traditional PCs had begun to stagnate, we were gradually able to catch up with typical PC use cases. With each generation, more people were able to use a Raspberry Pi as their daily-driver PC.

The Raspberry Pi I’d buy for my parents

Until, in June of last year, we launched Raspberry Pi 4. Roughly forty times faster than the original Raspberry Pi, for the first time we have a no-compromises PC for the majority of users. I’ve described Raspberry Pi 4 as “the Raspberry Pi I’d buy for my parents”, and since I bought them a Desktop Kit for Christmas they’ve found it to be basically indistinguishable in performance and functionality from other PCs.

In a sense, this was a “mission accomplished” moment. But Raspberry Pi 4 brought its own compromises: for the first time we couldn’t fit as much memory as we wanted into the base product. While the $35 1GB device makes a great media player, home server, or embedded controller, to get the best desktop experience you need at least 2GB of RAM. At launch this would have cost you $45.

Dropping the price of 2GB

Which brings us to today’s announcement. The fall in RAM prices over the last year has allowed us to cut the price of the 2GB variant of Raspberry Pi 4 to $35. Effective immediately, you will be able to buy a no-compromises desktop PC for the same price as Raspberry Pi 1 in 2012. In comparison to that original machine, we offer:

  • 40× the CPU performance
  • 8× the memory
  • 10× the I/O bandwidth
  • 4× the number of pixels on screen
  • Two screens instead of one
  • Dual-band wireless networking

And of course, thanks to inflation, $35 in 2012 is equivalent to nearly $40 today. So effectively you’re getting all these improvements, and a $5 price cut.

We’re going to keep working to make Raspberry Pi a better desktop computer. But this feels like a great place to be, eight years in. We hope you’ve enjoyed the first eight years of our journey as much as we have: here’s to another eight!

FAQs

Is this a permanent price cut?

Yes.

What about the 1GB product?

In line with our commitment to long-term support, the 1GB product will remain available to industrial and commercial customers, at a list price of $35. As there is no price advantage over the 2GB product, we expect most users to opt for the larger-memory variant.

What about the 4GB product?

The 4GB variant of Raspberry Pi 4 will remain on sale, priced at $55.

The post A birthday gift: 2GB Raspberry Pi 4 now only $35 appeared first on Raspberry Pi.

Build a DMX FeatherWing to control lights with a Feather M0

via Dangerous Prototypes

Glen Akins writes:

This project uses an Adafruit Feather M0 Basic Proto board to control a group of Color Kinetics or other RGB light fixtures using the DMX-512 protocol. We’ll build a DMX-512 interface FeatherWing then connect it to the Feather M0 using a Particle Ethernet FeatherWing. Once the hardware is built and assembled, we’ll write software with a web-based GUI to generate RGB lighting effects and control the attached RGB lights using the DMX protocol. By modifying the software on the Feather M0, different effects can be generated and added to the web-based GUI.

Project info at bikerglen.com.

Play Pong with ultrasonic sensors and a Raspberry Pi | HackSpace magazine

via Raspberry Pi

Day three of our Pong celebration leads us here, to HackSpace magazine’s ultrasonic hack of Eben’s Code the Classics Pong tribute, Boing!

If you haven’t yet bought your copy of Code the Classics, you have until 11:59pm GMT tonight to get £1 off using the discount code PONG. Click here to visit the Raspberry Pi Press online store to secure your copy, and read on to see how you can use ultrasonic sensors to turn this classic game into something a lot more physical.

Over to the HackSpace magazine team…

Code the Classics is an entertaining book for a whole bunch of reasons, but one aspect of it that is particularly exciting to us makers is that it means there are some games out there that are really fun to play, but also written to be easy to understand and have high-quality game art to go along with them. Why does this excite us as makers? Because it makes them ideal candidates for testing out novel DIY games controllers!

Pong

We’re going to start right at the beginning of the book (and also at the beginning of computer game history) with the game Pong. There’s a great chapter on this seminal game in the book, but we’ll dive straight into the source code of our Boing! tribute game. This code should run on any computer with Python 3 (and a few dependencies) installed, but we’ll use a Raspberry Pi, as this has GPIO pins that we can use to add on our extra controller.

Download the code here by clicking the ‘Clone or download’ button, and then ‘Download ZIP’. Unzip the downloaded file, and you should have a directory called Code‑The‑Classics-master, and inside this, a directory called boing-master.

Open a terminal and navigate to this directory, then run:

python3 boing.py

If everything works well, you’ll get a screen asking you to select one or two players – press SPACE to confirm your selection, and have a play.

Hacking Code the Classics

So that’s how Eben Upton designed the game to be played. Let’s put our own spin on it. Games controllers are basically just sensors that take input from the real world in some way and translate that into in-game actions. Most commonly, these sensors are buttons that you press, but there’s no need for that to be the case. You can use almost any sensor you can get input from – it sounds trite, but the main limitation really is your imagination!

We were playing with ultrasonic distance sensors in the last issue of HackSpace magazine, and this sprung to mind a Pong controller. After all, distance sensors measure in one dimension and Pong bats travel in one dimension.

Last issue we learned that the main challenge when using the cheap HC-SR04 sensors with 3.3V devices is that they use 5V, so we need to reduce their output to 3.3V. A simple voltage divider does the trick, and we used three 330Ω resistors to achieve this – see Figure 1 for more details.

There’s support for these sensors in the GPIO Zero Python library. As a simple test, you can obtain the distance with the following Python code:

import gpiozero
import time
sensor = gpiozero.DistanceSensor(echo=15,trigger=14)

while True:
    print(sensor.distance)

time.sleep(0.1)

That will give you a constant read-out of the distance between the ultrasonic sensor and whatever object is in front of it. If you wave your hand around in front of the sensor, you’ll see the numbers changing from 0 to 1, which is the distance in metres.

So far, so straightforward. We only need to add a few bits to the code of our Boing! game to make it interact with the sensor. You can download an updated version of Boing! here, but the changes are as follows.

Add this line to the import statements at the top:

import gpiozero

Add this line to instantiate the distance sensor object at the end of the file (just before pgzrun.go()):

p1_distance = DistanceSensor(echo=15,trigger=14,queue_len=5)

We added the queue_len parameter to get the distances through a little quicker.

Finally, overwrite the p1_controls function with the following:

def p1_controls():
    move = 0
    distance = p1_distance.distance
    print(distance)
    if distance < 0.1:
        move = PLAYER_SPEED
    elif distance > 0.2:
        move = -PLAYER_SPEED
    return move

This uses the rather arbitrary settings of 10 cm and 20 cm to define whether the paddle moves up or down. You can adjust these as required.

That’s all there is to our ultrasonic Pong. It’s great fun to play, but there are, no doubt, loads of other versions of this classic game you can make by adding different sensors. Why not see what you can come up with?

Code the Classics

Today is the last day to get £1 off Code the Classics with the promo code PONG, so visit the Raspberry Pi Press online store to order your discounted copy before 11:59pm GMT tonight.

You can also download Code the Classics as a free PDF here, but the book, oh, the book – it’s a marvellous publication that deserves a physical presence in your home.

The post Play Pong with ultrasonic sensors and a Raspberry Pi | HackSpace magazine appeared first on Raspberry Pi.