Shop OBEX P1 Docs P2 Docs Learn Events
Propeller-driven laser scanner — Parallax Forums

Propeller-driven laser scanner

scanlimescanlime Posts: 106
edited 2008-07-08 23:20 in Propeller 1
I just wrote a blog entry introducing my latest Propeller hobby project. It might be interesting to some of the folks here..

It's a laser scanner (think Pink Floyd at the planetarium) built using only a Propeller, two hard disk voice coils, and a few common ICs:

scanwidget.livejournal.com/29342.html

The blog post has high-level information about the project, and some pictures of the mechanical parts and the control board. The heart of the projector is a digital PID control loop for each axis. The output is PWM for an H-bridge chip, the feedback input comes from a light-to-frequency chip. The Propeller has a handful of fairly interesting/useful chunks of code:
  • The Bluetooth interface uses a fairly generic shared-memory-over-serial protocol designed for high latency full-duplex links.
  • The PID control loop and motor PWM is implemented by one cog per axis. This mostly involves doing multiplies about as fast as the Prop can, and timing output pulses using CTRA smile.gif
  • Vector graphics are interpolated on the Prop by a simple virtual machine, with first-order and second-order accumulators, and a jump instruction.
It manages to keep all 8 cogs pretty busy. For each axis, it uses one cog for the servo loop and one cog to sample the position sensor. Then there's one cog for the vector graphics VM, one for the Bluetooth link, the OneWire cog, and a supervisor cog which monitors key values and halts the world if anything is going wrong.

Source code is in a Subversion respository, released under the MIT license. I haven't gone too far out of my way to make the objects fully general, since my first priority is performance, but there may be some reusable code:

svn.navi.cx/misc/trunk/laserprop/

Comments

  • Graham StablerGraham Stabler Posts: 2,507
    edited 2008-07-08 10:40
    Propeller controlled galvos, cool!

    This is something I had considered when I got the prop, especially as I have a 50W CO2 laser.

    Thanks for sharing. Have you considered making some galvos as others have done?

    Cheers,

    Graham
  • scanlimescanlime Posts: 106
    edited 2008-07-08 16:58
    Graham, thanks!

    I've certainly considered building my own galvos. I could certainly get better torque to weight ratios [noparse];)[/noparse]

    Still, part of me loves the idea of using only readily available 'hacked' mechanical parts. If PCBs were readily available, this would be a project that anyone with basic mechanical skills could put together in a weekend.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2008-07-08 23:20
    I hear you on that one. There are many examples of awesome projects on the web that are so expertly done it would take several years to build up the workshop required before you could begin to emulate it. If nothing else it is nice to have a simple implementation that can be improved upon rather than having nothing for a long time.

    Cheers,

    Graham
Sign In or Register to comment.