go from bed to snow as fast as he does. Not 30 seconds pass from the warmth of his sheets to the blistery morning cold.
Plotter Trials
I’m getting closer to a very usable plotter, for now the prototype is serving all my plotting needs. Another prototype is in the works, this way I’ll be able to work on a plotter and keep another one for drawing. I keep finding ideas for really cool videos which I’m certain will make splashes online. I want to have my next steps figured out before I try to do just that. I know that at least the plotter build will be documented as a DYI project.
I found my birthday presents for the next 10 years
First trial with paint, I coded for “ink refill” capabilities for all instruments which require it. Obviously I’ve learned a few lessons here 🙂
Raspberry Pi Servo Jitter
Here’s the final solution I came up with to finally get a servo motor to behave on a Pi. It may not seem like much but it took a lot of doing to gather all the right bits. This was tested with an SG90, SG92R, and an MG90S on a Pi Zero.
Scroll straight to the end for the solution.
The most common way for controlling a servo motor on a Pi with is through RPi.GPIO as such:
#!/usr/bin/python3
import RPi.GPIO as GPIO
import time
servo = 23
GPIO.setmode( GPIO.BCM )
GPIO.setup( servo, GPIO.OUT )
# info on frequency and PWM formula at https://rpi.science.uoit.ca/lab/servo/
pwm = GPIO.PWM( servo, 50 )
pwm.start( 2.5 )
print( "0 deg" )
pwm.ChangeDutyCycle( 2.5 ) # turn towards 0 degree
time.sleep( 3 )
print( "90 deg" )
pwm.ChangeDutyCycle( 7.5 ) # turn towards 90 degree
time.sleep( 3 )
print( "180 deg" )
pwm.ChangeDutyCycle( 12.5 ) # turn towards 180 degree
time.sleep( 3 )
pwm.stop()
GPIO.cleanup()
Stuff you might need for this to run:
sudo apt-get update && sudo apt-get install python3-rpi.gpio
It results in super jitter which is unacceptable for the holy mission of pen plotting.
As far as I understand, the jitter comes from the wave form RPi.GPIO produces for Pulse Width Modulation, which is made in software and so it’s not super stable (no dedicated resources to build it). From what I gather, pigpio is programmed to tap into the one hardware PWM that Pis have.
The solution thus is as such:
#!/usr/bin/python3
import RPi.GPIO as GPIO
import pigpio
import time
servo = 23
# more info at http://abyz.me.uk/rpi/pigpio/python.html#set_servo_pulsewidth
pwm = pigpio.pi()
pwm.set_mode(servo, pigpio.OUTPUT)
pwm.set_PWM_frequency( servo, 50 )
print( "0 deg" )
pwm.set_servo_pulsewidth( servo, 500 ) ;
time.sleep( 3 )
print( "90 deg" )
pwm.set_servo_pulsewidth( servo, 1500 ) ;
time.sleep( 3 )
print( "180 deg" )
pwm.set_servo_pulsewidth( servo, 2500 ) ;
time.sleep( 3 )
# turning off servo
pwm.set_PWM_dutycycle( servo, 0 )
pwm.set_PWM_frequency( servo, 0 )
Stuff you might need for this to run:
sudo apt-get update && sudo apt-get install python3-pigpio
sudo pigpiod
And the resulting super smooth motion and holds:
Fibonacci Assist
It’s been a while since I pushed a feature to Mandalagaba worthy of a post.
I just pushed a tool I call “Fibonacci Assist”. It’s meant to help you draw Fibonacci spirals by overlaying the proper framing based on the beginning of your penstroke.
I was reminded of the existence of this sequence and its ties to nature reading the most excellent children book: Swirl by Swirl. The book is simply magnificent and so I thought I’d do my part to help bring into the world more Fibonacci spirals.
I have yet to play with it using a stylus.
Plotting Plotters
Well so, I fell into a very deep rabbit hole. The world of pen plotters… A year in, I finally have some good results. After several prototypes of Gondola plotters (V-plotters) and regular tabletop plotters. I’ve homed in on a set of designs, hardware, electronics, and algorithms to think I can make a small difference in that world. I still need to iterate a little but I’m hoping to release each plotter as a DYI projects in 2020. Maybe I’ll even sell my making them for others. Of course there will be integrations with Mandalagaba because that just makes sense.
Now there are several such plotters one can buy or build for a wide range of prices. And they all have a very shitty software stack. This is where I believe I can make the biggest difference.
As with building houses, it’s enormously relieving to finally see into the real world a model you’ve been immersed in, CADing it for a year.
I’ll skip talking about the long series of challenges I ran into building this. It’s really, really nice to see a long plot finished to perfection knowing that finally, nothing is wrong. I’ve learned a lot along the way.
There’s a bazillion pen plotters on Thingiverse, I’ve used some of them as stepping stones until I was ready to finally make my own top to bottom. As I said, software is where I think I can make the biggest difference. I’m a Raspberry Pi aficionado, and this opens the door to a sophisticated software stack (web servers, HTML canvasses, format conversion, penstroke optimization, live link with Mandalagaba). I found not a single plotter using a Pi, in fact I found very few projects of anything using stepper motors with a Pi. I had to do some serious trail blazing to step a motor reliably.
Here is for example a pen stroke optimization algorithm I developed to speed up plotting.
The base, drawing penstrokes as they come. “Empty” travel going from one penstroke to the next without the pen drawing: ~36437 (relative pixels).
The next penstrokes is the closest. Empty travel ~15820, 0.43 compression ratio.
The next penstrokes is the closest, but consider its beginning as well as its end, draw the penstroke reversed if it was the end which was closest. Empty travel ~12467, 0.34 compression ratio. 
I could watch this for hours, and I did.
Of course the efficacy of this algorithm depends heavily on the model to be drawn. I found that anything coming from Mandalagaba tends to benefit enormously, especially tessellations. And it makes sense, for every penstroke drawn, the repetitions occur throughout the canvas and they show up in that order even if you drew in a very localized area. The example above comes from the most excellent turtletoy.net.
More to come very soon on the great world of plotters…
Done with the Roofers
So far in building, I’ve been happy to contract out roofing to otherwise more capable people with better tools. It’s always notoriously difficult to get contractors to show up, roofers even more. And I get it, no one wants to do their work and so they have even more leverage than most contractors. They don’t care what your building schedule looks like, they only care to have work lined up on their own schedule and will say anything to keep it that way. Their incentive is to keep you waiting so you’re available for them when they have a gap. This year I had it waiting for them and getting strung along, I couldn’t afford it any longer with Winter right around the corner so I went ahead with my usual “screw it, I’ll just do it myself”.
All in all it’s not very difficult but there are a few tricks to pick up, and it is definitely physically hard and fairly dangerous.
I was quoted $2800 for this roof, it ended up costing $1100 and I spent an extra $200 on metal cutting tool I didn’t have, and $250 on climbing gear to be safer and because I want to climb trees for fun. It also “cost” me 2 and a half days of work. I can’t say I’m sad I had to do it myself for the savings and tools I got. The real silver lining though, is that I’ll never have to call a roofer ever again. I now possess the knowledge and the tools. Now that, is a freeing feeling :).
After this, I finally got to proceed with the siding which was long overdue. My dad who is the worst handyman I know (I learned all my swear words watching him with a hammer), came out and helped. I was very apprehensive going in, one of the unspoken worries of homesteading is when people of little manual ability decide they too want to have a homesteading experience and offer their help. He ended up doing really great and helped a lot. Agnes stained a whole bunch of boards, both saved me a lot of time in one day.
I laid shiplap diagonally for strength, we get high winds and this shed has 12′ walls to catch them with. I was ok compromising aesthetics for strength. It turns out it looks really good. We’re very pleased with the result.
I put the roof on right before a big rain, and I sided 1 wall right before a big wind. Right on time, not waiting for the roofers was the right decision, I could have been in trouble if I had: more water ruining the frame, the wind catching in the big sail that is the roof without any structural strength against shearing.
Previously I could hear the building move on little wind gusts, with only 1 wall sided with diagonal boards though, I did not hear a peep during strong gusts. Diagonal is the way :).
I’ll be pushing hard in the next few week ends to close it all up. There is a lot of work left and it really needs to be done before the snow invites itself to Vermont.
There it is, the final outline
I mentioned before the 2 things I enjoy most when building are discovering newly framed windows views, and seeing the outline of a building in the land.
I’ve been taking it at a reasonable pace building this sugarhouse, 4 hours here and there. It’s nice to not build until exhaustion. In some ways I’m slowing down from the frenetic pace of the past few years. I can’t keep working with a barbecue going and 2 kids jumping on the trampoline, signs of how nice life is becoming on our land. Let the good times roll.
Compromise
We acquired a gas powered log splitter. It’s not something that creeped up on us overtime, we never once considered it. In fact we helped a neighbor use one a while back and it very much turned us off. The work was noisy and repetitive.
Then a monstrous maple tree showed up, and even though I bucked it up in short logs to make maul splitting easier, the amount of work it took to get even a crack in it was just too much. We need wood now, and we occasionally get impossible knotted logs, it would be nice to be able to produce larger quantities of wood faster given our increase use with sugaring, and extended stove season much beyond cold weather for cooking and water. All of a sudden it simply made sense, but the decision was hard and I sincerely hope it won’t affect our family maul swinging tradition much.
After using it once, it is indeed nice to see super tough logs pop open with no effort, but I took no satisfaction in the work and this was reassuring in a way.


































