[Electronics/DIY] Renovating 60's Radio Turntable

It all started with an advertisement on a famous social network about an old radio and vinyl player whose destiny was to finish to the trash. Back in time, I was working on a smart speaker with an e-ink screen based on raspberry pi and I directly thought that this old radio would be perfect to make this project a reality.

Without hesitation, I contacted the owner and a few days later I had this dusty radio at home. My main plan was to put my smart speaker system to replace the radio and connect it to the already existing speaker.

received_2504517189865210~2.jpg

The first step is to open up everything and get rid of the stuff I won’t need. It may hurt all the old electronic lovers and it did hurt me too to destroy this radio since it was still working., but it is not my thing to listen to the only noisy AM Italian radio channel I found.

Time to open this old radio and remove its electronic. With the help of a sharp razor blade, I removed the paint on the glass to have some space to put my e-ink display. I chose a 5.83 e-ink by waveshare with 3 colors: black, white, and red. More info about the display here.

With that done, I removed the old mechanical buttons of the radio to put a cheap amplifier found on amazon. My goal here is not to make a high quality audio system but to make a nice looking furniture that can stream some audio with Spotify for example. When adding this little amp, I had to cut down the bottom plastic piece that was holding the button and yeah, I messed up the cut… But having a 3d printer, after a few measurements, I 3d-printed the pieces directly the right size and they fit perfectly around the buttons.

To make the system a bit more interactive, I added some neopixel rings that act like vumeters. Some nice 3d printed pieces hold them well to the whole system. With all the electronic wired up, it was time to print everything.

With all that done, it was time to sand all the wooden parts of the radio and pass some paint on it. I decided to go for a black finish and to let some parts all natural giving a nice industrial look to it. I also cleaned and painted all the buttons in black and red to fit the e-ink display colors. Here we are with the final result!

For more details on the software part, everything is documented on my GitHub, you just have to follow this link. As a quick resume, I added mopidy and librespot to have Spotify access. With the mopidy api I retrieve the album artwork and process a k-mean clustering to decompose it in 3 colors for the e-ink display. With a loopback audio card made with pulseaudio, I do a fft of the actual music playing and display it on the neopixels ring. Finally, everything is customizable and can be easily modified with a properties file.

[Electronics] Nanopi A64 and the GPIO
NanoPi_A64-1.jpg

Recently I “found” some Nanopi A64 (micro computer made by FriendlyARM similar to Raspberry Pi) that were unused. After some research, I found the official wiki and decided to try them out! My first step was to install an OS, I tried the two OS proposed by FriendlyARM which are Ubuntu-Core and Ubuntu-Mate (Mate has an UI).

And success, they boot and those OSs seems working pretty find! So naively I thought: “Cool I’ve two little electronic circuits that I can use as Raspberry Pi and I got them for free!”. At this point, I want to try to access the GPIO and try to install the common GPIO library for Raspberry PI since on the wiki I found “GPIO pin-header compatible with Raspberry Pi “ . Long story short didn’t work at all. After some research on internet, FriendlyARM doesn’t provide any GPIO support for the Nanopi A64 and I never found anybody working with the GPIO on this board…

At this point, I thought that GPIO on this board couldn’t be accessible. After some research, I found a thread on Armbian forum called Build libgpiod the "New GPIO Interface for User Space" . I gave a look and it’s talking about Nanopi and a library called libgpiod . So time to give it at try! Let’s install this lib on our Ubuntu-Core or Ubuntu-Mate! Again, didn’t work either…

This reference about libgpiod and Nanopi was on Armbian forum so now my guess is to have an Armbian that work for Nanopi A64! Guess what, it’s not officially supported.. but after some research I found that on the same forum: [Experiment] armbian on NanoPi A64 . Apparently, some people succeded to install Armbian on Nanopi A64 and there is a description of the few tricks to do it!

So it was time to clone the Armbian Git and try to compile an Armbian for my Nanopi A64! And guess what, it worked! For the people that want to do it too, I’ll resume the manipulation that I made according to the “guidol” (all credits to him for this part!) modification to do it:

After cloning the Armbian build git, create an new configuration for the nanopia64 in ./build/config/boards/nanopia64.conf

# A64 quad core 512MB-2GB SoC GBE
BOARD_NAME="NanoPiA64"
BOARDFAMILY="sun50iw1"
BOOTCONFIG_DEFAULT="sun50iw1p1_config"
BOOTCONFIG="nanopi_a64_defconfig"
#
MODULES="sunxi_codec sunxi_i2s sunxi_sndcodec 8723bs"
MODULES_NEXT=""
#
KERNEL_TARGET="default,next,dev"
CLI_TARGET="bionic,stretch:next"
DESKTOP_TARGET="xenial:default"
#
CLI_BETA_TARGET=""
DESKTOP_BETA_TARGET=""

Then compile Armbian with ./compile.sh EXPERT="yes" and select Nanopi A64 for the platform. In my case I also selected DEV for linux kernel. My result is then: Arbian_5.78_Nanopia64_Debian_stretch_dev_5.0.7.img (guidol was Armbian_5.71_Nanopia64_Debian_stretch_dev_4.20.0 )

