Showing posts with label LostAndFound. Show all posts
Showing posts with label LostAndFound. Show all posts

Sunday, July 6, 2014

ELF Tag Documentation

Purpose
The "Electronic Lost & Found" Tag or ELF Tag is the result of my desire to design and build a small electronic device that I could make and share with friends and colleagues.  Beginning with the small, inexpensive devices such as Adafruit's Trinket or DigiStump's DigiSpark, I started with the idea that I would give everyone a microcontroller.  Why a microcontroller?  Because they are cool and are good tools for technical people to learn about physical computing.

After several iterations, I hit upon a design that was useful and also simple enough for me to make a dozen or so copies of.

Usage
It is a small device with a built-in USB male plug that can emulate an HID keyboard device.  When it is plugged into a Windows computer's USB port, it will automatically type out information that was pre-programmed into the device.  The example I chose to use was an electronic lost and found tag that could type out information about the owner and how to return the lost items.

It can also be programmed to do other things, but for a gift, the lost and found tag functionality was fine.

Design
The device is based upon the Atmel Attiny85 microcontroller and uses a very simple circuit to help the microcontroller acts as a low-speed USB device.  This USB interface is used both for the programming of the device and in the lost and found program itself.

Only 6 components total.
The rest of the job of emulating a USB device is done by the Micronucleus firmware.  This wonderful piece of software takes care of programming the device as well as running the user's program.  The software also makes the device roughly compatible with the DigiSpark, which means we can use their version of the Arduino IDE to program the device.

Hardware
The device is built upon a double-sided PCB that was designed and laid out with the KiCAD electronics design software.




The PCB was pre-cut to make the front and back alignment easier to manage.  The only critical alignment are the vias that connect the on-board USB pads from one side, to the main set of traces on the other.  All the other pads on the top side of the copper are unconnected.

The toner-transfer method was used.

After the board is etched, the shape of the USB connector is cut and cleaned up with a Dremel and a normal cutoff wheel.  The holes are then drilled and the parts are then soldered in place.  All totaled, it takes about two-hours per board to build.

Software
The Attiny85 chip must first be loaded with the Micronucleus bootloader and the fuses set before it can be programmed with the DigiSpark software.  This was accomplished using a full Arduino device acting as an ISP programmer.  Using the ArduinoISP sketch and circuit, the Attiny85 is first loaded with the micronucleus firmware.  For example:

avrdude -C"C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf" -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -U flash:w:C:\temp\micronucleus-1.11.hex:i

Then the fuses are set...

avrdude -C"C:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf" -v -pattiny85 -cstk500v1 -P\\.\COM4 -b19200 -U lfuse:w:0xf1:m -U hfuse:w:0xdf:m -U efuse:w:0xfe:m

Note that in the case of the ELF Tags, I do not disable the RESET pin.

Once the bootloader is loaded and the fuses are set, the chip is ready to be installed on the ELF Tag.  From that point, it can be programmed using the DigiSpark version of the Arduino IDE.

The final step in the software setup is the installation of the customized LostAndFound.ino sketch that is compiled and loaded by the Arduino software.

The most recent version of this sketch can be found here...


Once this sketch is loaded, the device is ready to go.

Saturday, July 5, 2014

ELF Tag Project Complete

Well, within a couple of hours of receiving the parts today, I was able to finish all twelve ELF Tags that I had started earlier this week.

So I am ready for Monday!  I printed a small card with each tag, explaining what it was and how to change it.

It redirects everyone to a shared document linked here.  I know the re-programming is a bit technical... but we are IT after all.  Anyway, I'm sure enough people will know how to do it, so they can help those who may not.

Anyway, this project is completed.  I'm happy with the result.  I would like to note that even though I spent about two hours on each tag, all I would need to do is look at the name and the time seemed all of a sudden worth the effort.  You know what I mean?

Friday, July 4, 2014

Happy Fourth of July

I have not had much news lately.  I am waiting for parts to put together ELF Tags for each of my co-workers.  I have managed to work through the tough parts of the build and have put together all of the boards partially.





