Perceptual chronometer/Digg Button, and PCB success again!

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Perceptual chronometer/Digg Button, and PCB success again!

Post by magician13134 »

Well, I'd been having some troubles making PCBs lately, but after a few hours in my basement for the last few days, I seem to have gotten the touch again. It really, REALLY helped to switch from HP photo paper to Staples Photo Basic. The first thing I etched was a perceptual chronometer I'd been working on. I had made a breadboard version and one on perfboard, but oPossum was nice enough to help me make a layout in Eagle (ok, to do it for me. I know I don't learn that way, but he did such a great job, I'm willing to forgive myself :wink:).

So, what is a perceptual chronometer? It's basically a device that flashes numbers very quickly on an LED matrix or a 7-segment display. The human brain isn't able to make out the numbers since the LEDs forming the number flash, then the LEDs invert (the ones that were on go off and vice-versa) too quickly to make out what they are. Then, during a life-threatening or adrenaline filled situation, if the brain is able to "slow down time", you can read the numbers. Here's the original study:
http://youtube.com/watch?v=RjlpamhrId8

It looked really cool, so I threw one together on breadboard:
http://www.youtube.com/watch?v=xqm1yBLHDWA

That one is lacking in the features that I now have, though. The newer ones can change the delay speed and generate a new number if the button is held for 2 seconds. The second model I built was my first shot at using perfboarf. It turned out well, but I had to use gobs of hot-glue to make sure it stayed:
Image
Image (Looks like a 34?)
Image


Then today I etched up a PCB for it, and it looks great (except for one tiny little trace I'll need to cut that didn't etch). The pins are attached to the ATtiny2313 in a different order, so once I get it soldered and have the pins re-assigned, I'll upload the schematics, board files and source code for those interested.
Image
Image
Last edited by magician13134 on Tue Jun 10, 2008 9:12 pm, edited 1 time in total.

koolkat
 
Posts: 358
Joined: Tue May 06, 2008 8:42 pm

Post by koolkat »

thats real cool...

you wouldnt by any chance have a schematic or the firmware?...i am interested in building one :)

thanks

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Post by Franklin97355 »

Then, during a life-threatening or adrenaline filled situation, if the brain is able to "slow down time", you can read the numbers.
So you can tell how long it takes to get from the 43rd floor to the street?

:twisted:

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

franklin97355 wrote:So you can tell how long it takes to get from the 43rd floor to the street?
:twisted:
Hopefully you have a net ;)

@KoolKat - Well, the firmware needs a bit of tweaking since the way I laid it out originally was a bit of a mess :oops:
I didn't expect to build this for a day or two, but I was bored, so check this out:
Image
(Ahhh! A much better picture, click for full)
It just needs a power supply, but I tested it and it works. I don't have any more battery holders though >.<

Eagle 5.0 files (Many, MANY thanks to oPossum for this layout!)
You will need Eagle 5 for these, so here's an image for those of you without that:
Image
(300dpi)
You may want to slightly thicken that line in the bottom right that's about 1 degrees off of vertical. :o

[EDIT]
Firmware time!
Firmware

I recommend reading the comments at the beginning of the code, they explain everything. Heck, I'll just repost those here:

Code: Select all

/*
 Perceptual Chronometer v.1
 Written by Ben Perkins on June 3rd, 2008
 With help from Donald P. Z.
 And www.ladyada.net forums
 Written for the ATtiny2313
 Distributed as public domain
*/

/*
Attach two seven-segment LEDs as shown
IE:
	D4: PORTD = 0x4 
	B40: PORTB = 0x40
	Etc.
     ________                           ________
    |   ^    |                         |   ^    |
    |   B4   |                         |   D2   |
    |        |                         |        |
 B2>|________|< D8                  A2>|________|< B40
    |   ^    |                         |   ^    |
    |  D10   |                         |   B20  |
    |        |        ...              |        |        ...
 B1>|________|< B8    ... < D4     B10>|________|< B80   ... < D1
        ^                                  ^
       D20                                 A1    

What IS a perceptual chronometer?
http://youtube.com/watch?v=RjlpamhrId8

How to make:
Simply follow the circuit diagram found here:
http://www.magicsoftinc.com/hardware/Perceptual_Chronometer/Perceptual_Chronometer.zip	(Eagle 5.0 files)
Or download a PNG here:
http://www.magicsoftinc.com/hardware/Perceptual_Chronometer/Perceptual_Chronometer.png (300dpi!!!!!!)
Did I mention that the PNG is 300dpi? It is! (In Photoshop, under 'Edit' > 'Image Size' choose 300!)

How to use:
I suggest using a battery case with a switch since there is no power function built it
Turn on power
Press the button quickly (not TOO quickly, not like a double click of a mouse) to change the speed
Each number represents an approximate delay in mS between each flash
A speed of 10 will pause the display
Hold the button for two seconds to generate a new number
After holding for 2 seconds, as soon as the LEDs all flash quickly, let go and choose your speed

If you are modifying this code, you will get many warnings when compiling. Some are because it is trying to write to a MiniPOV, just ignore that
Heck, ignore ALL the errors, if I knew what a function prototype was (Ok, if I knew how to write one (Ok, if I wasn't lazy)) you wouldn't get those
They don't affect the program though
*/
[EDIT 2]
Image


