The low cost DAC modules I ordered online have not arrived and it is getting late in the project, so I had to break down and buy some DACs locally at 10 times the price. Not a happy moment, but the show must go on. These I2C DACs have 12 bit resolution which is higher resolution than the cameras so they can easily handle the positional data. After fiddling around with I2C addressing and software libraries and writing some simple code, the DAC was happily outputting camera position.

Here is a little video showing the camera and DAC in action:

You can see there is significant latency in the system, but it is pretty amazing what can be done with a few lines of Python code on a Raspberry Pi.

After importing libraries and initializing, the whole DAC algorithm is just one line of code.

The DAC is the final subsystem needed to make the PiCassoTizer work.

Already working are:

  • The camera digitization, image processing, finger recognition, angle determination and now DAC output corresponding to the finger position (one Raspberry Pi for each of 2 cameras)
  • Conversion of the finger position signals to X-Y mouse coordinates, generation of absolute USB mouse movement commands (using an arduino pro micro)
  • Creation of a pointer device with debounced mouse buttons (also handled by the arduino pro micro)
  • Host Raspberry Pi (the third Pi) with graphics software to accept external control

So far this has involved a bit of everything - sourcing and ordering parts, some electronic circuit design, some software design, some mechanical design, some mechanical fabrication, some electronic assembly, some programming, plenty of troubleshooting and debugging, lots of blogging and even some art.

Now all the technical bits and pieces have been proven to work - it represents a huge milestone achievement for the project.

There is still a ton of work left to integrate everything into a complete system, adjust everything so the scaling is correct, package the subsystems, use the system to do some art and then blog about it.

Hopefully the PiCassoTizer can be used to help make one or more of the upcoming blogs.

The right cameras still have not even arrived yet and a lot of scaling depends on their field of view.

I am going to have to work on the camera frame anyway - hopefully making the geometry flexible enough to accommodate what the cameras can see.

 

Relevant links:

PiCasso Design Challenge

 

PiCassoTizer - Introduction - blog 1

PiCassoTizer - Electronic Parts - Blog 2

PiCassoTizer - Finger Detection Image Processing - Blog 3

PiCassoTizer - Absolute Mouse Position - HID Simulation - Blog 4

PiCassoTizer - The Snowman Smiles - Blog 5

PiCassoTizer - Pi Expanse - blog 6

PiCassoTizer - The Wand - Blog 7

PiCassoTizer - The DAC - Blog 8