posts tagged with the keyword ‘arduino’

2015.05.23

Laser Maze - Photo by Eric Schneeweis

You may remember the Laser Maze from Milwaukee MakerFest in 2013, or maybe you experienced it at Maker Faire Milwaukee in 2014. Well, it’s coming back! Somehow I volunteered to design & build the hardware for Laser Maze 2015!

Laser Pointers

Step 1: Acquire lasers.

I’ve got a big pile of laser pointers, so far so good. Now, I should mention I didn’t do the set-up in previous years, and I don’t have much to work from, so I’ll be making a bunch of decisions, and if they are terrible, let me know.

In the coming weeks I’ll be designing a 3D printed mount for the laser pointers. It will hold the front half, so we can unscrew the back half to change batteries without removing the laser from its position. There is a zip tie on the laser that slides and rotates into place to hold the button down. (A simple design, we’re going for simple on this whole thing.)

Scoreboard

The scoreboard is an Adafruit 1.2″ 4-Digit 7-Segment Display. I’ll probably use a Teensy 3.1 as the controller, and there will be a big green start button and a big red stop button. You press start at one end of the maze and the counter begins… and when you get to the end you press stop and you know your time from the scoreboard.

Oh, and the laser pointers… they bounce off some mirrors and hit solar panels connected to the Teensy. When you break the beam the voltage from the panel drops (which is recognized on the Teensy) and you get penalized. We’ll add time to your total as well. So if you’re 10 seconds into it and break a beam, the timer will suddenly display 20 seconds instead of 10 (or whatever, we’ll figure out the math later.)

There should also be a buzzer of some kind, for the start, stop, and breaking of the beam. I’m just using a piezo for prototyping, but we’ll make sure we have something LOUD for the event.

There are some notes about everything on the laser maze wiki page, but I’ll keep documenting here as I go.

2015.04.22

Electronics

I finally got the electronics for my Turntable Drawing Machine working. It wasn’t easy…

I decided to use a DC gearmotor controlled by an Arduino and potentiometer for the speed. I did a quick test of this with a Leonardo and a DRV8835 Dual Motor Driver Shield for Arduino. It worked fine for controlling the speed of the motor, but I didn’t really want to use the shield, so I used a DRV8835 Dual Motor Driver Carrier I had on hand. (Since I’m only using one DC motor, I probably could have used a DRV8838 Single Brushed DC Motor Driver Carrier.)

Pololu has an easy-to-use Arduino library for the DRV8835 Dual Motor Driver Shield which worked fine for the shield, but doesn’t (I mean didn’t) work with the DRV8835 Dual Motor Driver Carrier. I ended up hacking the library a bit to make it work. All was well until I added a servo. Since the Arduino library for the shield is hard-coded to use pins 7, 8, 9 and 10 there’s an issue because the default Arduino servo library disables PWM control on pins 9 and 10. I then changed the library to not use pins 9 and 10, but that still didn’t quite work… Seems that the servo library and the motor control library both need to use times, so there’s some weirdness there…

I ended up digging through the forums and eventually found some useful posts and a link to ServoTimer2.zip. (It’s worth noting that there are a number of ServoTimer2 libraries, but I tried this one and it worked.)

Once I had the ServoTimer2 library in place, getting it to work with the my hacked ‘DRV8835DualDriver’ library was simple. (I’m saying “simple” but it took a few hours of screwing around with things that should have worked but didn’t) If I had used one of the Arduino Megas I had lying around, I probably could have avoided some of the issues the Servo library causes.

Alright, well… electronics seem good! Next step is to build things, and get the turntable portion constructed to test if the DC gearbox will work out. I think it will, as it’s got plenty of torque, and there shouldn’t be much resistance.

2015.04.20

Arduino.cc

In accordance with a request from organizations and people I respect, here’s a photo take on 2015-04-19 showing the packaging from an Arduino UNO I purchased from Adafruit Industries (in the United States of America) on 2010-10-19 showing the text “Manufactured under license from Arduino by SMART PROJECTS S.r.l.”.

