Ben's Blog

I.T., plots, plotters ben March 08, 2021

Ipad Test

It works really well, I need to think about what cool doors this opens up.

aesthetics, plots ben March 08, 2021

Hexagonal Maze

Depth-First Hexagonal Maze courtesy of maraz @ turtletoy.net.

aesthetics, plots ben March 08, 2021

Protected: Voronoi Portrait

This content is password-protected. To view it, please enter the password below.

aesthetics, plots ben March 08, 2021

UV Snowflakes

Pictures don’t do justice to what it looks like in person unfortunately.

aesthetics, plots ben March 08, 2021

Draw me a Sheep

Sheep courtesy of reinder @ turtletoy.net.

aesthetics, plots ben March 07, 2021

Snowflakes

I finally tuned the plotter a bit to make it perform faster. I was trying to make it move faster by increasing the stepper motor speed, it turns out optimizing the pen up/down action was really where all the slowness was and makes everything appear to run faster. It’s quite spiffy now and I’ve been plotting non-stop this past week.

Snowflakes courtesy of llemarie @ turtletoy.net.

miscellaneous ben February 22, 2021

RC On Ice

Sick drifts bro!

 

And that was bound to happen

miscellaneous ben February 20, 2021

RC Car upgrade

Chasing the cat is even more fun

maple syrup, self sustainability ben February 16, 2021

Creating Sugaring Paths

Sugaring season is around the corner and so I’m giving us paths through the woods. No sledding 35 gallons of sap, no stuck ATVs. One hard lesson after another, we now know what to do and when. We also know how: I didn’t even get the tractor stuck and made quick work of it all. It’s so nice for these things to have become evident.

miscellaneous ben February 11, 2021

Winter Fun

The kids don’t need to ask twice, I absolutely love riding and hearing giggles the whole time.

 

He discovered doughnuts.

The gifs came out a little faster than the actual actions, we’re not that reckless, we hope to remain wreckless.

First year on the ice and she’s doing quite well already.

 

Our family is a net positive on the ice.

miscellaneous ben February 07, 2021

Winter Wonder

Work from Home = Work from a Snowglobe

Soon to be used sugarhouse & blue jays.

 

Trogdor was a boat. I mean he was a snow fort dragon boat.

Girls help the weakest, boy throws himself over the wood piles and eats snow unconcerned by others.

nature encounters ben February 03, 2021

Blue Jays in Force

An interesting thing about the birdfeeder is how birds species time share on it. Blue Jays, when they descend on it, will take over all the surrounding trees. Several dozens of them raiding the feeder for 20 minutes. None of them were there before, none left after. They act as a group, are punctual, and expedient.

self sustainability, water ben January 26, 2021

Scary Math

Our lives just took an enormous leap in comfort as we now have running water. It isn’t fully installed yet, and I’ll post more about the pump when it is.

I estimate that in the past 5 and a half years, We pumped and carried 248,930 liters (65,760 gallons) of water from the well 100ft away. I’d love to know how many joules this represents, and how much ingested Ben & Jerry’s this translates to, but I don’t need to go down this rabbit hole right now :).

It isn’t yet perfect, I’m still figuring out a few things around priming and proper plumbing. But it’s still an enormous improvement. Running water, which we took for granted most of our lives, is the culmination of not only all the projects surrounding it (well work, frost lines, piping, et cetera), but also all the projects surrounding electricity. No wonder it took 5.5 years to get here with our starting point being zero understanding of any of these things. We often run into the people we once were, who have no concept of the fact water can move outside of pipes, in buckets for example. It seems evident when you read it, but I can guarantee we were met with confused looks more than once.

I.T., plotters ben January 10, 2021

Captured Robin’s handwriting at age 10

It’s a surprisingly endearing thing to do. A personality snapshot in time.

I.T., plotters ben January 10, 2021

Working with Handwriting

One of my obsessions in developing PlottyBot has been handwriting. Even with Mandalagaba I care very much that the penstrokes originate from one’s hand and avoid tools which “do the drawing for you”. This is where your personality transpires on paper beyond your ability to draw. I thought it’d be neat to have a pen plotter able to write in one’s handwriting.

This idea came up a long time ago, and I researched many ways to achieve it. The unfortunate but predictable conclusion was that I would need to write my own font format to get there.

Introducing Flexible Font. PlottyBot comes with the ability to capture your handwriting. The Flexible Font format is monoline based, holds metadata on your pen strokes to define where ligatures may occur, it also allows for character variations. It’s tailored just for plotters :).

The video bellow shows several ways to use PlottyBot with handwriting. The first is a simple live replay of pen strokes from https://plottybot.mandalagaba.com, the next ones use Flexible Font.

https://ben.akrin.com/wp-content/uploads/2021/01/PlottyBot.mp4

 

aesthetics, plots ben December 29, 2020

UV Ink Experiment

One advantage of a drawing machine working with coordinates is that it does not need to see what it draws.

Under the blue light

 

I bought a fountain pen with a refillable cartridge, and some UV ink.

 

The UV ink is invisible to the naked eye but the pen did leave trails on the paper.

 

3D modeling / printing, all out geekery, electronics, I.T., plotters ben December 26, 2020

PlottyBot is born

Years in the making, many prototypes, and I hope a software stack which brings novelty and ease of use to the world of pen plotting. It’s been a marathon building the final version and documenting the process carefully. I’m too pooped to say anything more about it for now.

Instructions here

miscellaneous ben December 21, 2020

Protected: Fort Awesome

This content is password-protected. To view it, please enter the password below.

electronics, I.T. ben December 17, 2020

Driving a 28BYJ-48 Stepper Motor & ULN2003 driver with a Raspberry Pi

Quick points about this motor & driver

They are wonderfully cheap and extremely accurate due to 1/64 gearing. They move by 0.087890625° per step! However, the gearing is made of plastic and will wear out overtime, especially if moving heavy objects. Lastly the motors can become a little toasty if you work them hard.

Circuit

Fritzing

Code

#!/usr/bin/python3
import RPi.GPIO as GPIO
import time

in1 = 17
in2 = 18
in3 = 27
in4 = 22

# careful lowering this, at some point you run into the mechanical limitation of how quick your motor can move
step_sleep = 0.002

step_count = 4096 # 5.625*(1/64) per step, 4096 steps is 360°

direction = False # True for clockwise, False for counter-clockwise

# defining stepper motor sequence (found in documentation http://www.4tronix.co.uk/arduino/Stepper-Motors.php)
step_sequence = [[1,0,0,1],
                 [1,0,0,0],
                 [1,1,0,0],
                 [0,1,0,0],
                 [0,1,1,0],
                 [0,0,1,0],
                 [0,0,1,1],
                 [0,0,0,1]]

# setting up
GPIO.setmode( GPIO.BCM )
GPIO.setup( in1, GPIO.OUT )
GPIO.setup( in2, GPIO.OUT )
GPIO.setup( in3, GPIO.OUT )
GPIO.setup( in4, GPIO.OUT )

# initializing
GPIO.output( in1, GPIO.LOW )
GPIO.output( in2, GPIO.LOW )
GPIO.output( in3, GPIO.LOW )
GPIO.output( in4, GPIO.LOW )

motor_pins = [in1,in2,in3,in4]
motor_step_counter = 0 ;

def cleanup():
    GPIO.output( in1, GPIO.LOW )
    GPIO.output( in2, GPIO.LOW )
    GPIO.output( in3, GPIO.LOW )
    GPIO.output( in4, GPIO.LOW )
    GPIO.cleanup()

# the meat
try:
    i = 0
    for i in range(step_count):
        for pin in range(0, len(motor_pins)):
            GPIO.output( motor_pins[pin], step_sequence[motor_step_counter][pin] )
        if direction==True:
            motor_step_counter = (motor_step_counter - 1) % 8
        elif direction==False:
            motor_step_counter = (motor_step_counter + 1) % 8
        else: # defensive programming
            print( "uh oh... direction should *always* be either True or False" )
            cleanup()
            exit( 1 )
        time.sleep( step_sleep )

except KeyboardInterrupt:
    cleanup()
    exit( 1 )

cleanup()
exit( 0 )

Stuff you might need for this to run:

sudo apt-get update --fix-missing && sudo apt-get install python3-rpi.gpio

Results

This motor takes 5.625*(1/64)° per step, this means 2048 steps for 180°:

and 4096 steps for 360°:

One thing that is super cool about the driver board are the LEDs. Projects are always cooler with blinky LEDs, but these guys also help show what is actually going on inside the stepper, and can help you find issues. They are supposed to light up in sequence.

self sustainability, solar power ben December 15, 2020

Compromises, Getting 70 Amps on Demand

We barely used our Champion generator these past 5 years, but it did come in handy on rare occasions. It sat for 2 years unused at one point and needed some TLC to get back going again, a fact we didn’t want another way. Working from home in the time of Covid, having upgraded our solar setup, and still not making enough power through very cloudy days, we had to compromise our values a bit more and get decent fossil based 🙁 regenerating capabilities.

I’m still gathering information on water and wind turbines to diversify down the road, but today we are not ready to pull that trigger and we need to work.

So we acquired a very nice Honda EU2200i, and a wonderful little device that plugs into it and produces 70A at 12VDC on demand.

The Honda generator is really nice and very quiet.

The AIMS Power CON120AC1224DC is very impressive, is can truly put out 70A on demand, it can be tuned to charge several battery types, and it decouples the load. I don’t need to switch the load to the generator, which means it’s always on the nice clean pure sine inverter.

The Honda generator comes with Bluetooth, a fact I was not happy about as it’s gimmicky, but I have to say it is nice to not have to go back outside to turn off the generator. The AIMS converter is definitely working it hard.

 

The results on the solar graph are, well, a bit absurd to look at :).

electronics, I.T. ben December 15, 2020

Driving a Bipolar Stepper Motor with an L298N and a Raspberry Pi

A few things to know about the L298N

This is a rudimentary way to drive a stepper motor. You are activating the motor’s coils in sequence yourself to have it take steps. There exist cheap stepper drivers which only require 1 signal from the Pi to be instructed to execute a full step sequence.

There are 2 coils on a bipolar stepper motor, each with a + and a – side. As such, this method requires 4 pins from your Pi to drive the Motor Vs only 1 pin with a more advanced stepper driver. Equally true is that a more advanced stepper driver will require at least another pin for direction and they’ll usually have other pins for micro-stepping.

This method does not allow for micro-stepping, only full steps. This is fine enough for most applications.

Lastly, while the L298N method might appear less appealing because of the above points, I find it to be extremely robust (advanced stepper drivers can be very finicky). You can power your Pi or Arduino with it thanks to a 5V port (warning, it can only provide so many amps and a Pi running heavy processing will crash).

It can be used to drive 2 DC motors instead of 2 stepper coils of a bipolar stepper motor, and has 2 PWM pins to adjust power given to the motors. It’s a very versatile and enabling device to master. You’ll also learn a lot about how stepper motors work.

Finding your stepper motor coils

Documentation for electronics is often inaccurate, disparate, when it’s even available. It’s good to find or verify what wires you think your coils are on. To do so you can put an LED on 2 motor pins and spin it until it lights up. When it does, induction powered your LED so you know you are holding the 2 wires of a coil. The other 2 wires are obviously the other coil.

There is no good way I could find to verify which of a coil’s wire is positive or negative. In my trials, I found that it doesn’t matter for a bipolar stepper motor on an L298N. The worst that will happen is that your motor may turn in the other direction which is easy enough to fix by flipping wires.

Circuit

Fritzing

Code

[python]#!/usr/bin/python3
import RPi.GPIO as GPIO
import time

out1 = 17
out2 = 18
out3 = 27
out4 = 22

# careful lowering this, at some point you run into the mechanical limitation of how quick your motor can move
step_sleep = 0.002

step_count = 200

# setting up
GPIO.setmode( GPIO.BCM )
GPIO.setup( out1, GPIO.OUT )
GPIO.setup( out2, GPIO.OUT )
GPIO.setup( out3, GPIO.OUT )
GPIO.setup( out4, GPIO.OUT )

