MP3 players, smartphones and USB sticks with 128GB and more memory are now part of everyday life. Storing and transporting music has therefore never been easier.
Things were different around 30 years ago. The "USB stick of the 80s/90s" was the cassette.
Of course, I still have a lot of them lying around and still don't have the heart to dispose of them. On the other hand, it breaks my nerd heart that these cassettes are rotting away in some box in the cellar.
That's why I was looking for a way to combine "the old" with something practical and get the cassettes out of their boxes.
The result is the pxlBlck_CassetteLamp. A lamp that uses semi-transparent cassettes as a lampshade and can also be used as an information source for events in the SmartHome thanks to its WiFi connection.
What you need and have to do to create your own pxlBlck_CassetteLamp is described in the following article.
Safety instructions
I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.
https://www.nerdiy.de/sicherheitshinweise/
Affiliate links/advertising links
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, Nerdiy.de will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support Nerdiy.de in being able to offer other useful projects in the future. 🙂
Requirements
For the assembly you have to master SMD soldering tasks. The following articles contain tips for this.
- Electronics - My friend the soldering iron
- Electronics – Solder THT components by hand
- Electronics – Solder SMD components by hand
Required tool:
Required material:
In the following list you will find all the parts you need for the assembly.
Collect the necessary parts
To get started with the assembly of your pxlBlck_CassetteLamp, you should first collect all the necessary parts.
To set up the pxlBlck_CassetteLamp, you will need (among other things) the following parts.
- 8x semi-transparent audio cassettes
- 1x Wemos D1 Mini 32x WS2812 or SK9612 LEDs in 120LEDs/m length
- 3x cable approx. 10cm long
- 3D printed base
- 3D printed mounting frame
- 3D printed lid (optional)
- 4x M3x10 cylinder head screw
- 8x M3 nut
- 4x M3x16 cylinder head screw
Another view of the parts needed.
For this example structure, I printed the base from cork or wood filament. However, you can of course also use any other 3D printable material here.
This photo also shows the parts with which you can control the lamp using the APDs-9960 gesture sensor. The light can be switched on and off, dimmed brighter and darker and the color can be adjusted using gestures.
Alternatively, you can also control the lamp using two rotary encoders.
This allows the lamp to be adjusted with a pin. This is a small "homage" to the combination of pen and cassette which often used to help you roll up unwound cassette tapes. 🙂
Another view of the parts needed.
Another view of the parts needed.
You can find the STL files for printing on your 3D printer in the repository for the pxlBlck_RingClock under the following link.
Screw on the mounting frame
First, you should start by preparing the mounting frame.
For this you will need the following parts.
- 4x M3x10 cylinder head screw
- 8x M3 nut
- 3D printed base
- 3D printed mounting frame
To begin with, you should place the mounting frame on the 3D printed base as shown.
Then position it so that it is flush with the holes in the 3D printed base...
... and screw it on with the M3x10 cylinder head bolts provided.
Repeat this with all four corners.
On the underside, you should screw the four screws with the prepared M3 nuts.
View from below of the screwed M3 nuts.
Stick on the LED strips
In the next step, the LED strips are mounted on the base.
To do this, you need the prepared base including the assembled mounting frame and the four LED strips, each with eight WS2812 or SK9612 LEDs.
Close-up view of the required LED strips.
Now glue the first LED strip to the center of the inside of the mounting frame.
Make sure that the small arrows on the LED strip always point in the same direction when doing this and also for the following LED strips.
Now mount the next LED strip in the center of the inside of the mounting frame.
Again, make sure that the arrows point in the same direction. In this case, all arrows point anticlockwise.
Now also sticks the third...
... and the fourth LED strip on the base as before.
Once you have glued on all the LED strips, this should be about...
... look like this.
Soldering the LED connection cable
Once you have mounted the LED strips, you now need to solder them together and also solder on a connecting cable. This is not always easy with this type of LED strip due to the small size of the soldering pad. You should therefore take some time for this section. You can also find tips on how to use the soldering iron in the following articles.
- Electronics - My friend the soldering iron
- Electronics – Solder THT components by hand
- Electronics – Solder SMD components by hand
An approx. 10 cm long three-core cable is very suitable as a connecting cable.
Insulate the ends of the cables for this...
...approx. 5mm wide and...
...tin them with a little solder.
Now locate the solder pad on the LED strip which is marked with a minus sign and is relatively close to the through-hole in the 3D printed base.
Then tin this with a little solder. This makes it easier to solder the connecting cable later.
The tinned soldering pad can be seen here on the lower LED strip.
Now you can also tin one of the solder pads marked with a plus sign with some solder.
Once you have prepared the soldering pads, you can start soldering the wires. First solder the red wire to the soldering pad marked with a plus sign as shown.
Close-up of the soldered cable.
Now repeat this step with the connecting cable for the soldering pad marked with a minus sign.
Close-up of the soldered cable.
Other view.
Once you have soldered the supply lines, you can now solder the line for the data input to the LED strip.
Tin the upper left contact of the LED (visible in the picture) with some additional solder.
In this example, the wire is soldered directly to the LED because this is somewhat easier to solder compared to the very small solder pad at the beginning of the LED strip.
Now you can solder the connecting cable for forwarding the LED data to the LED strip.
Close-up view of the soldered cable.
It is important here that no short circuit occurs with the neighboring contacts and solder pads when soldering.
You should also make sure that the arrows on the LED strip "point away" from the connecting cable.
Once soldered, you can now feed the connecting cable through the hole in the base into the base.
Other view.
Soldering LED strips together
Soldering the LED strips together is also a little tricky. Here, too, you should work carefully and take a little more time. Make sure that you do not create any short circuits with neighboring contacts and measure again if necessary. 🙂
You should have already prepared the base as shown.
In this step, the contacts marked with a minus are connected together first.
Solder the solder pads marked with a minus sign of the neighboring LED strips together as shown.
Repeat this for the other LED strips until...
... you finally solder the pads of all LED strips...
...soldered together.
Now repeat this with the soldering pads marked with a plus sign.
To do this, solder the solder pads shown using ...
...of a short piece of wire.
The connections of your LED strips should then look as shown.
Other view.
The last step is to establish the data connection between the individual LED strips.
As before, you should connect the contacts on the LED strips to each other. This time, however, connect the middle contacts.
Repeat this again for all three corners until...
...your setup looks something like the one shown.
Other view.
Other view.
Connect ESP8266 or Wemos D1 Mini
Once the LED strip assembly is complete, you can connect the microcontroller to the LED strips.
For this you need a breakout board based on the ESP8266-ESP12E.
I recommend using the "Wemos D1 Mini" here.
First glue the Wemos D1 MIni with some hot glue...
...into the recess provided for this purpose...
... one.
Then prepare the contacts of the Wemos D1 Mini with some solder.
Tin the following contacts with some solder.
- G
- 5V
- D6
Now you can solder the first connection cable to the Wemos D1 Min.
Solder the black wire to contact "G" of the Wemos D1 Mini.
This black wire should be the wire that you previously connected to the contact marked with a minus on the LED strip.
Other view.
Now repeat this with the red wire and the "5V" contact of the "Wemos D1 Mini".
The red wire should be the wire that you previously soldered to the contact marked with a plus on the LED strip.
Finally, you should solder the signal/data line of the LED strip to contact "D6" of the Wemos D1 Mini.
Option 1: Prepare APDS-9960 gesture sensor
There are basically two ways to control the colors and brightness of your pxlBlck_CassetteLamp. The first - described here - works using the "APDS-9960" gesture sensor. With the help of this sensor, the lamp can be switched on and off and its color and brightness can also be changed by gestures over the lamp. The gesture sensor works quite reliably depending on the ambient brightness. However, sometimes it does not recognize every gesture correctly.
Further information on connecting the APDS-9960 gesture sensor to ESPeasy can also be found in the following article.
The other control option is realized via two rotary encoders. You can find information on this in the section Option 2: Prepare rotary encoder holder
To set up the control system using the gesture sensor, you first need the parts shown.
Another view of the parts needed.
To prepare the connecting cable, you should now strip approx. 5mm of insulation from the ends and tin them with a little solder.
Now position the sensor as shown...
... and solder it to the previously prepared cables.
If possible, you should...
...retain the assignment of the wire colors to the contacts.
Close-up of the APDS-9960 sensor with soldered cables.
To position the sensor correctly, you should now install it in the bracket shown.
To do this, insert the M3 nuts into the recesses shown.
Other view.
Another view of the two inserted M3 nuts.
Then you can pull the connecting cables of the sensor through the cable gland as shown.
Other view.
The sensor can then be mounted using the mounting holes and the M3x16 cylinder head screws.
...be screwed to the bracket.
Another view of the screwed sensor.
Another view of the screwed sensor.
Another view of the screwed sensor.
Another view of the screwed sensor.
Another view of the screwed sensor.
Another view of the screwed sensor.
Another view of the screwed sensor.
Option 1: Installing the APDS-9960 gesture sensor
After mounting the APDS-9960 gesture sensor on the bracket, it is now time to mount the bracket on the base of the lamp and screw it in place.
You will need the components shown here.
Divide the cables as shown...
... removes the insulation of the cables by approx. 5mm...
...and tin them with a little solder.
Then feed the cable through the center hole in the middle of the...
...base of the lamp.
Then you can attach the sensor holder using the...
...M3 nuts and M3x16 cylinder head bolts...
... screw together.
Insert the M3x16 cylinder head screws through the base from below.
Have you screwed the sensor with both screws...
...your setup should look something like this.
Other view.
Other view.
Other view.
Now you need to connect the sensor's connection cables to the Wemos D1 Mini.
Solder the red wire of the sensor to the "3V3" contact of the Wemos D1 Mini.
You should also connect the black wire to contact "G" on the Wemos D1 Mini.
Make sure that the red wire is connected to the "VCC" contact and the black wire to the "GND" contact of the sensor.
The last two lines of the sensor are responsible for the I2C communication with the Wemos D1 Mini.
To do this, solder the blue wire (sensor SCL) to contact "D1" and the green wire (sensor SDA) to contact "D2" of the Wemos D1 Mini.
Attaching the cassettes to the mounting frame
After mounting the gesture sensor, you can now mount the cassettes on the lamp.
You will need the prepared base of the lamp and eight semi-transparent cassettes.
You can of course also use cassettes with less transparency. Combine here however you like best.
Another view of the required components.
In the following steps, the cassettes are attached to the mounting frame with a little hot glue.
Make sure that the cassettes are glued to the frame in staggered order.
To do this, first apply some hot glue to the left and right...
...right flank of the first side of the mounting frame.
View of the mounting frame including (still) liquid hot glue.
Now glue the first cassette flush with the left flank to the mounting frame.
The cassette is on the right-hand side...
... slightly beyond the mounting frame.
View of the left-hand side of the cassette. This should be flush with the mounting frame.
Now you can mount the next cassette on the next side of the mounting frame.
Top view of the first two glued cassettes.
You can now glue the subsequent cassettes to each other and the mounting frame in the same way.
Another view of the glued cassettes.
Another view of the glued cassettes.
Another view of the glued cassettes.
Another view of the glued cassettes.
Another view of the glued cassettes.
Now glue the "next level" of the cassettes to the mounting frame in the same way as shown above.
Other view.
Other view.
Other view.
Other view.
Option 2: Prepare rotary encoder holder
The second option for controlling the pxlBlck_CassetteLamp consists of two rotary encoders, which are mounted in such a way that they can be controlled from the outside using a pin. This allows the brightness and color of the lamp to be adjusted.
You will need the components shown on the left.
- 2x rotary encoder
- 2x M3 threaded insert
- 2x M3x16 countersunk head screw
- 8x wire approx. 10cm long in different colors
- 2x cable approx. 3cm long
- 1x 3D printed bracket
- 2x 3D printed encoder attachment
- 1x mounting clamp
- Approx. 20cm heat-shrink tubing to match the cable diameter
Close-up view of some of the required components.
Close-up view of the required cables.
Close-up view of the required cables.
Close-up view of some of the required components.
Now solder the illustrated wires to the first rotary encoder as shown.
Another view of the soldered cables.
Repeat this with the other lines using the second rotary encoder.
Another view of the prepared rotary encoder.
Another view of the prepared rotary encoder.
Another view of the prepared rotary encoder.
Another view of the prepared rotary encoder.
To connect the earth to the rotary encoders, you should prepare the four black wires as shown.
To do this, connect the short black wire to the long black wire and insulate the ends by 5mm.
Another view of the prepared line.
You can then solder the prepared wires to the remaining pins on the rotary encoders.
View of the connected lines.
It is important that you remember to pull heat-shrink tubing over the wires before soldering. This makes it easy to insulate the bare contacts later.
Another view of the cables connected to the rotary encoder.
Another view of the cables connected to the rotary encoder.
Another view of the cables connected to the rotary encoder.
Another view of the cables connected to the rotary encoder.
Another view of the cables connected to the rotary encoder.
To be able to mount the rotary encoder on the base of the lamp later, you should now prepare the rotary encoder mounting clamp.
Use a soldering iron to insert the M3 threaded inserts into the rotary encoder holder clamp.
Then you can also insert the rotary encoder into the rotary encoder holder as shown in the picture and screw it tight.
Another view of the screwed rotary encoder in the rotary encoder holder.
Another view of the screwed rotary encoder in the rotary encoder holder.
Another view of the screwed rotary encoder in the rotary encoder holder.
Another view of the screwed rotary encoder in the rotary encoder holder.
Option 2: Fitting the rotary encoder holder
After preparing the rotary encoder holder, it is now screwed to the base of the lamp.
For this you will need the following parts.
- Prepared rotary encoder holder incl. rotary encoder
- Rotary encoder mounting clamp
- 2x M3x16 countersunk head or cylinder head screws
- The prepared base
Another view of the parts needed.
The rotary encoder bracket should now be mounted as shown.
In the example shown, I have again removed the mounting frame for attaching the cassettes. This gives you more space and makes the first attachment easier.
To install, place the rotary encoder holder on the base as shown and then screw it in place using the M3 screws and the rotary encoder holder clamp.
Take care not to tighten the screws completely yet, as you will need to align the bracket correctly later.
Other view.
Other view.
Other view.
After attaching the rotary encoder holder, you can also attach the encoder attachments to the axes of the rotary encoders.
These should be inserted up to the stop on the respective axis of the rotary encoder.
Other view.
Other view.
Now you can put the mounting frame including cassettes back on the base and screw it to the base.
The rotary encoder holder can now be aligned correctly.
To do this, the encoder attachments should be positioned exactly in front of the holes in the cassette housings.
The rotary encoder holder can be moved to the left and right.
As soon as you have found the right position, you can screw the bracket tight with the screws.
View from the outside.
The encoder attachments should be positioned exactly in front of the holes in the cassette housing.
Other view.
Other view.
Other view.
Now you can pull the connection wires of the rotary encoder through the hole in the base...
...and connect it to the Wemos D1 Mini as shown.
You can also use the circuit diagram (see above) as a further guide for connecting the rotary encoder.
Another view of the soldered rotary encoder connection cables.
Another view of the soldered rotary encoder connection cables.
Another view of the soldered rotary encoder connection cables.
Program firmware
After setting up the pxlBlck_cassetteLamp, you now need to install ESPEasy including the pxlBlck plugin on the ESP8266. How to do this is described in the following article.
Configure pxlBlck plugin
After installing the firmware you have to configure the plugin correctly. You can also find information about this in the article pxlBlck - Install and configure the pxlBlck plugin.
As an additional guide, you can also use the settings from the screenshot shown here or simply load the prepared configurations. You can find information on this in the next section.
Load sample configuration
In the article ESPEasy - Set up access password, back up and restore configurations describes how you can transfer a configuration file to your ESPEasy device. Configuration files which already contain the complete configuration for the pxlBlck_CassetteLamp can be found under the following link.
Configuration of the rules for use with the APDS-9960 gesture sensor
To ensure that a recognized gesture on the gesture sensor also leads to a change in the light on the lamp, you must configure the rules accordingly. If you have loaded the example configuration from the previous step, you no longer need to do this. However, if you want to add the rules manually, you can find them here.
On gesture#Light do pbbr,0,[gesture#Light],1,1,15, endon
Configuration of the rules for use with the rotary encoders
Actuations of the rotary encoders are also only linked to the settings of the pxlBlck_plugin via rules. This is the only way to change the light on the lamp when the rotary encoder is activated. If you have loaded the example configuration from the previous step, you no longer need to do this. However, if you want to insert the rules manually, you can find them here.
on encoder_right#Counter do
pbbr,0,[encoder_right#Counter],1,1,15,
endon
on encoder_left#Counter do
pbclrwhl,4,[encoder_left#Counter],1,
endon
on encoder_left_button#State=1.00 do
pbbo,1,2,
endon
on encoder_right_button#State=1.00 do
pbclr,0,255,255,255,
endon
Configuring the display brightness setting
You can also use the measured brightness value of the APDS-9960 to automatically adjust the brightness of the lamp to the ambient brightness. How you can configure ESPEasy for this is described in the following article.
pxlBlck Usecases
Articles are listed under the tag "pxlBlckUsecase" in which you can find examples of use. It also explains how you have to configure your pxlBlck for this.
Animations, icons and commands
More information about the display of animations, icons and the possible commands with which you can configure your pxlBlck can also be found in the following articles.
- pxlBlck - Configure and display animations
- pxlBlck - design icons, transfer them to the pxlBlck and display them
- pxlBlck - Commands for configuring the pxlBlck
Have fun with the project
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.
Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂
Hello !
First of all "Great project"
Since my wife is an absolute retro fan, this will be a gift for her. I'm still at the beginning. The 3D printer is running and the parts are ordered.
But in the section "Download sample configuration" it says that you can download a suitable configuration via a link. Either I am blind or this was simply forgotten ?
greeting Dirk
Hi Dirk,
you were absolutely right. Just added the link.
Have fun building. 🙂
Best regards
Fabian
OK thanks. For the sake of completeness:
The link for the print files follows https://github.com/Nerdiyde/pxlBlck/tree/main/platform/pxlBlck_RingClock
Wrong directory. Should:
https://github.com/Nerdiyde/pxlBlck/tree/main/platform/pxlBlck_CassetteLamp
be.
Hi Dirk,
thanks for the hint. Corrected the spot. 🙂
Best regards
Fabian