Adafruit / Arduino.cc

Here is the order information from that purchase. For more info, see the Hackaday post Your Arduino Packaging Could Sway a Court Case and the Adafruit post Please post old Arduino packaging that says “Manufactured under license from Arduino” #TeamArduinoCC.

2015.03.29

When last we discussed rotary encoding, it was all experimental. Since the project (which will eventually be revealed) is complete, I figured I should share a bit more about the exploration and final solution.

Encoding Disk

I moved from printed paper disks to laser-cut disks. I cut some 3mm Baltic Birch plywood at Milwaukee Makerspace. They worked well, but since I was hoping to get more steps/resolution I continued with the paper prototypes as well.

Encoding Disk

The one in the photo above was a bit too fine… too many steps. The more steps the more precise the alignment has to be, and the more chance of errors.

Gap

We had some concerns about a disk spinning between a U-shaped sensor with just a few millimeters on each side, so rather than just go with the GP1A57HRJ00F Photo Interrupter, I started experimenting with the QRD1114 Optical Detector / Phototransistor as an alternative.

Sensors

The idea would be to use a wider disk and instead of it spinning between two pieces, it would have the encoding stripe on the edge, and the sensors would be on the outside of the disk. Back to the breadboard! The QRD1114s require a pair of resistors to work properly, so I wired it up and did a few tests and things seemed to work.

Encoding Strips

My first tests just involved sliding a piece of striped paper across the sensors, but I needed a real disk. I used the laser cutter at Brown Dog Gadgets to cut some disks from 1″ pink foam, and also from 1/4″ foamcore board. The pink foam actually ended up with concave sides due to the melting power of the laser, so I used the foamcore board pieces stacked up.

Stripes

Math time! How long of a strip do we need to wrap around the disk? Well, you can determine the circumference of a circle if you know the radius or diameter. Hooray for math! Above is a letter size file that I could print on a laser printer to produce the stripes I needed. The thin line on the right side was used for alignment since I had to use multiple stripes to wrap around the disk.

Encoder

Here’s a sneak peek of what the final disk looks like. There’s a few more steps before we got this far though, so I’ll continue the story next time.

2015.03.21

Motor Mounts

I needed a few motor mounts for a project and since I was at Milwaukee Makerspace it seemed quicker/faster to just laser cut a few since I had files on my laptop. (I could have 3D printed them as well.)

Polargraph

I assembled a quick and dirty polargraph, and while I attempted to use an Adafruit Motor Shield I had on hand, it did not work. The steppers were not moving, just humming and stuttering.

I then grabbed the CNC Shield I’ve been testing and put that in place. The steppers worked fine with a test sketch, but the firmware I wanted to load (Dan’s Makelangelo code) expects either an Adafruit Motor Shield or a RUMBA board. I thought about trying to rewrite things to work with the Pololu motor drivers, but it was also after 11pm.

(I later realized that I should have looked at the RUMBA firmware, as that supposedly works with RAMPS. And yes, while I do have a spare RAMPS board, it’s across town at my studio. I decided to punt and see what I could do with what was in my workshop.)

Shapes

I figured I’d throw Grbl on it and see what happened. I used Grbl Controller to connect to the board and loaded some G-code to run. I knew it would not work (as expected) but I tried anyway.

Drawing

Grbl supports machines that use Cartesian coordinates, but not those that use polar coordinates, like a polargraph. Still, I was surprised at what I got. It basically worked, except for flipping the image and running it diagonally up to the left.

Grbl Controller

I then took my original vector file and flipped it, and skewed it up and to the left, to match (somewhat) how it was drawn by the machine.

Shapes skewed

It actually sort of worked! I think it was after midnight by now so I gave up on it. My lack of math skills prevent me from converting between coordinate systems, but I think there’s a few things to explore here, and if I get time (uhhh) it may be something I play with a bit in the future. Also, if anyone wants to add polar coordinate support to Grbl that would be lovely. :)

« Older Entries |


buy the button:

Buy The Button

top recent artists: