Close
0%
0%

Electronic Barrette Hub

A base station of all your blinking lights

Similar projects worth following

Electronic jewelry is difficult to make, especially when it's supposed to be worn on your head. Things like earrings, hair clips, studs, and even glasses are difficult because of the size and power requirements. There is one accessory that doesn't have such strict requirements: it can be large and relatively heavy, it doesn't touch your skin, and it can fit a rechargeable battery: it's the hair clasp, also known as barrette.

The idea here is to use a barrette as a sort of a hub providing power and control to other accessories on your head. It will contain a microcontroller programmable with CircuitPython, an accelerometer, a light sensor and a microphone — so that you can make things react to movement and sound — and a dozen small sockets, into which you can plug thin wires leading to the actual accessories. You can even have LED eye lashes or #Mechatronic Ears with this!

barrette01.fzz

The Fritzing file for the Pulse Barrette.

x-fritzing-fzz - 75.69 kB - 08/21/2018 at 15:38

Download

  • Power and Connectors

    ꝺeshipu08/26/2018 at 10:43 0 comments

    Once I decided to use the CircuitPlayground Express board, everything else clicked in place. The battery will need to be sandwiched between the carrier board and the CPX, because the other side of the carrier board is pretty much dominated by the barrette itself. That means I need a relatively large battery that will fit in there. Something like this:

    There will be a second USB port on the carrier board for charging the battery and for programming the addons (this way the addons can have a less troublesome connector on them, that you will connect to the carrier board for programming).

    There will also be 8 sockets for connecting the individual addons for wearing. Those sockets require some thought. On one hand, the plugs need to be small and light, because they will be most likely attached to almost invisible magnet wires, and we don't want that to break. On the other hand, they need to be easy to connect and disconnect, because you will be likely doing it while the barrette is at the back of your head already. Finally, they need to be keyed, so that you won't connect anything in reverse and burn it.

    I was looking at various molex, jst, servo and other connectors, but they are usually rather expensive, bulky or require large force to connect. Finally, I decided to simply use 1.27mm female pin headers on the barrette side (female, because they expose power, so you don't want any shorts there), and male pin headers with heat-shrink tube as plugs.

    What about keying them? Well, as you can see, the assembly is asymmetrical, so all I need is some physical obstacle on the side where the cable is not supposed to go. Like a single male 2.54mm pin, for example.

  • Reuse

    ꝺeshipu08/20/2018 at 22:46 0 comments

    It's been a little bit frantic the last few days, and I didn't really have much time to work on this project, but I decided to at least write about what the plans are.

    First of all, the "dumb" blinking barrette has been given to a number of people for testing, so that I will know if this general size, weight and attachment method are practical. I still have a few left, I might put them on Tindie when I find a bit of time to make proper photos and write the description.

    Second, the "smart" barrette is supposed to run CircuitPython and have a bunch of sensors built in — pretty much like the Adafruit's Circuit Playground Express, except with a battery, a charger and some standard of sockets for all the devices. So... why not just use the Circuit Playground Express, and make a base board for it with the battery, charger and the sockets, and the barrette, of course? That would save me a lot of work and testing, and it would still look pretty interesting. So that is the current plan. I found a nice round LiPo battery, and I started to design the PCB for the base:

    I still requires more work, of course — maybe when I have another sleepless night.

  • More Blinking Lights

    ꝺeshipu08/16/2018 at 16:02 1 comment

    The PCBs arrived from @Elecrow today, and they look great.

    There is one mistake I made — one of the traces is connected with one of the pads of the battery holder. That's what you get when you move the parts slightly just before sending the design for fabrication. Fortunately it's easy enough to cut the two apart.

    With the hardware ready, I need the software. In this case this simple code for attiny13 works:

    #include <avr/io.h>
    #include <avr/pgmspace.h>
    #include <util/delay.h>
    
    #define byte unsigned char
    
    #define COL0 PB0
    #define COL1 PB4
    #define COL2 PB1
    #define COL3 PB3
    #define COL4 PB2
    
    const byte PROGMEM VALUES[] = {
        (COL0 << 4) | COL4,
        (COL0 << 4) | COL3,
        (COL0 << 4) | COL2,
        (COL0 << 4) | COL1,
    
        (COL1 << 4) | COL4,
        (COL1 << 4) | COL3,
        (COL1 << 4) | COL2,
        (COL1 << 4) | COL0,
    
        (COL2 << 4) | COL4,
        (COL2 << 4) | COL3,
        (COL2 << 4) | COL1,
        (COL2 << 4) | COL0,
    
        (COL3 << 4) | COL4,
        (COL3 << 4) | COL2,
        (COL3 << 4) | COL1,
        (COL3 << 4) | COL0,
    
        (COL4 << 4) | COL3,
        (COL4 << 4) | COL2,
        (COL4 << 4) | COL1,
        (COL4 << 4) | COL0,
    };
    
    
    int main() {
        while(1) {
            for (byte i=0; i<20; ++i) {
                byte value = pgm_read_byte_near(VALUES + i);
                DDRB = _BV(value & 0x0f) | _BV(value >> 4);
                PORTB = _BV(value >> 4);
                _delay_ms(18);
            }
            DDRB = 0;
            _delay_ms(740);
        }
    }
    

    I made it a bit more complex than it could have been, but the basic idea is that I put the desired rows and columns for each LED in a table, and then I just loop over it to create the animation. It's really simple, I have no idea where the 150 bytes of flash this program takes come from. Oh well, it fits anyways. Here's a horrible GIF showing the animation:

    Now I'm going to send it to a couple of people for testing, and I'm going to work on the actual "smart" barrette — the one that can control all your blinking jewelry. 

  • Blinking Lights

    ꝺeshipu08/04/2018 at 08:33 0 comments

    With the clasp out of the way, it's time to design the actual PCB. I decided to start with something simple: a signal line, like a heartbeat, with LED lights running along it. With 5 gpio pins of an attiny45 I can get 20 LEDs if I charlieplex them, so let's try that.

    Unfortunately, charlieplexing requires some rather complex connections, so I will need traces on both sides of the PCB. I tried to at least make them look consistent, so that they won't be too jarring. The back of the board is a little bit more complex:

    As you can see, there is some fine detail in there. That braid on the bottom almost looks like a decorative pattern — maybe I will use that in some other design. Otherwise, there is nothing special here: battery, attiny, power switch, resistors and three pads for soldering the clasp.

    The PCB is now ordered and when it arrives I can start programming.

  • Preliminary Tests

    ꝺeshipu08/04/2018 at 08:25 0 comments

    The clasps I ordered a while ago have just arrived, and it's time to make a practical test of attaching them to a PCB. For that I used one of the old PCBs I have in my box. I scratched the soldermask in three places and tinned it with solder. Then I straightened the clasp a little, bent the ends so that the contact points are all in a straight line, and tinned them.

    Next, I put the two together and heated with my soldering iron. The result looks pretty good, and is really strong and solid:

    More importantly, the clasp still works, even after being attached to a rigid PCB like this. It's a little too big for wearing — because the PCB is straight, and not bent, the ends stick out to the sides too much. The actual barrette will need to me a bit shorter.

View all 5 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates