Shop OBEX P1 Docs P2 Docs Learn Events
Poor Man's BS1 Slow Scan Camera — Parallax Forums

Poor Man's BS1 Slow Scan Camera

ercoerco Posts: 20,256
edited 2010-10-10 13:54 in BASIC Stamp
Just got the first results from my homemade minimalist BS1 Camera. It manually scans an image with 2 servos doing a painfully slow XY scan of a phototransistor in a black tube. The ptx is in a voltage divider arrangement with a carefully-adjusted 100K pot to yield voltages near the Stamp's 1.4V low/high transition voltage, so the simple software just sees black or white, and indicates high/low on a status LED for adjustment. Of course the BS1 memory is too small to hold the image (heck, a tiny program barely fits in there) so I use the DEBUG screen to display the image. The attached screen shot shows my debug screen displaying a scan of the big black X shown in the setup. Outlying points show up dark since the angle gets big around the edges.

Clearly there is room for improvement; the pot adjustment is quite sensitive, and even lighting is critical for even modest results. Using the POT command or a BS2 and a lens would all be steps in the right direction. But this shows my BASIC idea using just a handful of parts: a BS1 project board, 2 servos, a phototransistor, a pot and an LED. Neither hi-res nor incredibly useful, but it shows what this country boy can do when I come up with another hair-brained poor man's concept.
980 x 735 - 110K
980 x 735 - 96K
1280 x 800 - 101K

Comments

  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-02 19:31
    That is cool Erco....I really like the idea and i have been thinking about doing something similar with a prop.
  • AmaralAmaral Posts: 176
    edited 2010-10-03 12:45
    Amazing simple and functional !
    Erco, how long you've been playing with BS1 ?

    Amaral
  • logan996logan996 Posts: 281
    edited 2010-10-03 17:13
    i dont know how this works but it looks cool!
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-10-04 00:37
    Erco, that's really a cool project. Next I think you will add gray scale. BTW, this can make a flat bed scanner. Just add a lens in front of the photo sensor and focus it.
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-10-04 07:25
    It only uses one photo-transistor?!? Wow, about how long does it take to do a scan?
  • ercoerco Posts: 20,256
    edited 2010-10-04 08:49
    Over a minute. HOLD THAT POSE! DON'T MOVE!

    What makes it even slower is that I goofed when I used a digital servo. My first time, I just grabbed it out my overflowing servo drawer. I THOUGHT it would behave just like an analog servo, and it did in some early testing. So I built my rig and wrote the code like pulsout servo x, pulsout servo y, test pin hi/lo, debug output, repeat. But that BS1 DEBUG delay is apparently MUCH longer than the 20 ms servo pause. The digital servo just stops responding, some kinda timeout. So I had to add loops to send 3 consecutive pulsouts to each servo before the Debug statement. That slows down the whole process.

    Live & learn!
  • HumanoidoHumanoido Posts: 5,770
    edited 2010-10-10 05:36
    erco wrote: »
    Over a minute. HOLD THAT POSE! DON'T MOVE! What makes it even slower is that I goofed when I used a digital servo. My first time, I just grabbed it out my overflowing servo drawer. I THOUGHT it would behave just like an analog servo, and it did in some early testing. So I built my rig and wrote the code like pulsout servo x, pulsout servo y, test pin hi/lo, debug output, repeat. But that BS1 DEBUG delay is apparently MUCH longer than the 20 ms servo pause. The digital servo just stops responding, some kinda timeout. So I had to add loops to send 3 consecutive pulsouts to each servo before the Debug statement. That slows down the whole process. Live & learn!
    Erco, sounds like an 1800's camera and lots of fun. Will your twins hold still over a minute?
  • ercoerco Posts: 20,256
    edited 2010-10-10 13:54
    No one in my family (including me) can sit still for more than 5 consecutive seconds. I better upgrade this cam to a Propeller!

    Yeah, it's not a real practical application, just fun to try; I just like to maximize my bang for the buck. The BS1 is still plenty good for many apps!
Sign In or Register to comment.