To start, I will design a platform, based on the "satshakit" but with 3.3V support. I will reuse it for the coming weeks, to minimize component waste. On the top, I will design a shield/mezzanine. That part will be specific to each week. This week, I will support a RFID card reader as an input device.
This week is about electronics and more specificaly abour all kind of inputs:
This is about
Topics covered (course) Video recording (course) Students and Labs My filesMy starting point is the satshakit, an improved and fabbable Arduino compatible board, based on the ATMEGA328P mcu.
In order to feed and communicate with the RFID card reader, I need 3.3V, which is not supplied by the satshakit. I have to update the schematic to add a regulator. Here is how it looks like
I need an additionnal connector to pass the 3.3v to the mezzanine board as well. Here is how the modified pcb looks like
Most of my information comes from this site. Here are the main topics:
I designed a mezzanine board for two reasons: first, to be able to reuse the common part (the modified satshakit) for next weeks and second to map the card interfaces to the satshakit connectors
As mentionned earlier, the card requires 3.3V and made it possible by adding a regulator to the satsahkit.
As per the datasheet, it looks I need also a logic lever converter as well, otherwise I will dammage the card reader when setting any digital pin to HIGH. Here is how to solve this. That smart design will convert each HIGH signal in both directions according to the voltage supported by the target.
This is based on a Sparkfun product. Here is the pcb of this product. As you can see, there is no way to implement this on a single side pcb, there is at least one via, approximatively on the middle on the picture.
It is a little bit to much for this week to start designing a double side PCB (but be sure I will come back to that challenge later ! ) and , HOPEFULLY, the card reader is "5V tolerant". (not from the power supply point of view but only from the digital pins point of view)
The schematic is quite simple and here is how the pcb looks like. The only trick is the 0 oHm resistor I used to create a small bridge and avoid a double side board
One last thing to mention: I don't know how to draw and export the drill layer in KiCad and I finaly made all the drills using a portable drill after the milling phase on SRM-20
This is now a routine procedure and here is the pipeline, including the output of the gateway between the mods and the SRM-20 under Linux (looks Mum, no hands !) and the output
And now.... the moment when something goes WRONG
Everything is fine with my home made reflow oven (but maybe the strange look of my pcbs) but the discovery for this week is...
... sometimes, a component is not designed to be oven reflowed .. and it melt. So are the cheap connectors ! and here is why the final product looks ... (dont't say.. )
In the beginning, there was nothing. And God said, “Let there be light.” And there was light. There was still nothing, but you could see it a lot better. (Woody Allen)
Just the day after came the .. bootloader (my humble contribution)
Same story we learned at week #5, we have to push a small piece of code using an ISP to the MCU. Here is how to connect an ISP
Once the bootloader is... well .. loaded... there is no need to use the ISP. We can leverage the FTDI cable and to use it to push any application code (and to get access to the serial console to see outputs at the same time)
For this week assignment, I just want to read a card or a tag and display what is stored in it in a terminal. Here is the program:
Giving more details on the structure of the information read on the card is out of scope for this week. I just tried with a RFID card and a RFID tag and here are the outputs
And here is how to interpret it
See here
I did not touch that part of the design this week
It is mainly done. From now, I know how to interact with the card reader and how to get the card ID from a RFID card or tag