# initializing
GPIO.output( out1, GPIO.LOW )
GPIO.output( out2, GPIO.LOW )
GPIO.output( out3, GPIO.LOW )
GPIO.output( out4, GPIO.LOW )

def cleanup():
GPIO.output( out1, GPIO.LOW )
GPIO.output( out2, GPIO.LOW )
GPIO.output( out3, GPIO.LOW )
GPIO.output( out4, GPIO.LOW )
GPIO.cleanup()

# the meat
try:
i = 0
for i in range(step_count):
if i%4==0:
GPIO.output( out4, GPIO.HIGH )
GPIO.output( out3, GPIO.LOW )
GPIO.output( out2, GPIO.LOW )
GPIO.output( out1, GPIO.LOW )
elif i%4==1:
GPIO.output( out4, GPIO.LOW )
GPIO.output( out3, GPIO.LOW )
GPIO.output( out2, GPIO.HIGH )
GPIO.output( out1, GPIO.LOW )
elif i%4==2:
GPIO.output( out4, GPIO.LOW )
GPIO.output( out3, GPIO.HIGH )
GPIO.output( out2, GPIO.LOW )
GPIO.output( out1, GPIO.LOW )
elif i%4==3:
GPIO.output( out4, GPIO.LOW )
GPIO.output( out3, GPIO.LOW )
GPIO.output( out2, GPIO.LOW )
GPIO.output( out1, GPIO.HIGH )

time.sleep( step_sleep )

except KeyboardInterrupt:
cleanup()
exit( 1 )

cleanup()
exit( 0 )[/python]

Stuff you might need for this to run:

[bash]sudo apt-get update –fix-missing && sudo apt-get install python3-rpi.gpio[/bash]

 

This stepper motor is rated for rotating by 1.8° per step. This means that it takes 100 steps to rotate 180 degrees:

and 200 to do a full 360:

Power the Pi from the L298N?

As I alluded to earlier, the L298N comes with a 5V power output that is most convenient to power Pis and Arduinos as it allows you to eliminate one of the 2 power supplies to your system. Be advised that while it provides the right voltage, it does not provide enough amps to power a standard Raspberry Pi, and while it can power a Pi Zero, the later will not get enough power and crash if it works hard enough (having a camera and a live streaming server pushed it over the edge in my testing). It will power a Pi Zero on Wifi running Python which is enough for a lot of applications.

Here’s the circuit if you want to do this:

Fritzing

miscellaneous ben December 07, 2020

Protected: Esther the Cat Herder

This content is password-protected. To view it, please enter the password below.

aesthetics, plots ben December 07, 2020

6 and 1/2 hour job

Someone in Brazil drew this on Mandalagaba years ago and I’ve used it to stress test plotters since :). I wish I could get in touch to show them.

https://ben.akrin.com/wp-content/uploads/2020/12/6andahalf.mp4

Posts pagination

← Previous 1 … 17 18 19 … 52 Next →

This blog is solar powered

Interactive

Handwriting Capture
Mandalagaba
IPv6 link-local to MAC converter
IPv6 MAC to link-local converter
Markov Text Generation
Markov Word Generation
Markov Music Generation
Duplogrifier
Flood Fill Algorithms
Homestead Metrics
RGB Playground
Web Games

Categories

  • aesthetics111
    • plots54
    • specular holography6
  • Books3
  • I.T.202
    • 3D modeling / printing21
    • AI6
    • all out geekery36
    • electronics27
    • homestead automation6
    • maniacal paranoia25
    • plotters49
    • unix / linux29
    • video games4
    • web development29
    • web games3
  • Lego / Duplo67
  • life in the U.S.42
  • miscellaneous202
  • nature encounters114
  • old vinyls3
  • organs2
  • self sustainability560
    • agriculture105
    • apiculture38
    • apple20
    • building131
    • canning3
    • crochet6
    • foraging6
    • hunting10
    • maple syrup47
    • poultry39
    • preserving2
    • solar power28
    • water23
    • wood84
  • trip to a new life6
Theme by Bloompixel. Proudly Powered by WordPress