Close

Episode 3 - where we talk about Arduino boards, fixpoint math, and I2C.

A project log for Wendy

Wendy is a UV laser projector for alt photographic process printing

pierre-loup-mPierre-Loup M. 03/06/2019 at 16:250 Comments

After having changed the serial protocol for a much faster iteration, other problems arose, as I said.
It quickly appeared, once the serial was fast enough for pictures to be reliably sent, that other parts where not. The Arduino Uno, for instance. It quickly became obvious that it lacks the speed to compute trajectories from coordinates received (here we can mention Bresenham interpolation, which was implemented ont the Uno). A first step to speed-up computations has been to use fixpoint math, which was a big plus. But this was not enough.

So the Arduino Uno option was cancelled, and an Arduino Due used instead. The Arduino Due was fast enough, but... It then appears than the I2C speed was another problem, and the DAC was controlled by I2C. It simply can't go fast enough to stand the speed needed for laser scanning. It also appears that the DAC used was not reliable enough. Same input values could lead to slightly different output values. And it's a real problem when a one-bit difference is visible on the final picture...

So the DAC was put aside. And Arduino where put aside too, because... Serial speed, once more. It was still quite slow, event with the native USB capability of the Due. I've learn later than USB communication is reliable using big packets of data, and that sending five bytes at once is a waste, the protocol beeing quite eavy regarding the message size... I'll know it, now.

So it was once again time for new solutions to be searched for.

Discussions