Showing posts with label RFID. Show all posts
Showing posts with label RFID. Show all posts

2022-06-29

The round one

As previously blogged, I created an NFC RFID reader based on the PN532 NFC chip.

It works well, and includes red/amber/green LEDs and tamper switch and even contacts for a "door bell". This makes it ideal for access control.

But I decided some cases may look better with a round modules. So I wrote code to measure track lengths in KiCad PCB files, and then code to make a spiral track, which I made the same length, and then made a round version of the same thing.

It works. It worked first time. Indeed, the solder paste and cook worked first time - no re-work - no glitches - just worked. I am really pleased.

One of the small tweaks was around the reverse mount LEDs which used to tombstone in the oven - that is all fixed nicely now.

Other changes are that the connectors are all SMD now to make the other side "clean".

Which leaves me wondering if I should add a logo or something on that side. I am really not sure. I also think purple solder resist may be nicer. The main thing is I want a distinctive appearance / brand that can compete with elechouse on Amazon. Suggestions welcome.

Of course, what is super frustrating is that these are all prototypes - I cannot really make commercially until the global component shortages are sorted and I can actually order 100 of the PN532 or indeed anything else! Once sorted, I plan to put these on Amazon.

2019-04-20

PCB milling

My first attempt as the RFID reader version of my "scales" system meant a lot of enamelled wire...

It was a tad messy, and time consuming. But worked well.

I decided a small PCB would be a better solution, and the answer for one-off PCBs is, of course, a milling machine.

Nearly 30 years ago I used such a machine when working at Nokia. It was very useful, and expensive. These days you can get a small CNC machine for under £200!

I purchased one from Amazon (duh!).

It took some assembly, to say the least, but plenty of good videos on line.

It has an arduino, which allows moving the head and running code (.nc) files from a micro SD card. It looks like the main machine talks serial / USB, but not got that playing just yet.


Making PCBs

I designed the PCB on inkscape, which is fine for a small PCB like this. The challenge, as always, is a small single sided PCB with minimal links. My first design assumed I could run tracks between the pins on a 0.1" header (which I could do 30 years ago). It seems this is tricky, to say the least. Maybe we can managed 1/20th" pitch devices like an SO8, just, but tracks between 0.1" headers are not so easy.

So I redesigned with "chunky" tracks. This meant one small link. A 1206 0Ω resistor would be ideal, and Amazon prime do them, but out of stock, so a wire will have to do.

In inscape it is easy to make tracks and pads. You then just stroke-to-path, and union the paths and tracks to make an SVG cut path. Of course this cuts on the track edge which makes the tracks smaller. You can make that a path and stroke-to-path again and union first stage, but that is faff. Simpler to design with chunky tracks and pads that almost touch when designing, knowing the cut path will be thicker. If that makes sense. Obvious I needed a layer for drilling, and cutting around the edge of the PCB, and the tracks.

Making GCODE

This is a lot harder than I expected - there seem to be several solutions, and FlatCAM looked promising, but I cannot get to work on my Mac. There is an svg2gcode tool, but did not work well. I ended up just making my own code to convert EPS to GCODE with options for speed and cut depth and so on. The GCODE goes on the SD card, and simple.

Stupid UI

The UI on the arduino is daft - it has a mode to control portion, but then uses all 8 buttons and has no way to escape back to the main menu as far as I can see - so I set origin and have to power cycle to then run the file. Maybe I am being thick.

The result...

Milling
Drilling
Cutting
Ok I cut too deep and cut in to the bed, idiot. I'll either cut less or add a sacrificial layer below.

That worked

Final PCB

It is not that good, but the design with chunky tracks means it works!


And time to try it out for real...



It only bloody works!!!

P.S. I have open sourced the eps2gcode.

P.P.S. Make sure the screws are tight on the screw ends - else you get drunk tracks on your PCBs.



P.P.P.S. bCNC is the tool for sending GCODE to the CNC machine directly - works a treat on a Mac.

2019-04-18

Upgrading the scales to WiFi and RFID

I have now taken things a bit further with my scales upgrade. Not just WiFi, but RFID as well.

This means that instead of pressing send, you tap a card or key fob on the scales.


The scales then send the weight and card ID over HTTPS to a server that puts the details in a database. My previous video showed that I connected a wire to the SEND key for this reason. As it happens it needs a small diode in line so the processor does not get upset at power on, but other than that it works as planned, and was pretty simple.

This is great when the scales are used by everyone in the family, and the next step is some nice graphs and so on. James is working on that.

Of course, whilst this is fun, this suddenly starts to have GDPR implications. For "personal" use we are probably fine, but the second you extend it (e.g. taking to Slimming World to show off, as James is planning) you create fun an games with GDPR. I  can see the "SEND" button being re-labelled "CONSENT" and the privacy policy being labelled on the scales as well.

None the less, a good proof of concept and a fun tech project. I wonder if Slimming World, or Weight Watchers, and Marsden, are interested in teaming up with us and making a complete package. Saves taking laptops to meetings, and the cards are easy to brand :-)

This is how it is done...

QR abuse...

I'm known for QR code stuff, and my library, but I have done some abuse of them for fun - I did round pixels  rather than rectangular, f...