• Electronics schematic

    Maximiliano Palay03/31/2023 at 02:12 0 comments

    This project is about functionality and keeping things simple. The electronics design isn't any different.

    I'll go component by component explaining briefly what is does, what signals it needs/provides and power requirements.

    The rotary encoder requires DC power (+5V and GND), and has three signals, two for rotation and one for the pushbutton switch. These are digital signals and range from 0V  to VCC. As we're using a 3.3V MCU, I gave the encoders a go providing 3.3V instead of 5V, and there seems to be no issues, these work correctly.

    The Neopixel LED ring requires DC power (+5V and GND), and has one input and one output. The input is a digital signal which indicates the WS2812 chips how to operate. The key here is that one signal can address many leds individually. The output isn't to be used in this project, but would be useful to daisy chain multiple rings. Although we will provide the ring with 5V, I tested the signal using 3.3V instead of 5V logic levels with no issues so far.

    The coin cell vibration motor is just a regular DC motor and only takes power. It is rated @ 3V. Although I was tempted to drive the motor directly from an I/O pin, it is far from a recommended solution due to the power consumption. Although I have seen some people have done it and got away with it, we'll be using a transistor to drive the motor. We'll use an output on the pico to drive the transistor, which will in turn regulate the current provided to the motor. A diode is placed in parallel to the motor to avoid backwards-flowing currents, which can damage stuff. This is usually referred to as a flyback diode. You can refer to another schematic and a bit of a more detailed explanation here.

    I'm attaching a high level diagram below.

    Credits: The Pi drawing was taken from here. The encoder drawing was taken from here. The Neopixel ring, NPN transistor, coin cell motor, resistor and diode were taken from Tinkercad.

    Electric schematic
    Electric schematic

    In the next log we'll bring this schematic to life.

  • 3D printing & some mods

    Maximiliano Palay03/08/2023 at 00:15 0 comments

    First prints

    If you head back to the last lines of the previous log, you'll find that engineers tend to overcomplicate things. Turns out if things aren't overcomplicated, they are oversimplified! - I'll tell you why, hold on.

    First things first.

    I 3D printed the bottom half which serves as the LED diffuser. You can see two of those on the next image.

    The screws are put in place so when the resin finished curing, the m2 threads won't get clogged. I'm not sure if I mentioned this before, but the resin printer prints m2 threads surprisingly well, so the threads are embedded into the parts. It has its pros and cons, but it is simpler for me to embed them and have them come out directly off the printer.

    With FDM that is not the case. I'm usually printing clearance holes and using a thread cutter to make the threads.


    I have assembled the whole thing (without connecting anything) and tested the feeling of the top wheel/knob. It had a lot of play. Turns out adding additional support other than the encoder was indeed a good idea.

    I thought of two options to fix this. One of them was using bearings I have lying around, not 100% sure this would fix it, but I gave it a try. The design was then modified to accommodate the bearing. Luckily, this wasn't a major change.

    So the top wheel now grabs on to the encoder, but also has some lateral support at the bottom, provided by the bearing. We're keeping the amazing stack design alive. Although this does not solve the issue 100%, it alleviates it. I do have some more ideas for rev 2.

    I'll leave some drawings of the final design attached as files for reference.

    Printing everything

    I combined resin printing with fdm, I do believe there is room for each of them. The parts which need a better finish were basically printed using resin. Overall FDM print time was around 6 hours (2 units) and SLA print time was around 6 hours as well (2 units). I'm not counting a few discarded pieces.

    Post processing

    Having in mind this is a product that one might interact with many times a day, I find the finish and feel very important. The clear base and the top wheel were sanded up to a 320 grit, by hand, to achieve a frosty look (clear base) and smooth feel. A few pictures of the process.

    Clear resin base without any post-processing. You might be able to see kind of aliasing due to the pixels on the printer, and the orientation of the model on the printer.
    In the process of sanding. This gives the clear part a frosty look, ideal for our use case. The top wheel, I'm not that convinced this finish is what I want. But painting it is always an option.
    Sanded clear base. The port opening isn't sanded so you might still see a few artifacts there. But the piece is smoooooth.

    Final look

    A final sanity check before going all-in on this design. Don't worry, I'll post a video of the whole assembly. This was just kind of a mockup to check how it looks.

    Of course one of the first things I had to do was testing how it diffuses light. Have to say I'm quite happy with the results.

    I wasn't sure about lots of things, but it turned out okay. Perhaps some of the fun of it is that - not knowing how things will turn out, at least not 100%.

  • Components & Design

    Maximiliano Palay02/23/2023 at 02:09 0 comments


    If I hadn't made it clear by now, let me say I haven't ever seen one of these in person, neither know how they work. I can only make assumptions looking at their construction and functionality.

    With this little knowledge, I'm listing the components I want it to have and the reason for each.

    • Microcontroller. The lamp needs brains, a CPU. While a full fledged SBC would be possible, I believe it's  overkill. We don't need many interfaces and an OS to make this work, not to mention it consumes more power, for nothing.
    • RGB leds. This is the core, its lamps - if you didn't notice. I'm thinking something cylindrical. Perhaps getting RGB LED rings seems like a good option.
    • A vibrating motor. I'd like to add a vibrating feature and being able to notify with vibration, just like a smartphone.
    • Encoder with pushbutton. As previously mentioned, I like the idea of a simple interface with a rotating knob. The pushbutton integrated into the knob is a great characteristic for increased control capabilities.

    Without thinking much on the construction, I believe we can make a structure-less friendship lamp with these components. We might need a few electronics components such as transistors/resistors/etc, but we'll see that when we know exactly which components we're using.

    I usually have an idea in mind, so I know what to look for. In this case the microcontroller is a RPi Pico W which I previously acquired, and this project would serve as the first attempt at using it. The RGB leds are Adafruit's popular Neopixel rings, with 16 RGB LEDs, they pack some extreme brightness. The vibrating motors are cheap "coin cell vibration motors", just 10mm in diameter x 3mm high. Encoders are simple Arduino-compatible optical rotary encoder modules with 20 positions per turn and a pushbutton. I'll do a breakdown of the cost, bought everything on Amazon.

    [$ = USD]

    • RPi Pico W bought 3 x $30 ($10 each)
    • Vibrating motors bought 10 x $12.76 ($1.28 each)
    • Encoders bought 5 x $8 ($1.6 each)
    • Neopixel RGB 16 LEDS 2 x $24 ($12 each)

    This comes to a total cost of ~ $25 per lamp, only in electronics. We're still missing the construction (mostly resin and filament).

    CAD design

    My Fusion360 student license is about to expire, so this might be my last project on the platform, we'll see.

    The first step towards designing this was getting the components models. GrabCAD has proven to be extremely useful in this kind situations, and that is where I got the Pi Pico and the Neopixel ring models. Always check that the models you download reflect the components you're using. In my case, the neopixel ring model is less than 1 mm different than the ones I have, but that is enough to make it not fit.

    You might be asking yourself about the encoder and the vibrating motor, I didn't fin a model for those, so I got my caliper and started taking measurements.

    Components modeled in CAD

    With all the components ready, it was time to arrange them and create the structure which would hold everything together.

    I envisioned a cylindrical shape, with every component located on a fixed base, and a rotating knob on top. The rotating knob would be part of the outer shell, so if you looked at it, you wouldn't know its a knob. I got inspired by my Xiaomi monitor light bar's remote. There were two options for the light ring: face up or down. I went with the latter. I know the lamp will be used on a white table, so it might as well help create a cool effect. Further, if I don't want the individual leds to be visible, I have to be quite precise about the distance between the LEDs and the diffuser (at least the minimum distance). This distance would mean more volume as well. Facing down, the LEDs aren't directly facing anyone, so this wouldn't be an issue. The power input would be the Pico's USB port, so it had to be correctly placed with a tidy opening.

    Final design, top shell (aka wheel/knob) removed

    I began with the base, the placement of...

    Read more »

  • The concept

    Maximiliano Palay02/23/2023 at 01:50 0 comments

    Distance Lamps

    If you don't know what "distance lamps" are, no worries. We're all learning here.

    The concept is actually quite simple. In their simplest form, these are a pair of tabletop lamps with some sort of input (could be touch interface/buttons) that allows to change the color. The main feature here is that if the lamps are in sync, when you change the color of one lamp, you are actually changing the color of its counterpart as well. This concept can be expanded to many lamps, and some extra features other than changing color.

    Picture of the LuvLink friendship lamps. Click on the image to go to their website.

    A simple Amazon search will flood you with alternatives and give you a sense of the pricing ranges. You can typically get ahold of a pair from ~80 bucks for the lower end up to 200 bucks for some of the most refined.

    Why DIYing distance lamps?

    The question is if you can buy them, why make them? Because why not?

    I'll share some benefits of DIYing the lamps:

    • Learning. This project involves designing, prototyping, manufacturing, networking and programming.
    • Cost. You might be able to make a cheaper alternative than what is off-the-shelf.
    • Customization. Adding the functionalities you please, don't settle for available functionality!
    • Cool factor. If friendship lamps are cool, imagine if these were self-made!

    Besides these, I wanted to do a project involving LEDs, diffusers (to take advantage of a DLP printer and clear resin), and a first project for the [relatively] newly released Raspberry Pi Pico W. Although a bit overkill, the Pico W's builtin Wifi connectivity and micropython development language makes it an attractive dev board for such a project.

    I aim to control these using a simple element: an encoder. Although touch surfaces are cool, I find it amazing that such a simple control as a rotating knob can enable great functionality. The control functions will have to be cleverly implemented!

    As usual, this is another project I'm doing on my after-work hours for sheer skills development. Continuing my latest project trends, I aim this to be as close as a commercial product in the means of usability, aesthetics and performance. I might make some shortcuts on the configuration side of things though ;).