All I am waiting for are the 3.6V Zener diodes and the Attiny85 chips.  They should arrive tomorrow, so I think I will be able to bring the finished tags in on Monday.

In the meantime, I did receive my buzzers and surprisingly... my order for 100 USB Mini connectors.  Here is what 100 USB connectors look like...



I have already tested the footprint I created in KiCAD and it was a perfect (but tight) fit.  The connections were clean though and the soldering was fairly easy.  So, I am happy with these little connectors.


It just amazes me that I was able to get 100 for under $4 dollars.  Even though I would probably never use 100, at 4 cents a piece compared to $1.15 it is a no-brainer.  The same with the buzzers.  The buzzers turned out to be of excellent quality.


They all seem to be working and are loud and clear.  Another win for Aliexpress.

Here is my first use of the through hole version of the mini USB connector.


It will be the smallest device I have made... and probably will make.  It manages to beat the ELF Tag by virtue of the connector.


You'll notice it is waiting on parts as well.  Oh well.  Some of it should arrive tomorrow as I said.  I actually have a second order coming afterward that has even more chips... and sockets.  I ran out of sockets as you can see.

And now I am close to running out of 68ohm resistors.  Whoooh.  I guess I will be making a THIRD order to Tayda for resistors.  I have 6 pairs left.  Maybe that will be enough for a while. Maybe.

Monday, June 30, 2014

This Must Be A Record (For Me)

Let me see what happens when I paste from Google Docs...


PartSourceQuantityPriceTotal
ELF TagATtiny85Tayda1$1.15$1.15
DIP SocketTayda1$0.12$0.12
Zener Diode 3.6VTayda2$0.04$0.08
Resistor 68ohmTayda2$0.01$0.02
Resistor 1.5KohmTayda1$0.01$0.01
TOTAL PER$1.38

Well that looks ok in the editor.  It's obviously the parts cost list of the Lost and Found Fidget that I have just re-dubbed... the ELF Tag for "Electronic Lost & Found Tag".

Obviously these are not expensive in any sense except of course for the labor.


Sunday, June 29, 2014

Sunday is Funday

Well I have started working on the PCBs for all of the Lost & Found Fidgets I am planning to make...



As such, I am getting good at making the boards.  These three are waiting for some components I should get later this week.  I have added everything that I do have, so that they will be quick to finish when the parts arrive.  The question is how many of these can I get made before then.  Here are the steps I have to perform for each one...


  1. Cut out the front and back print outs (5 min)
  2. Polish the blank PCB that has already been cut to size and clean (5 min)
  3. Iron the front and back patterns to the PCB (15 min)
  4. Soak in water, scrub to remove paper residue (15 min)
  5. Etch (30 min)
  6. Scrub excess toner away (5 min)
  7. Drill, grind and smooth (20 min)
  8. Solder components (20 min)
  9. Clean and dry (5 min)
Total Time: 2 hours (per board)

For the next set of boards, I am going to try using the White Vinegar, Hydrogen Peroxide and Salt solution to etch the boards.  The bottle of Ferric Chloride I purchased from Radio Shack some time ago is about depleted.  It has taken on a nasty greenish tint, but actually still seems effective at etching.  I am just anticipating the move to a "cleaner" etchant because it is cheap and not as toxic.


The Trials of Toner Transfer

I decided to do a couple of boards this evening and had trouble with one of them (again) in the toner transfer step.  In both cases, the toner was not totally transferred and I had to start over. Very frustrating.

It seems I had not ironed the pattern well enough so next time I will have to make sure I do a more thorough job.  Perhaps I will go out tomorrow and get that laminater after all.

On the software side, I have been working on some sort of "light alarm" sketch.  I want to utilize the features of the Sound-Sensor board which means something that uses...

  • 2 Buttons
  • 1 Buzzer/Sounder
  • 1 Light-Dependent Resistor
  • 1 Thermistor
or at least a couple of the i/o.  

So far all I have is an alarm sketch that will trigger if the light changes from a specific setpoint.  To set the setpoint, just click the inner button.  This has the double action of clearing the alarm condition and silencing the buzzing.  It works pretty well, so I will probably keep this version.

