Shop OBEX P1 Docs P2 Docs Learn Events
Handheld Persistence-of-Vision Graphics & Text -- in an Altoids Tin — Parallax Forums

Handheld Persistence-of-Vision Graphics & Text -- in an Altoids Tin

ZootZoot Posts: 2,227
edited 2012-11-28 08:50 in Robotics
Here's a quick SX project I put together in an evening a few weeks ago. Shoot, it took longer to figure out how to draw the schematic in Eagle, than to build.

Note that this is *not* my idea -- I saw a photo at MakeZine.com -- but the implementation and code is 100% my own.

Uses an SX (no resonator) and 7 LEDs. Push the button, wave it back and forth rapidly -- text and graphics appear in mid-air.

A few comments:

- the RCTIME circuit was used to tune the speed of the "columns". You could eliminate these components and hard code some value between 1900us and 2500us and it will be probably be fine for the average person. I just didn't want to have to reprogram with my SX-Key to tune

- I use an alligator clip to jumper the pins of the pushbutton when I need to program (to keep the power on while an SX-Key is connected)

- there are 32 message slots -- 16 are straight hard coded bitmaps, 16 are text strings of any length. The text strings are mapped to ASCII character bitmaps with one extra trick -- the engine will look for a break in the text string (a space character) after a set number of characters, and show JUST THAT PORTION of the string for 4 seconds or so, then it moves on to the next portion of the string. Why? We found that most people will comfortably display 12-18 characters on an arm swing -- so strings longer than that were not legible (you'll never see the whole thing on one right-reading swing of your arm). We didn't want to be limited to such short text messages, so there you go.

- messages are shown randomly with no repeats till all messages have been shown

- I used my own web-page page utility to generate bitmaps and such. You can try out that utility here: 1uffakind.com/robots/povBitMapBuilder.php

- Code, schematic, photos attached.

28 Nov 2012 -- I've uploaded photos of a latest iteration, along with photos of the POV in action.The newer iterations are functionally equivalent to the first version, EXCEPT that the RC circuit for adjusting the speed with a pot has been eliminated, and I run the SX directly from 2 AAA batteries rather than building a power supply.

We've been working on a (non-accelerometer-based) sensor for detecting end points of the arm wave, but results have not yet been good enough to put into play.
780 x 716 - 109K
1024 x 768 - 102K
960 x 1280 - 226K
1024 x 768 - 99K
1024 x 768 - 50K
1024 x 768 - 40K
1024 x 768 - 46K

Comments

  • BeanBean Posts: 8,129
    edited 2008-01-21 23:07
    Zoot,
    How does the circuit get syncronized to you arm ?
    Does it just happen naturally when you are moving it and seeing the message ?

    Just wondering because I though I would see some kind of sensor in the schematic.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • ZootZoot Posts: 2,227
    edited 2008-01-21 23:26
    It doesn't. In fact, after seeing the sample at MakeZine.com, I read up -- basically when your arm is swinging back, the text will be backwards (mirror image) half the time. It doesn't *look* as bad as that sounds, though, because apparently your brain just compensates and half-ignores the "noise". In truth, it's pretty arresting -- even backwards. Certainly things like repeating graphics (stars, smileys, etc.) look much better. And short, short phrases are easier to read on the text end (think text messaging).

    My thought is an accelerometer (even a mechanical one) would be perfect for this though -- the "edge" when you change direction would be very sharp -- you're basically slamming the platform in the opposite direction. The problem there is it jacks up cost and complexity from a $5, one-evening project, to something more elaborate and expensive. We tossed around some cheap ideas -- like a small piece of metal (or something with similar inertia) in a slot with two holes -- put two IR phototransistors in the holes, and as the metal gets slammed back and forth, you'd know which direction you'd just *changed*. Or maybe even something like wirewrap soldered to the metal slug and two contacts on either end of the slot (again, all that matters when you change direction, and that will be serious Gs, I would think).

    Following that, we realized that if you precisely time the duration between direction changes (easy to do -- there's plenty of SX time between direction changes), you could then treat the "width", i.e. time, between arm swings as the "width" of a virtual scrolling display (basically if someone swings their arm wider or shorter on each swing, they are narrowing or widening the "sliding window" on the virtual display. Then you could do stable text, scrolling etc.

    But knocking these out quick is a serious crowd pleaser. The kids love 'em and they're so cheap that you don't mind if it gets banged up. And the adults just can't wrap their heads around how it works.

    If I had to do anything different on the next series it would be some PWM (fade graphics in and out) and I would probably use two AAA batteries and bail on using a regulator or any brownout detection.

    Last comment -- if you've got an audience -- YOU can't see it (you're behind the LEDs and the tin)... and man, your arm can get tired....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php


    Post Edited (Zoot) : 1/21/2008 11:39:44 PM GMT
  • ZootZoot Posts: 2,227
    edited 2008-01-21 23:32
    Here's the link to the "cool electronics in Altoids tins" page at MakeZine: blog.makezine.com/archive/altoids_and_tin_cases/

    Here's the photo that inspired me (I was so enthused when I saw the photo that I went into the shop and built it before reading about it): blog.makezine.com/archive/2007/11/mintypov.html

    I turned mine sideways and added the pushbutton power switch, which seems to fit the hand much better and you can hit the button with your thumb.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php


    Post Edited (Zoot) : 1/21/2008 11:40:04 PM GMT
  • BeanBean Posts: 8,129
    edited 2008-01-22 14:01
    How about something simple like:



    * = Weight (Blob of solder)
    | = Guitar wire
    o = Header post
     
     
     
         *
       0 | 0
         |
         0
     
     
    

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.iElectronicDesigns.com

    ·
  • ZootZoot Posts: 2,227
    edited 2008-01-22 17:12
    Bean -- that is *very good*. I like that.

    My only thought is that the firmware might need to perform a kind of debounce when an edge is detected -- not really a debounce, per se, but more like having the firmware disallow the opposing edge to be detected unless maybe 1ms or so has passed since the previous edge was detected -- this would help if the wire/blob bounces *back* to the opposite header pin after hitting one side. Might also help obviate edge detection errors as the wire wears down and changes over time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • Dennis FerronDennis Ferron Posts: 480
    edited 2008-01-27 07:50
    How ironic! A while ago I built a board with an accelerometer, Basic Stamp, and 10 LED's. It went on a pinewood derby car: the LED's were just running lights that the Stamp changed in response to G forces on the accelerometer. Ever since the race was over I've been unwilling to cannibalize such a nice, tightly put together board, but I couldn't figure out any other use for it. After reading this thread, I realize I have the hardware for that persistence of vision + accelerometer project already built, and I didn't know it! All I need is to update the software and - voila.
  • MikeSMikeS Posts: 131
    edited 2009-01-19 15:47
    Hi Zoot,
    Your POV project is a great one. I have prototyped it on a SX_TECH board before I assemble it in the Altoids Tin. In your program messages are shown randomly with no repeats till all messages have been shown. I want to display only one message repeatedly. I substituted a message number, for example 16"I LOVE YOU", in place of the RAND statement.

    Pick_Message: ' get random msg
    msg = 16

    The program does display "I LOVE YOU" but only once. My question is how can I get the program to display the message repeatedly? I would have thought the GOTO MAIN statement would have brought me back to the beginning of the program to read the message again.

    Thanks,
    MikeS
  • ZootZoot Posts: 2,227
    edited 2009-01-19 16:25
    Glad you like it!

    If you are working from my code, I would just replace all this:

    Pick_Message:                    ' get random msg
      msg = RAND
      msg = msg & %0001_1111
    
      i = msg                     ' create index for flags byte array
      i = i >> 3                  ' 0-3 %0001_1000
      tmpB1 = shown(i)            ' get flags this set of 8 msgs
      tmpB2 = msg & %0000_0111    ' get bit position this msg
      tmpB2 = %1 << tmpB2         ' make a mask 
      ioByte = tmpB2 & tmpB1      ' and it...
      IF ioByte > 0 THEN Pick_Message     ' you did this one already
      tmpB1 = tmpB1 | tmpB2                 ' otherwise, set the bit
      shown(i) = tmpB1                      ' and save
      
      ASM
      BANK shownCnt                         ' inc the count
      INC shownCnt
      BANK 0
      ENDASM
    
      BREAK_NOW
    
      IF msg > LastBitMapIdx THEN           ' but wait, no message here, try again
          IF msg < 16 THEN
             GOTO Pick_Message
          ELSEIF msg > LastTextIdx THEN
             GOTO Pick_Message
          ENDIF
      ENDIF
    
    



    With

    msg = 16
    
    



    And it should display the same message over and over again. You need to nuke all the other stuff in this section ("Pick_Message"), otherwise it will check to see if the one message was displayed (it was) and then drop into an endless loop trying to pick another message.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • UghaUgha Posts: 543
    edited 2009-01-19 16:35
    Hey zoot... thought about something like this:
    http://www.goldmine-elec-products.com/prodinfo.asp?number=G16165
  • ZootZoot Posts: 2,227
    edited 2009-01-19 18:00
    Hey -- that could be perfect.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • MikeSMikeS Posts: 131
    edited 2009-01-19 18:08
    Zoot,

    Thanks for the quick reply. That did the trick!

    MikeS
  • Lab RatLab Rat Posts: 289
    edited 2009-01-19 22:55
    do a drive by display with your car

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax posesses power beyond belief.

    Believe in it.
  • John BondJohn Bond Posts: 369
    edited 2009-02-10 13:32
    Zoot - Thanks for the concept. I had to google Altoids, I suppose the tin you used was in mint condition.

    Bean - The direction switch

    I tried your suggestion of a spring with a weight on it, it works but mine isn't reliable enough. I tried 3 different spring materials and then settled on two nuts as a weight epoxy glued at a very specific point on the chosen spring. Trouble is there is a lot of resonance so the trigger doesn't occur consistently when you expect it. It even occasionally bounces off the opposite contact straight after the one you are expecting. If only you could dampen the motion of the spring.

    On the other hand, I fitted a piezo sounder so the device produces a tick - tock sound. Tick to start moving left and tock to start moving right. That works extremely well. It's also quite a pleasing sound.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • WhitWhit Posts: 4,191
    edited 2009-02-10 14:49
    John Bond said...
    ...·I suppose the tin you used was in mint condition.
    OUCH! That was painful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-02-10 15:25
    John Bond said...
    Zoot - Thanks for the concept. I had to google Altoids, I suppose the tin you used was in mint condition.

    GROAN! I'm sure there is a forum rule against this somewhere... [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • Cole LoganCole Logan Posts: 196
    edited 2009-02-10 16:47
    John Bond said...
    Zoot - Thanks for the concept. I had to google Altoids, I suppose the tin you used was in mint condition.

    Bean - The direction switch

    I tried your suggestion of a spring with a weight on it, it works but mine isn't reliable enough. I tried 3 different spring materials and then settled on two nuts as a weight epoxy glued at a very specific point on the chosen spring. Trouble is there is a lot of resonance so the trigger doesn't occur consistently when you expect it. It even occasionally bounces off the opposite contact straight after the one you are expecting. If only you could dampen the motion of the spring.

    On the other hand, I fitted a piezo sounder so the device produces a tick - tock sound. Tick to start moving left and tock to start moving right. That works extremely well. It's also quite a pleasing sound.

    What about using a rubber band to pull the weights back to center.
  • ZootZoot Posts: 2,227
    edited 2009-02-10 18:14
    I think Bean meant using stiff music wire (like Boe-bot whisker wire only a bit heavier), not a "spring" per se. I have some of the $1.00 tilt switches on order which I'll try out in a few of these later this month.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • John BondJohn Bond Posts: 369
    edited 2009-02-12 09:56
    Sorry Bean - You were right.

    The weight on the end of a piece of spring wire works VERY well, provided you get thin enough wire so you can use a small weight, My 5th experiment finally worked. (For us on the dark continent, thin spring wire is the same as music wire)

    Using the spring wire and weight to trigger the device means the text is always in the same place in space.
    My device is similar to Zoots but with 12 LEDs (8 LEDs on Zoots) and a 12X13 Serif Font (Zoot used 8X5 utility font). The font took me 10 days!!! If you have a 10-character message and you wave it, the image looks like a sign suspended in mid air, eerie. The bigger, more detailed font makes the text very realistic. Text is 36 mm (1.4&#8221[noparse];)[/noparse] high and about 400 mm (15&#8221[noparse];)[/noparse] long

    The bigger font means I can only fit capitals, numbers and some punctuation into the limited SX28 memory. The software has much fewer features is simpler than Zoots, also to conserve memory

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • ZootZoot Posts: 2,227
    edited 2009-02-12 13:45
    Sounds way cool. Can you post as a completed project? Would love to see photos.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • John BondJohn Bond Posts: 369
    edited 2009-02-12 14:16
    Zoot - thanks again for the concept, I'll post photos of my unit on Tuesday.

    Us Africans are extremely superstitious so even though I don't believe in that stuff much (other than breaking mirrors, spilling salt, black cats, new moon through glass etc etc L.O.L.), I use Friday 13 as an excuse to run away to the mountains. I'll be back on Sunday.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • stamptrolstamptrol Posts: 1,731
    edited 2009-02-17 18:46
    Our Association bought a batch of yo-yo's as part as a promo for National Engineering Week.

    The yo-yo's have two leds that light up as it spins. The switch is quite ingenious and might be adaptable to the POV project.

    Basically, picture a single piece of stiff wire sticking up vertically from a piece of perf-board. In the yo-yo, its about 0.5" long.
    A piece of coil spring is mounted so it surrounds the vertical piece of wire. As the yo-yo spins, the spring bends to one side or the other and contacts the the vertical wire closing the circuit.

    stiff wire
    : | :
    : | : <= coil spring
    : | :
    : | :
    _:_|_:__


    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • John BondJohn Bond Posts: 369
    edited 2009-02-25 11:41
    My LEDWriter was taken by a youngster in Bergville. I'm going back that way tomorrow (500 miles - ouch!!!)·and I hope I can get it back.

    In the mean time, attached is a rather poor sketch of the spring and weight.

    Kind regards from the dark continent

    John Bond

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1381 x 1260 - 154K
    pcb.jpg 153.6K
  • logan996logan996 Posts: 281
    edited 2010-03-04 01:06
    John,
    you mean a kid stole it?

    and zoot, how much was the total cost of all this?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When the government is afraid of the people there is liberty, when the people are afraid of the government, there is tryanny"

    · Thomas Jefferson
    ·
  • ZootZoot Posts: 2,227
    edited 2010-03-04 07:08
    Total cost? Not including battery and the Altoids? I dunno, maybe $4. The Altoids tin was given to me. The 9v battery I had lying around, and I have yet to replace it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
  • John BondJohn Bond Posts: 369
    edited 2010-03-06 15:39
    Yes, but I've made half a dozen since. It makes an amazing (SPECIAL) present for children aged between 6 and 20. You program in their names and those of their friends (or soccer teams or whatever...).

    I expect a life of a couple of days but I saw an one that I made in June 2009 being used the other night. I've also fixed two when tearful kids have broken them.

    I use Veroboard and cheap LEDs. The battery holder and 3 penlight AA batteries make up the bulk of the cost. They take three to four hours to make and program.

    People seem to like something made specially for them!

    Great device Zoot!!!

    John Bond
    Kwa Dukuza

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • ZootZoot Posts: 2,227
    edited 2012-11-28 08:50
    Photos in action added.
Sign In or Register to comment.