How to blow up a mag-lock… and what we learned

 

A joy of electronics is burning out components.  Always buy extra. I burned out a magnetic lock unit while working with an implementation of Google’s makerspace-auth (https://github.com/google/makerspace-auth).  As it is electro-mechanical, I decided to take advantage of the situation and pop it open. First let’s see what I went into the situation with.

The maglocks in question were identical to this unit:

https://www.banggood.com/K02-12V-DC-2A-Electric-Magnetic-Lock-Intelligent-Cabinet-Door-Lock-Fail-Secure-p-1156149.html?cur_warehouse=CN

 

The provided specs:

– DC 12 V, 2A

– Maximum Continuous Lighting Time: 5s

– The connector type of K02 is SM 2 Pins Plug. K02 has 2 plugs, one female plug for power supply, another male plug for feedback signals.

My initial read is that the lock took 12V power in the female JST SM connector and would trip based on the signal provided to the male connector.  Astute readers will have picked up my mistake by now, but let’s continue as I did: assuming I know what I’m doing without writing anything down and checking assumptions!  Did I mention always buy extra?

Before powering anything, I wired up the lock to the board.  The PCB takes in a 12 V barrel connector and has 12 V outputs, so I jumped power directly into the female plug, and left two jumpers on the signal pin to trip it.  I powered up the board, and then tried to trip the lock. Nothing. Weird. Well, not weird to you astute readers, but it was weird to me. I disconnected everything and started to pick up the lock. I say “started to” because it was warm, nearing on toasty.  

“Huh.  An internal short?  Probably not. Let’s assume it was me.  What did I do wrong?” First I checked the connectors.  Did I mess up male and female? I googled the JST SM connectors to be sure.  Nope, got that. Maybe the wires were cross? It wouldn’t be the first time I’ve received products where the wiring was not US standard.  I couldn’t tell that from the tools I had. There was definitely a short, connectivity testing proved that. That’s a nice tip, check connectivity between power and ground before turning anything on.  If there’s a short there, it’s time to stop and re-assess. Who put the short there?

I popped the lock open, it was just three screws.  Inside was telling. The female connector went to a solenoid which pulls a rod when power is applied.  The male just goes to a mechanical switch which is held closed when the lock is closed. A spring pulls the latch open based on the action provided by the energized solenoid’s magnetic field pulling the pin to center.  This also would push anything attached to the latch outward on triggering, making a door swing open. Neat!

So there was an internal short, but it was the intentional kind.  Had I performed a connectivity test for shorts before applying power, and I would have found one.  The solenoid is just wound copper, so it will present as directly connected conductor. This would have been a clue to not apply power constantly.  The lock works by applying 12V, 2A for a maximum of 5s. When I turned the power on, I had 2A running through the solenoid. Most likely this melted insulation between the windings, and created shorts up and down the solenoid, ruining the loops required to induce the magnetic field.

I could have avoided this with a better reading of the specs.  The male connector is for feedback, not for triggering. That’s the key information you astute readers picked up that I missed.

A lot of electromechanical motion uses some kind of inductance (a solenoid is an inductor) and a magnetic material to convert electrical energy to mechanical force.  This lock is effectively a mechanical relay, when energy is applied, it releases a spring which closes the switch when locked. Any signal is fed into the male pin will come through the wire since it’s just closing a switch, allowing the signal through.  Connecting this to a GPIO and ground will provide a signal if the lock is open or shut.

Burning things out is always exciting is some fashion, but it’s always an opportunity to go back and figure out what went wrong.  In this case I was lucky, I had extra on hand (did I mention always by extra?) and this was a mechanical part so I could open it up and take a look inside, and I now I know exactly how they work.

 

~ Contributed by Matt Arcidy of Ace Monster Toys

 

django REST framework

Resources for creating an API for FATT

During recent conversations on FATT Slack Channels, the topic of creating the server-side end of things came up. For those of us not imursed in server-side or backend development, this recommendation may come in handy.

  • Start with a solid tutorial on building an API with Django REST Framework with a database backend.
  • The client’s (devices) “may” make requests to servers but there’s no hard requirement for it.  For the NOMCON FATT project authentication was handled via lists on the devices and didn’t need a central server.   Implementing FATT in a space setting will mean some combination of new architecture or integrating with existing architecture so that whitelists/authentication is dynamic and updates as members are added or leave.
This post is a summary of the Slack conversation whose primary contributors were Matt Arcidy and Chris Sader. 

Hope and dreams from NOMCON 2019

There were two FATT sessions at NOMCON this year supported by an exhibit table and interactive boxes throughout the conference center.

During the very full primary session on Sunday, we captured what we as a community wanted in the first two months. This is what it came to:

0. Mailing List: http://eepurl.com/guYEkT DONE
– Call for documentors
1. Make Demo Kits available to play with
2. Google Hangouts Hackathon
3. Sandbox api and database
4. Place/platform to capture “asks” (graspIO?)
5. A community of practice discussion (user engagement, behavior = sucess)
6. Platform/place to capture painpoints – mapping nees and asks to problems with prioritization (social hopefully)
7. Analyze change management when moving to FATT devices – What does this look like, what is the lift etc.
8. Call for contributors
9. Set up platform/ways for people to donate to the project
10. Document what current how brew set up’s look like (pictures and words and code)

FATT @ NOMCON

FATT@NOMCON 2019

The FATT Experience at NOMCON

  • Fun interactive access point devices were placed throughout the conference, including:
    • 3 LED light sculptures
    • 2 Digital Magic 8-Balls
    • 2 Minty Boxes (mint dispensers)
  • Each participant was given a unique RFID page to use when interacting with the installations
  • The data was then exported to a dashboard at nomcon.foballthethings.org
  • On Sunday we wrapped with a lively discussion about the future of affordable access points in spaces. We came up with a first 60 Plan!
  • Here is the session deck

 

FATT @ NOMCON

History

The FATT Project started under that name in 2016 at Ace Monster Toys Makerspace (AMT) in Oakland, California. But really solving the access problem has been going on since makerspaces became a thing in the early aughts. AMT like many hackerspaces had built and  Frankensteined several door systems over the years. Volunteers come and go and eventually, we bottlenecked on maintenance and repeatability. So we started researching solutions and this is what we found.

  • Current commercial options are not affordable for most and have scalability issues as makerspace needs are diverse and constantly evolving.
  • Many spaces have created customized access systems solutions yet few of them are repeatable or scalable.
  • Many folks have taken on this project yet we all seem to bottle-neck at the same point.

And The FATT Project was born. The FATT Project aims to get past that bottleneck by engaging outside the AMT community.