Image

An untested version with an onboard coincell holder, 2 2016 or 1 2032, I'll test that later this week

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

Ok, thanks to a bit more help from oPossum, we have a version three. This has four digits and will have to use some multiplexing coding skills, which I'll work out once my mailman delivers my new circuit boards (blank ones that is).
Well, my copper clad boards didn't come today, but I tweaked it a bit, and am planning to mod the digg button code to work on this. That way we can properly fit "dugg" and count up to 9999 and make even cooler animations.
Image
Last edited by magician13134 on Tue Jun 10, 2008 9:20 pm, edited 1 time in total.

koolkat
 
Posts: 358
Joined: Tue May 06, 2008 8:42 pm

Post by koolkat »

are you doing this for a school project?or just messing around with electronics? :)


EDIT: i just remembered that schools out :oops:

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

Yeah, school's out, and our school NEVER does anything fun like this. Once a year we have our Science/Engineering fair... But you have to work in partners and no one else in our school like to do this stuff. That bugs me. 100 kids in our physics class, only one that like to do electronics outside of school.

But yeah, I just find this really fun and exciting (is that bad?). Plus I'm still learning, so making projects like this helps me learn so hopefully one day I'll be as cool as Ladyada herself :P If that's even possible

koolkat
 
Posts: 358
Joined: Tue May 06, 2008 8:42 pm

Post by koolkat »

thats just like my school...im the only one 8)

I remeber when i brought the tvbgone to school...they were all so amazed(even the ladies :wink: )

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

koolkat wrote:thats just like my school...im the only one 8)

I remeber when i brought the tvbgone to school...they were all so amazed(even the ladies :wink: )
Yup, everyone is amazed, but no one wants to actually make stuff though. It's a shame. Every the principal (who's usually a jerk >.<) was impressed with my TV-B-Gone, granted I wasn't using it to reek havoc, but it was weird to hear him... so... not mean.

koolkat
 
Posts: 358
Joined: Tue May 06, 2008 8:42 pm

Post by koolkat »

we have tv's in every room....so i went down the hall way between classes turning on tv's...man that was fun :)

RealRitzcracker
 
Posts: 140
Joined: Fri Apr 25, 2008 9:56 pm

Post by RealRitzcracker »

CONGRATS ON BEING ON HACKADAY.COM !!!!

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

Oh! Cool! I didn't expect that! Now I REALLY need the mailman to bring my PCBs (which I notice, JUST shipped today!)

koolkat
 
Posts: 358
Joined: Tue May 06, 2008 8:42 pm

Post by koolkat »

how are you gonna test it on people?

magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »


magician13134
 
Posts: 1119
Joined: Wed Jun 13, 2007 9:17 am

Post by magician13134 »

Ok, I finally finished up the source code for scrolling a message with all four displays, but I've run into a problem. I'm powering by USB, so it's nice and bright... Kind of. Let me explain just a bit about how it works first. There are four 7-segments 1 and 3 are grounded (common cathode) by a common point, 2 and 4 by a common point. The anodes of 1 and 2 are the same, as well as the anodes for 3 and 4. So my firmware flashes the 1st and 3rd display, then the 2nd and 4th display 5000 time before scrolling the message, this gives about a 150mS delay (total guesswork). So that's 1 and 3 on, 2 and 4 on, 1 and 3 on, etc, etc forever. That should mean that they should all be equally bright, right? Well, they are... They get increasing darker as they go toward the left. 1 is dimmer than 2 is dimmer than 3 is dimmer than 4... Seeing as there's only two on at a time, I don't understand why this be, if they were all on at the same time, this may make sense, but they aren't...

Here's the complete firmware and schematic design. I really need to figure out what's going on before ordering these board professionally... Anyone have any clue at all what could cause this?

magicsoftinc.com/full/hardware/Perceptual Chronometer/schematic.bmp
magicsoftinc.com/full/hardware/Perceptual Chronometer/board.bmp
magicsoftinc.com/full/hardware/Perceptual Chronometer/test.c

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”