What I will work on next is a "delayed" setpoint sketch that will wait... say ten seconds before taking the "sample" light level.  This way the device can be "armed", placed in a closed container and used as an entry alarm.  You could place it in a cabinet or a drawer and sound an alarm if it is opened.

I need to try and imagine some more sketches to use the board.  I should probably work on seeing if I can calculate the actual temperature from the thermistor.  That way I could build a "comfort" alarm that could use real values such as 72-76 degrees.

Ahh I should sleep soon.  Maybe I will dream of something!  

Saturday, June 28, 2014

Weekend News

Here are some updates from this weekend so far...

I was able to figure out the problem with my Sensor Board and it was something really simple.  It seems the trimmed leads at the bottom of the sensor board were touching the tops of the pin selection headers of the Sound board.  Once I trimmed them a little more, the sensor board began reporting consistently.  Problem solved.

I finished the Lost & Found Fidget for Seth today.  I had run out of 3.6V Zener diodes, so I was waiting for my new order from Tayda to arrive.  But I found a pair that I had removed from an earlier board and they worked great.  So that leaves around 12 copies left to make for my co-workers.  I have most of the boards cut and the patterns printed, so I will begin transferring patterns en masse at some point.  I should do this so that I can etch multiple boards at a time.

One thought I had was to purchase a laminating machine for transferring the pattern to the copper-clad.  Right now I use a small iron and it does takes some time for each board.  Especially these double-sided boards.  I may look at a cheap one ($30) from an office supply outfit, to see if it is worth the purchase.

Thursday, June 26, 2014

Cleaning Out The Closet

Well for a change, I am going to have a crack at this at a decent hour.  Maybe my thoughts will be more clear (ha ha).


Versions
Anyway, the first item I wanted to bring up is... what I am doing with all of these "iterations" I am going through of this thing I am calling a "fidget".  Well the best I can explain it I like the process of an "iteration".  It involves building the schematic and laying out the circuit in the CAD software.  Then I get to build the object I imagined.  I enjoy the steps I have to go through to make the device.  I prefer a more evolutionary style of gradually changing the form and function... and because I can leverage previous successes to increase the likelihood of the new device working.  

I guess I find it frustrating when electronics do not work the way you want them... it's sometimes hard to figure out why and that makes me feel a loss of control.  Something I am not comfortable with.  But when I build something, because is not much different than what I have built before, it usually works.

From another angle, I am also testing different configurations so that I can evaluate a device that I could build to give away as gifts to friends, co-workers, etc...  So there is some reason for all the different forms I have tried.

And it has all come down to this...

Original Fidget Device




    • Set of 5 boards
      • Base Board
      • Comm Board
      • POV Board
      • RGB Button Board
      • Sensor Sound Board
    • 9v battery and connector
    • DVD with software
I have given two set away so far... to James Rowe and Carlos Beltran... and I have a third set ready to go to James Sorensen out in Utah.  I am still not sure what to do with the fourth and last set.

Fidget Experimental Set


    • Set of 8+ boards
    • Three passthrough boards
    • Four top boards
This is my personal experimental set.  I have an extra set that I could give to my father.  I don't think he would find the Original that compelling.

Fidget Lost & Found Fob



This is the last revision that has removed ALL extra features.
    • Minimal components
    • Built-In USB Male connector
    • One essential function
This is the final version that I have come up with in the last few days.  It is essentially an electronic lost and found tag.  You plug it into a computer and it starts up notepad and begins typing out a pre-defined message.  I think it will be my best choice for the rest of my co-workers that did not already get something. Maybe.

Sensor Board Troubles
As I have been experimenting with the thermistor and LDR I have noticed some anomalies with the values that I am reading.  What seems to be happening is that using the two analog inputs A0 and A1 does not give accurate values for either when both are read.  If only one is read then the values come out as expected.  Why is this?

I have tested this on my ATmega328 (Arduino) and it works as expected.  So I do not know what is going on.  There are some hints on the interwebs but nothing that has solved my problem.

