Marble Auger w/ Arduino Controller

I finished my first complete Arduino project. This is a very basic project, but I had a good time building it, and it is a confluence of three disciplines I'm interested in: code, electronics, and physical mechanisms.

Here are some pictures, and a video.

Final Product




Electronics

First I have a hand-soldered motor driver.

The driver's schematic is like this:

The DC motor is a little dinky thing with a stall current of 60mA at 5V, so a BJT like the S8050 can work for driving it. I've since ordered some MOSFETs that I would use if I were building another one. I learned to solder SMD components to perfboard on this YouTube channel, which is well worth a watch.

I used a similar approach to put together the controller board:


The board simply connects the ESP to the motor and a potentiometer. The potentiometer is there to allow increasing power for taller marble runs -- the auger is stackable and thus can be made to fit and lift more marbles with more middle pieces.

Physical Design

By far the hardest part of building this was the CAD part. I'm a professional coder, so the code part was trivial and took about ten minutes. The electronics part was harder but still not very hard, and it only ended up taking about one evening of work. The physical design . . . let's just say I went through a lot of plastic iterating on this.

The idea here is a reverse auger. Instead of the screw turning, the channel turns. This is much easier and faster to 3d print than an ordinary auger, and is much more stable on the print bed.

This is the first time I've worked on a 3D printed assembly that has more than one part. This one has a total of about 15 parts, including the electronics.

Here's an image of the inside of the motor box:

And the auger:

I learned a crap ton about CAD and 3D design over the course of building this thing. It's specifically designed to work with the exact marble set my kids have, although if you wanted to tweak it for your kids, you could probably edit the geometry of the marble run interfacing part, and maybe tweak some of the sketches. This design is definitely not as configurable as it should be, so it won't necessarily be easy, but hopefully this can serve as a starting point.

The CAD files are available here:

Firmware

And finally, the Arduino part. This is running on an Adafruit QTPyS3. A way, way overkill device for this task, but it is what I had on hand. Realistically, considering the time I invested in this, the uC was the very cheapest part of the overall project.

Here's the code:

constexpr auto pin_pot = A0;
constexpr auto pin_motor = A1;

void setup() {
  pinMode(pin_pot, INPUT);
  pinMode(pin_motor, OUTPUT);
}

void loop() {
  constexpr int min_pot_for_on = 4096 * 0.2;
  constexpr int min_motor_duty = 0.3 * 255;

  const uint16_t pot_value = analogRead(pin_pot);
  const long motor_duty = pot_value >= min_pot_for_on ? map(pot_value, min_pot_for_on, 4095, min_motor_duty, 255) : 0; 
  analogWrite(pin_motor, motor_duty);
  Serial.printf("%d => %d\n", pot_value, motor_duty);

  delay(25);
}

Silly right? Probably there's a way to do this with just discrete components, but, I don't know how, and I do know how to code. I hope to learn the rest someday soon!

Anyway, I got some various support for this work from this site and All About Electronics, and I appreciate everyone who helped.

3 Likes

Thanks for sharing. It is a very nice looking project.

Vevy cool but will it make you rich? :grin:

Only in ways having nothing to do with money :slight_smile:

Well, this one works.
So what's the next project?

Next up is a self-balancing remote controllable robot. Basic stuff, again, I know. :stuck_out_tongue: I'll branch out more after that, or at least, I plan to. Can't wait to retire and have more time to work on this hobby stuff.

Wouldn't be great if you could do it for a living.

How many Legos have your kids managed to fit in it?

I just gave it to them yesterday so as yet we're only up to about 15 legos but give it time.