Using Pynq with your Zynq

I recently attended a one-day tutorial about Pynq by Xilinx. While it was on planet Earth I was not familiar with some of these names that sounded alien to me. But I was decided to get some update about the new FPGA offerings by Xilinx company.

I am glad I did as I discovered a wide range of technologies I know nothing about that I reckon can be pretty useful. Unfortunately, becoming an expert on any of them will most likely require many hours of training.

But I can share with you some of what I learned: Pynq is an open-source project by Xilinx to make it easier to use the programmable logic included in some of their SoCs. And that brings us to the second name I have never heard about: Zynq-7000 is a system-on-a-chip (SoC) by Xilinx that bundles an ARM microcontroller with a large FPGA.  In a nutshell, Pynq is a small Linux distribution that runs on a Zynq SoC with access to all the power of the embedded FPGA.

But I guess the question here is what this can be useful for. Right now the…

How to shutdown your interactive Art

If you build a piece of interactive Art with an Arduino, there is not much harm you can cause it by
just powering it down anytime. But when you use a computer, either a PC or a Raspberry Pi, bad things may happen if you just switch off the mains power unannounced.

A common occurrence is that you are asked by the museum or exhibit managers for instructions on how to properly switch off your interactive Art installation. Experience shows us that the more difficult it is, the more likely one day will be done improperly. And I really hate when a piece that took a lot of effort to create goes to waste because of a problem triggered by a "rough" shutdown. 
So one idea that has worked for us is to set up our system as a wireless access point. The person in charge of shutting the system down will use her phone to connect to our wireless network using a password we provided. Once connected just visiting a specific address and port number will cause the shutdown (first time they will…

RPi3+ blues

I have been working a few days improving an existing project based on a Raspberry Pi. It is a art piece with a vertical plotter that draws lines on with a pen. Software and data were already developed and I was just adding some finishing touches.

I was given a new RPi3+ board to upgrade the system but when I connected the new board with the existing SD card the system did not boot up. As our system did not include an HDMI display but an embedded one, we did not have display unless the system could successfully boot. My first thought that then new board could be more power hungry than the existing one and therefore the existing power supply was not enough to keep up with the demand. I had to put back the older board and left the one for further testing.

Once I managed to get an HDMI display connected to the board, I could see the image above. Not sure whether it was some Harry Potter add on the upper left corner or, maybe, someone trying to tell me there was something wrong with the po…

New iPhone app too

A few weeks ago I mentioned a new Android app was available to assist during the assembly of projects made of blocks of stacked layers of material. That will not be complete with a similar app for those of you own Apple cellphones and iPad tablets.  For the moment the app is available for iOS 12 devices. Supporting older versions has not been a priority as we did not want development to lag behind but we might venture there if we get enough requests. 
As with the Android app, this version is free too. A sample model is embedded so you can see how it works (go to the gear menu).

Android app for block assembly

Collaboration with a local company paved the way to the development of an Android app to represent 3D models that are built by joining a set of 3D blocks. Each block is made of a set of layers of parts machined by a 3-axis CNC machine out of foam sheets.  The manufacturing process is more or less outlined in this video:

The problem here was for work workers to have an easy way to know the assembly of the parts without the need of having a computer screen. Given each one of them happens to have a smartphone that seemed the obvious choice. And that is the result (portrait video warning):

As you can see in the video each block has a red number hovering it. And the low polygon count of the 3D mesh is just to ease on the amount of data transmitted and not a limitation of the program itself.

I wanted to make this tool useful for other users, so the file format is a regular ZIP file with .mim extension that contains three different elements: one binary STL file for each block, first one name…

Speeding up nesting calculations

Algorithms for free-form nesting has a cost that depends on the complexity of the polygons that represent the parts to be placed. The more complex (the more points) these polygons are, the longer the computing time.

One might accept a slight waste of material if that can speed up the nesting significantly. The obvious idea is to simplify the polygons and for that task, there is a considerable amount of algorithms available.

However, there is a bit of a catch in our case: If the simplification process renders a new polygon that is slightly smaller than the original one, this could be a problem as the actual part will not fit in the space allocated for it by the nesting software.

The simplification performed by the red arrow creates a new polygon that, while it has fewer points, it cannot contain the original polygon inside and so it would be a bad idea to use the new for nesting purposes. On the other hand, the green arrow simplification does create a new polygon with fewer points that…

Another stepper motor

I was looking for a simple mock-up to be used to explain the operation of a stepper motor to my students. This is what I came up with:
Just four coils on the edges of a plus-sign shape, where the two horizontal coils are connected in serial in a way that they create opposite polarity fields. Same arrangement for the two vertical coils. So we end up with a vertical and a horizontal coil. Once this is set, we use a pill-shaped magnet that will align with the vertical or horizontal magnetic field created by the coils.

What is even better, current is ramped-up on one axis while it is ramped-down on the other, a smoother movement can be achieved (aka micro-stepping).

Of course, that pill-shaped magnet will look familiar to you if you ever have been to a chemistry lab as they are used for magnetic stirrers.

So for powering this "motor", I have used a stepper motor driver A4988 and as you can see, if field changes are fast enough, the rotor can spin and even stir a liquid.