The next step will be to test the two other analog inputs... with the only problem being...I cannot get the analog values anymore via the DigiUSB library... because they need those pins.  So I will have to devise some sketches that can indicate the values some other way.  One possibility is with LED lights... such as the Charlieplex shield that I have.
Probably the most fun solution will be via serial communications to an LCD screen.

Anyway, until I can figure some things out, the sensor will have very little to show in the way of sketches.  But I will work on getting some ideas up and running...
  • Drawer/Cabinet Alarm
  • Temperature Alert
  • Light Organ

Chalieplexing Success
On a final note, I was able to decipher the charlieplexing sequence and reliably control six LEDs from three data lines.  I was able to make this neat little die roller, using the button board.  I used the library found here.





Wednesday, June 25, 2014

The Daily Report

Only a few more minutes to get this report in...  :-)

Well I finished the fidget for Lisa and here it is...



I am pretty sure this would be the way I would go for the rest of the crew.  The only thing that bothers me is the USB connector.  While on one hand, it is very convenient, on the other it is rather "unprofessional".  I have seen through-hole, right angle USB A male connectors available on Aliexpress, but the do not seem common.  Although if the intent is occasional use then the connector is quite appropriate.

Monday, June 23, 2014

Weekend Update

I was able to get a lot done this weekend... and probably did not sleep enough.

I burned four small DVDs with the Fidget software.  That should be enough copies for the sets I am giving away.  The question is... how many sets and I going to make and give away?  As I consider my friends and co-workers that I believe would enjoy such a gift, one name comes to mind.  Matt maybe... he seems to have wide interests.

I was also able to complete all the boards I had etched earlier.  That gives me two complete OSI sets, a complete Fidget set and some extra boards.  I should focus now on developing apps for the boards.

Finally, I constructed the key chain version of the clone.  I guess it is no longer a clone of anything anymore.  Here it is...



 It is a small board and has very little in the way of components... but is very versatile.  This first one I made for a co-worker and I think it turned out well.  I had to use double-sided copper-clad to get the traces for the USB connector.  Otherwise, the components would have to face down.  I was originally worried about alignment of the wire vias between the front USB pads and the back side copper.  Fortunately, this worked out pretty well by pre-cutting the PCB and using the edge lines as cutting guides.

The only problem I have is that of labor.  It took a good chunk of the day for the build and that is too long for some 17 odd copies that I need.

Sunday, June 22, 2014

Late Nights

Well its late again and now is when I think to post.  The problem is that I am so tired by now the posts become rather lame.  I have to type this on a little bluetooth keyboard which is not terrible... but not the best for long fits of writing.

I will try to do a decent job this evening (or morning) so that the post would be worth reading.  Not that anyone would.

First news is that for my birthday I received an awesome drill press tool for my new Dremel!  It makes drilling the boards go much faster... and the quality of the work is much better.  The only thing I need more of are the recycled carbide drill bits.  I looked for them at harbor freight but was unable to find any. And now, I just encountered a time suck at ebay.com.  I think I will order from there, but will have to first check what sizes I need.  I know of at least three I will need to check.


  • Resistor leads (thinnest)
  • LED leads (medium)
  • Header Pins (largest)

I will see if I can identify these sizes based on what I have left.  Then I will search ebay again... although I liked the stuff drillman1 had.

Second item... I was able to get several boards done and even have two more sensor-sound boards left to drill and assemble later.  I will have an extra set that I can give to someone at work.  I also have the two extra boards ready for James and Carlos.  I should give them disks at that time as well.  So that is what I need to do today... burn four copies of the Fidget software.

Third item.  I am strongly considering making "bare-bones" type device that goes on a keychain.  It would basically cost less than $2 and would be personalized in the etching process.  That would be something I could actually accomplish. I could load an informational message that included a link to a zip with everything on it... including instructions on how to change the message.

So that is all for now.  I will post in several hours.

Friday, June 20, 2014

Keychain Version

Here is a real quick post of my keychain version.  It has a nifty little program that, when plugged into a Windows computer, it will start notepad and begin typing out a pre-defined message.