How to prevent socks mixed up during the laundry? I do not know.
What I do know is how to match the socks after the laundry.
Therefore I made this SOCK MATCHER.
How does it work?
1) Start with stitching a RFID-tag in each sock of a pair socks.
2) Keep one of the socks up front of the sock matcher.
The display’s indicates it is a new sock. On the RFID-tag will be written a follow-up number of pairs.
After it is written you shall be asked to keep the corresponding sock to the sock-matcher.
3) Keep the corresponding sock to the sock-matcher.
Also on this RFID-tag same follow-up number will be written.
From now after keeping one of the socks next to the sock-matcher the number of the pair shall be given.
How is it made?
Step 1) Introduction / Quick version
Step 2) Atmega328 on a breadboard / solderingboard
Step 3) Connecting the LCD to an Arduino Uno
Step 4) Connecting the RFID-RC522 to an Arduino Uno
Step 5) Programming the ATmega328
Step 6) Boxing
Step 1: Introduction / Quick Version
· 1x LCD 4x20 with Hitachi HD44780 driver or compatible
· 16x Male pin connector
· 1x RFID-RC522
· 1x 5cm x 7cm soldering board, 2.54 mm raster, 18 x 24 rings.
· 1x USB-B connector
· 7x Male pin connector
· 16x Female pin connector
· 1x Atmega328p
· 1x Socket PDIP28
· 1x Chrystal 16Mhz
· 2x 18 tot 22 picofarad (ceramic) capacitor
· 1x 10k ohm resistor
· 1x 10kohm pot
· 7x wire’s with on both side’s female connectors
· 1x Arduino Uno for programming.
And I almost forgot to mention the RFID tags 13.56 MHz Mirfare for the socks.
All basic stuff what can be ordered at electronic shops.
The solderedboard is directly connected with the 16x Male pin conecctor of the LCD.
The LCD shall be mounted at the top of the box.
The RFID-RC522 is connected with female wires to the solderingboard.
The RFID-RC522 is mounted at the front of the box.
Actualy the voltage to the RFID-RC522 shuold be 3.3V I forgot but it works for me.
I noticed this comment at the github "SPI only works with 3.3V, most breakouts seem 5V tollerant, but try a level shifter.") So be carefull.
For programming I removed the ATmega328 from the Arduino Uno.
Placed the ATmega328 in the Arduino Uno and made the upload to the ATmega328. The ATmega328
After the upload I tested it on a breadboard as within the picture above.And after succeful testing I replaced the ATmega328 to the solderingboard.
Goal of the box design is to make it in such way:
- it is reusable partly for other projects.
- assembly just by hand
- and disasemled it must fit in a letterbox.
The box is drawn in Fusion360.
The box is printed 3D by a fellow maker."Joost" found with 3D Hub.
- By making doubling of components within Fusion 360 the block would not printed.
This explaines the missing theeth.
Step 2: Atmega328 on a Solderingboard
First of all I found it verry usefull to first try everthing one by one on a breadboard.
1) The LCD with an Arduino UNO.
2) RFID_RC522 with Arduino UNO
3) Atmega328 on a breadboard.
4) Atmega328 and LCD on a breadboard.
5) Atmega328 LCD and RFID_RC522 on a breadboard.
6) Atmega328 on a soldering board.
7) Atmega328 and LCD on soldering board.
8) Atmega328, RFID_RC522 and LCD on soldering board.
To create this "SOCK MATCHER" a made the microcontroller on a soldering board.
How to install a microcontroller on a breadbord is explained on the Arduino site. https://www.arduino.cc/en/Tutorial/ArduinoToBreadb...
From a breadboard to a soldering board is just the next step.
It look like as within the picture above.
For the wirirng see the graphic diagram.
Step 3: Connecting the LCD to an Arduino
For connecting the LCD to the ATmega328 a complete instruction can found on the Arduino website: https://www.arduino.cc/en/Tutorial/LiquidCrystalD...
Different from the tutorial are:
- I used a 4x20 LCD
- and the Arduino UNO pin 12 and 13 where not used but pin 6 and pin 7 because pin 12 and 13 are used by te RFID_RC522.
Two points I noticed during installation where:
1) to be carefull is the LCD kathode and anode connection pin 15 and pin 16 can be twisted depending on the vendor. The cathode must be on GND.
2) I used a 4x20 LCD and I had to set each line because it jumped direct from line one to three. Example: lcd.setCursor(0,1); lcd.print("example text"); lcd.setCursor(0,1); lcd.print("The next line of the example");
Step 4: Connecting the RFID-RC522 to an Arduino Uno
After I recieved the RFID_RC522 I tried getting it working finaly I found the library MRFC522.h and examples. See the link. https://github.com/miguelbalboa/rfid/blob/master/M...
Step by step I tryd to get it to do want I want it to do with it.
1) Reading the UID (Unique Identification Code)
2) Compare the UID from differend RFID tags.
3) Read information on a RFID tag
4) Write the inforamtion on the RFID tag.
5) Clear written information of the RFID tag.
I am not sure but it looked that the writing to the RFID-tag improved after installation of the last library.
Step 5: Software
When that worked I started with writing the program.
During writing I noticed I needed to store information (number of pairs) on the Atmega328 what would not be losed after a power break. This is done on the EEPROM of the Atmega.
How this works is clearly explained on the Arduino website: https://www.arduino.cc/en/Reference/EEPROM
Most difficult was to keep the RFID reading functioning.
I had difficult with reading and writing a tag direct in once.
Not continously reading had to do with searching for a new tag and stopping the RFID reading.
The final set-up of the programm whas to write a case for each reaquired action.
A description is written in the introduction of the software
The software is within the introduction/quick version.
Attached above is also a program to clear the RFID tags for testing.
Step 6: Boxing
Goal of the box design is to make it in such way: 1) it is reusable partly for other projects and extendible
2) can be assebled just by hand or easly
3) and disassembled it must fit in a letterbox.
Idea is that when you for examle decide to use a OLED display you only have to change the top of the box.
Or if you want to add LED's, button's and such you only have to modify the front.
Because I had no experience I started with a small box ... cute.
This was a success, thanks to fellow maker."Joost" who I found with 3D Hub, who adjusted the drawing after the first test print was made.
He works with an original Prusa i3 MK2. As material I selected PLA/PHA = Colorfabb. A blend of PLA/PHA. With little better performance than the standard PLA.
The small box is 5cm width and the teeth’s are 5mm high, width and depth.
The box is drawn in Fusion360.
By making doubling of components within Fusion 360 the block would not printed.
This explains the missing teeth.
I used inches for the basic measurements based on the design of the Arduino Uno and the size between the soldering slots. 100 mil = 0,1 inch = 2,54 millimeters.
The "teeth’s' are 200x200x200 mil. Where I tried to make the "teeth’s" smoother by rounding the corners.
This caused the parts did not fit.
These "teeth’s" are reduced to 180 mil x 180 mil x 200 mil. What made it a littles bit to lose.
So the exact width shall be determined in the next project (I think 190x190x190).
The board inside surface is used as basic reference in inches/mils. So when decided is to reduce or increase the thickness of the wall the board layout won’t be influenced.
Wall thickness is now 100 mils with 45º corner. See drawing for explanation.
From the Fusion360 the drawing where transferred to STL by selecting "Cura" as print Utility.
I had problems with writing the RFID-tags so I removed the distance holders of the RFID-RC522.
With tape I fixed temporarily, so this can use an improvement.
Also I changed the RFID read indication on the front with a more open design
The final attached drawings are not yet used, so no guaranty for the drawings.
If used please let me know if these where accurate.
Why is it orange? Maybe because it is Dutch?
To give you a clear indication how it should fit I created this animation.
And the links to the drawings.
I hope you liked this Instructable and made you to decide to make your own sock matcher. Or it was helpfull to make something else.
Best regards, Gaby