Is there a Puck.js Flashing jig?

Posted on
  • Hi there! I have 15 pucks here and I've been toying around with getting them all to communicate with one another like a mesh network. The problem is that flashing all 15 of them is quite cumbersome and I was wondering if anyone has made a custom jig to flash the pucks. I would assume @Gordon may have had made some while developing Puck.js as well. Does anyone know if there are jigs for sale or even better, have there been schematics/board designs of any jig for the puck released? Thanks in advance!

  • Hi! A while ago I played around with some OTA mass deployment of a puck swarm.
    This is what I did: https://github.com/Whizzard/puckjs-fanou­t
    Maybe you can evaluate and/or improve on that?

  • Oh wow! This is quite neat! Unfortunately I went through a different route and built a custom binary for the puck :c (wish I found this wayyy earlier lol). So they could only be programmed via the SWCLK SWDIO pins. But thanks for the share! I will definitely consider porting the code over to vanilla puck.js bootloader and giving it a shot :D

  • Hi! I do have a jig for programming Pucks here, but it's very hacky - involving a few pogo pins glued in the right places - just what I needed for debugging. It's something you could reproduce with a bit of protoboard and some pogo pins, but it wouldn't be pretty! The manufacturer has their own jig that they make, but it's way more expensive.

    Do you have an nRF52DK? Realistically you'd need one of those to handle the interface via SWD easily. If you do then I could definitely come up with a design for you as it's an issue I think a few people will be having!

  • Just to add - what OS do you use? If there were a tool that would automatically flash a firmware over Bluetooth LE to any device that was in bootloader mode, that might do what you want?

    Then you'd just have to run the tool, put each Puck.js into bootloader mode and wait until all the LEDs on them went out after maybe 10 minutes.

  • I'm using MacOS atm. The tool you mentioned sounds fantastic! Although for the time being, I'm actually looking for a physical jig mentioned in your earlier post. I've started on designing a PCB for a jig to use with the Puck, based on the nRF52DK actually xD, but figured I probably didn't need to reinvent the wheel. In that case I'll finish up the design, although it might take me a while since it's a on and off project.

  • Would you be willing to share it when it's done? That's basically what I had planned as well - just 'shield' with pogo pins.

    Personally, I'd copy the Puck.js board files from https://github.com/espruino/EspruinoBoar­d/tree/master/Puck.js/eagle into your design first, then you can use those to make sure you position the relevant pins.

    On mine, I added Pogos for 3V, GND, D28 and D29 (D28/29 can provide serial comms if needed, but the positioning also makes it easy to sit the Puck down nicely), then SWIO and SWCK - reset isn't really needed.

  • Certainly! Will keep you posted along the way :D
    Yeah, I started with the reference board files to make sure the positions are spot on.
    Are there any specific features you'd like me to add? I'll see if I can slip it in while designing it.
    PS. Would you mind sharing a picture of your current setup? Some pogo pins are insanely long, I might opt for shorter ones kind of like the one for ruuvitag

  • There should be a picture below. I forget where I got the Pogo pins I used, but they're quite delicate (and around 16mm long). I just took an old Puck prototype PCB and drilled out the SWD pads to fit pins - then manually wired on the back, and connected to the 0.1" headers on the nRF52. You need to connect to one of the Arduino headers too since amazingly there's no GND on that header!

    DirtyPCBs sell super-cheap and quite nice Pogo pins (although they are quite long) - so if you used those then you could order your PCB at the same time as the pins :)

    I'd say:

    • Maybe make it so you could get two of the same PCB and then stack one on top of the other with a spacer between to strengthen the pogo pins - if you're using long ones?
    • Remember to connect GND DETECT to GND - which'll cause the nRF52DK to switch from using SWD to the on-board nRF52
    • Maybe you can think of some magic way of holding the Puck down :)
    • You could provide a header for attaching a USB-Serial converter, so you can get Serial communications to the Puck through D28/D29 - that's what the 3 wire flying lead I have is for.
    • The on-board voltage supply is 2.8v, so you could maybe add some way of making sure it didn't try and flatten the CR2032 battery if it's been left in the Puck during programming? Maybe just a schottky diode.

    But those are just random ideas - for most people it's the programming that'll be the most useful.


    1 Attachment

    • Screenshot at 2018-01-05 09-03-36.png
  • Hi there! Sorry this is long overdue, but here's a rough design of the PCB that I've been using. Hope others are able to make it better than I am xD. Thanks again for all the help :D
    The pogo pins used are available here:
    https://www.digikey.com/product-detail/e­n/mill-max-manufacturing-corp/0908-0-15-­20-75-14-11-0/ED90384-ND/1991674
    Happy Hacking!


    1 Attachment

  • That looks great - thanks! So it gets the power from a USB-TTL converter that you attach to the horizontal contacts?

    Does it all work ok? It looks like the pogo pins for 'SWIO' and 'RST' might be mixed up?

  • It gets power from the DK itself, however I routed them over to the header pins so that if you don't have a DK and want to use it just for USB-TTL, the programmer can power it too. To reduce the cost I didn't add in a power switching circuit, so I would not advise connecting to USB-TTL programmer if you have the jig plugged into the DK.
    Also SWIO and RST are not mixed up, this design is meant for the pogo pins to point 'upward' from the DK and the Puck is meant to be placed face down on the DK. Let me know if you would like any adjustments :D

  • Ahh - thanks! Sorry about that - for some reason I was imagining the board 90 degrees out from where it should be.

    This looks amazing. I'll send off and get one made for myself - it should be miles better than my current hot glue contraption :)

  • I got some of these made and sadly the pins to the DK are in the wrong place (both P16 and P13).

    It's possible to make it work by soldering in P20 and half of P13 (but not P16) and then shorting some pins, but it's not ideal.

    I've attached a board with this fixed (I believe - it's not been made yet!), and with the holes changed such that you can stack two boards and then use E2 and B1 pogo pins from DirtyPCBs (which you can also order the PCB from).


    1 Attachment

  • @Gordon , this conversation and other jig discussions seem very old. I have a SWD breakout board from Adafruit https://www.adafruit.com/product/2743 and only want to program a couple of boards from the nrf52-DK. I have already done similar with other boards such as the https://www.adafruit.com/product/4062 .

    The lab bench stuff works fine with the Feather but I would like to use some of these unused Pucks I have lying around.

    I'd even be OK now with having someone else help me hold some wires against the SWIO and SWCLK flat pads on the puck.

    Do you know what pins I would need to connect (manually or via jig) to program from the DK?

    SWIO/SWCLK
    GndDet / Gnd / Vref

    ?

    Thanks for any help. This type of stuff tends to sit around for years until I get back to some need. I just want a puck to turn on some Bluetooth Mesh Lights.

    I used nRF Mesh on my phone to create a mesh of the lamps and programmed my DKs and Feathers to be a mesh light switch. That works.

    I read that I should be able to find the regular gatt attributes/characteristics and bang away at that directly from a simple puck.js program but I could never diagnose what the attributes and values were in my Sengled Lamps. My tech terms could be off.

    It really shouldn't be this hard but hacking is such as it is.

  • On my Sengled lamps, I can use their app to connect to the lamps and turn them off and on, easy peasy.

    But... the Sengled app does not give me any engineering data such as device addresses or attribute stuff.

    I can delete the lamps from the Sengled app and use nRF Connect to see what that can find...




  • At this point I am nearly ready to throw in the towel and just create an nRF Mesh with the Sengled lamps. Easy, done.

    Then use the nRF DKs to burn a Bluetooth Mesh Lamp Switch sample to the DK. Easy, Done.

    Used the DK and SWD interface to send that same program with a new board style to the Feather. Easy, Done.

    And..... throw the puck.js devices back into the junk drawer?

    They are such nice hardware devices but I just can not figure out how to get them to do what I want then to do. Just turn the darn lamps on and off.

    Productizing for the mass market takes a lot of engineering.

  • Video of mesh with two lamps (I took the third lamp out of the network to try to get more old-school BLE to work).

    https://youtu.be/exl_n-F5o-s

    By the way, my two Thingy:52 devices are now paper weights because the batteries no longer charge. They are three-wire batteries and I don't want to spend over $10 each to replace them. I have five pucks that are not being used that I am trying to make work with my Sengled BT lamps.

  • Hi - to flash the Puck with your own firmware via SWD, just connect up the GND, SWDIO and SWCK pins to an SWD programmer (https://www.espruino.com/Puck.js#pinout) - you could just solder direct to the pads if you have thin wires.

    The nRF52DK needs to be told something is connected with the ground detect. Full schematic of what to connect is here, albeit for bangles: https://www.espruino.com/Bangle.js2+Tech­nical#swd

    So if you have the DK working then flashing the code to the Puck should be easy.

    Although have you tried connecting with NRF Connect and writing to the
    0010203... characteristics (or maybe turning the lights on and off then reading the values?). It feels like that might be a real possibility.

    Also, it looks like the lights have a "Mesh Proxy Data In" characteristic which is part of "Mesh Proxy Service", and as I understand it, that means you can connect to them via normal Bluetooth and can the access the mesh via that - which means you could use the standard Espruino firmware on Puck.js.

    However, I'm struggling to find documentation on that - but if you could figure that out, that would be awesome - and is something that'd be really neat to turn into a library for Puck.js

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Is there a Puck.js Flashing jig?

Posted by Avatar for AnnKyun @AnnKyun

Actions