This image boot well on the Nanopi A64 but USB is not enabeld. guidol also provide a fix for that by modifying the device tree:

Copy the /boot/dtb/allwiner/sun50i-a64-nanopia64.dtb and do those operation:

DTC-decompile .dtb to .dts
dtc -I dtb -O dts ./sun50i-a64-nanopi-a64.dtb -o sun50i-a64-nanopi-a64.dts

Modify the dts as so:

NanoPi A64 (standard)
=====================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "disabled";
                        phandle = <0x54>;
                };

 

NanoPi A64 (activated / changed)
================================

                usb@1c19000 {
                        compatible = "allwinner,sun8i-a33-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x2 0x29>;
                        resets = <0x2 0x12>;
                        interrupts = <0x0 0x47 0x4>;
                        interrupt-names = "mc";
                        phys = <0x21 0x0>;
                        phy-names = "usb";
                        extcon = <0x21 0x0>;
                        status = "okay";
                        dr_mode = "host";

                        phandle = <0x54>;
                };    

DTC-compile .dts to .dtb
dtc -I dts -O dtb ./sun50i-a64-nanopi-a64_guido3.dts -o sun50i-a64-nanopi-a64_temp.dtb

then copy it to /boot/dtb/allwinner and reboot
cp sun50i-a64-nanopi-a64_temp.dtb /boot/dtb/allwinner/sun50i-a64-nanopi-a64.dtb

Now congrats, you have an Armbian that works with the USB! It’s time to try to use the GPIO! After cloning the libgpiod git and compiling it with (I added the binding for python):

   ./autogen.sh --enable-tools=yes --enable-bindings-python
    make
    make install

Hurray libgpiod is installed let’s try the command available!

root@nanopia64:#   gpiodetect   
gpiochip0 [1f02c00.pinctrl] (32 lines)    
gpiochip1 [1c20800.pinctrl] (256 lines)  
gpiochip2 [axp20x-gpio] (2 lines)    

So our gpiochip are detected, that means we can have access our GPIO! So let’s try to use the GPIO header. I put a little led on the pin40 of the header called GPIOD1. First guess for me it’s either the line 40 or the line 1 of one of the gpiochip, guess what it’s not… With a little "for loop”, I found that this GPIOD1 is the line 97 of gpiochip1. Why is that? At this point, I did some research on Nanopi GPIOand found on the friendlyARM wiki a GPIO part. With that, I learned a bit about the offset and understand a bit better how I could find the number of my GPIOs. I also did the command proposed on this wiki and here are the results:

root@nanopia64:~#   cd /sys/class/gpio              
root@nanopia64:/sys/class/gpio# for i in   gpiochip* ; do echo `cat $i/label`: `cat $i/base` ; done   
1c20800.pinctrl: 0       
1f02c00.pinctrl: 352       
axp20x-gpio: 510              
root@nanopia64:/sys/class/gpio# cat   /sys/kernel/debug/gpio       
gpiochip1: GPIOs 0-255, parent:   platform/1c20800.pinctrl, 1c20800.pinctrl:   
gpio-120 ( nanopi-a64:blue:stat)   out hi ACTIVE LOW 
gpio-166 (|cd ) in  lo ACTIVE LOW  
gpiochip0: GPIOs 352-383, parent:   platform/1f02c00.pinctrl,
1f02c00.pinctrl:        gpio-354 (|reset) out hi ACTIVE LOW  
gpiochip2: GPIOs 510-511, parent:   platform/axp20x-gpio, axp20x-gpio, can sleep:    

With that and a lot of time, I mapped all the GPIO on the header of the Nanopi a64, all of them have been tested with gpioset and gpioget from libgpiod and also with the python binding:

GPIO A64 GPIO.PNG

As you could see I only tried the GPIO available on the header, I didn’t try the DVP Camera IF Pin and the MIPI-DSI Pin but the process must be the same and numbering too then. On the right you can see the corresponding GPIO line offset that I found. Sadly I didn’t succeed to access GPIOE (pin 3 and 5 on the header) and when I tried to access from gpio 192 to 223 of gpiochip1, the Nanopi crashed.

So now you have my results! I succeeded finally to access those GPIO on the Nanopi A64! Still some work to do to try all the GPIO and all of their features (right now working on the I2C). If you have a Nanopi A64 and try to access the GPIO I would love to hear about it!

HighPoly and LowPoly Mechanical Hand

You may have already seen my last project which was a compilation of low poly (low polygon) animals with some server on them. (If you haven’t seen them, go to my portfolio quick!)

After all those low poly modelling, I wanted to change, going back to some realistic (high poly) stuff but… low poly was still a good time. So what I’ve done? I decided to do a big project in double, one time in low poly and one time realistic .

So I decided to work on a mechanical hand. I always wanted to model some kind of robot or mechanical machine so here it is.

On the right, you can see the modelling process of a finger and then the hand. Upper pictures are for the future realistic render and lower pictures for the low poly render.

All the work has been made with blender from the modelling to the render and compositing. Each hand are composed of 359 parts and you’ve understood the concept both of those 359 parts have been modelled twice, once for the high poly version and then for the low poly version.

On the right is the final render with a little slider that will help you to see both renders. For the low poly, I stayed with some kind of cell shading with freestyle lines using cycle render engine. For the high poly render I did only with procedural texture all using cycle render engine again.

Finally just above you can see the final render in full resolution if you click on them. Hope you enjoyed this project as much as I did while doing it!

Isaac's Halloween
Hero.png

Back in 2015 for a programming lesson at the HES-SO, we had to create a little project in Java that includes a graphical interface. I quickly made the choice to do all the graphism from this little project in Blender. Now only one thing is missing: the concept of the project. After some research, it has been decidee to create a little roguelike game that will 'copy' the concept of The Binding of Isaac (for further comprehension of this post, visit the original Binding of Isaac webpage) but with original graphics, new monsters, new custom rooms etc...

The game featured a fully procedurally generated dungeon with random rooms, random monsters, random obstacles, one boss room and possibly two secrets rooms.

Three kinds of monsters were designed, a boss and the hero. All these little monsters have their own sprite sheet with an example for the flying pumpkin on the right gallery.

 

If you have any questions about this project, the comment section is just under the article :)
Finally here are some screenshots of what the actual game looks like:

3DLucas BonvinComment
Next Widget Lesson, my first app on the store!
NextLessonLogo512.png

I started android development during my master lessons back in 2017. Few projects where made, few little apps too but nothing never ended up on the google play store.

After my last android lesson, I always wanted to experiment with it. I followed lesson about human-machine interface, played a bit with android wearable, instant app and last little project was to simply do a little android widget.

And this simple little widget ended up as a full application that I’ll present you here!

The main goal of the widget is, as you could guess by its name, to show you the next lesson you have to follow.

DescriptionEN.png

But to know which lesson you follow, you have to at first create your planning, that’s where the application user interface come. You can create your full planning, adding a new lesson, modifying, duplicating or deleting them.

To manage all this, you have a preference menu that let you choose different planning file, opening it with another app or even sending it to all your classmate.

The application is for now fully translated in English and French.

The source code is available on GitHub and the app is available for free on the play store! Feel free to give feedback about the app or even the code, would be a pleasure to know any point of view!

CodingLucas BonvinComment
Prosess crowdfunding

Let's first talk about 'What is Prosess?'

It's an association whose goal is to develop sport in Switzerland with their infrastructure. Currently, they have a park located in Anzère Switzerland where you can find a Big Airbag, some trampolines, slacklines, climbing wall and many more activities!

Recently they are on a new project: An airbag that can fit in a container with all its material and this airbag can be transported anywhere with the help of the container. For this new project, they made a crowdfunding that will end the 26.08.2018 .

But what is my implication in this project? For their crowdfunding, Prosess needed to show their future baker what will this new installation looks like and that was my job: Recreating the future 'traveling' airbag park.

 

For this project, I needed to show what will the container and airbag look like, that the installation can be used in any season, it can be used by night and their will be publicity flag available on the structure. For more details the airbag is 10m x 6m, the total installation will be 14m x 6m and the inside of the container (where you can install a temporary exposition, bar, ...) will be 5m x 2m.

 

 

 

You can find a simplified 3d version of the project on sketchfab.

A big thank you to the Prosess team for the opportunity to work with them on this project and don't forget to take a look on the crowdfunding they are making!

 

Lucas BonvinComment
[Electronics] Bachelor Thesis: Wireless Power Transfer

This article describe my Bachelor Thesis made back in 2017 at Zheijang University in China.

Objectives

The context of this project is the use rectenna in a wireless power transfer to convert  microwave energy into DC power. The main goal is to reach the best conversion efficiency possible. To this end a constant tuning the load is made.


Methods | Experiences | Results

rectenna.PNG

An array of 64 rectennas is used to receive RF power. This rectenna is subdivided into 16 sub-circuits of 4 rectennas in parallel connected to the same load. These loads are made with digital potentiometers, driven by SPI with a microcontroller. With a measure of each output voltage, the microcontroller can compute the DC power and find the optimum power point with an algorithm similar to MPPT (Maximum Power Point Tracking) used for solar panel.

All these data can be sent with the help of a Bluetooth module to a computer with a supervision software.  When the Bluetooth module is not enabled, the whole circuit is in low power mode and will consume less than 1% of the rectennas received power.

The system was tested with a horn antenna as transmitter and different input
power density. Even if the load range wasn’t tuned perfectly to track the maximum
efficiency point, a gain in power up to 10.43% has been measured with a
corresponding improvement of the RF to DC conversion efficiency of 4.65% with
low input power (-3.4 to 3.9 dBm for one rectenna unit).

First Article: Welcome!
Welcome.png

Welcome to my website and especially in the Blog section! As a first article on the blog, it will describe you what you can find in this section:

  • Work in progress projects in 3D

  • Articles about projects that deserve more details

  • Articles about engineering

  • And many more!

But don't forget there is more than just the blog section. You can find more about me on the 'about me' section, you can contact me about professional work or for simple feedback under the 'contact me' section and finally find all my biggest 3D graphism project under the 'Portfolio' section.

Lucas BonvinComment