Archive for the 'DIY' Category

DrawBot Badge – Workshop

Woot!

I and Jason Huggins (@hugs), of Tapster Robotics, will be giving a conference at the 2018 Hackaday SuperConference. The conference will be “Getting Started in Small Scale CNC and Robotics (Build a CNC Badge)”. By the end of the workshop you will have built, programmed and learned to use the DrawBot Badge.

The badge is way more than that though. The badge PCB is a very capable general purpose CNC/Robotics controller. We considered every small scale CNC machine we could think of and made sure this badge could control it. Here is what it can control.

  • (3) Stepper Motors
  • (3) Hobby Servos
  • (3) Homing/Limit switches
  • (1) Variable Speed Spindle PWM signal
  • (1) Laser Module (Power control and Safety interlock)
  • (4) Control switch inputs
  • (1) Probe switch control
  • (1) Coolant Control
  • (1) High current (3 Amp) output for relays or solenoids (includes flyback diode)
  • (1) i2C interface (for displays or Sh**ty Add-Ons)
  • (1) SD Card socket to store and run files

You can’t use every feature at once, like the Laser PWM and Spindle PWM are the same signal, but they are broken out logically to multiple, machine specific, connectors.

It is all powered by an ESP32 running Grbl_ESP32, which provides serial, Bluetooth and WebUI interfaces.

The first half of the conference will cover tips and tricks for getting started with making and controlling small machines. We will also learn and use some basic gcode to control some motors and other items. It is a just a basic intro to get you started and discover some resources. During the second half we will build the DrawBot badge.

If you are interested, sign up for the conference and be sure to get into the workshop when that is posted. The workshop will be limited to about 20 people, but I will bring extra badges for sale and will be happy to help build and hack them all weekend. I will also bring extra motors, servos, switches, etc for hacking up simple machines.

Open Source

Within the next couple weeks, all of the documentation will be released. Badge kits will also be for sale on Tindie after the conference.

 

 

Next Project – Wooden Nickel Engraver

I started working on my next backpack scale CNC project. My backpack scale projects are tiny CNC machines that I can easy carry in a backpack to tech meetups and events. This machine is going to be a wooden nickel laser engraver.

Wooden nickels are small wooden discs. You can buy blanks from various places, including Amazon. You can usually get 100 for less than $10. The goal is to create a machine that loads them from a feed tube, engraves them, then ejects them.

Mechatronics

The basic drive will be an H-Bot. It will be similar to the midTbot, but the motors are at the ends of the X axis. It will be fully enclosed, but I not started work on that part yet.

Disc Feed System

I hope to be able to use a single hobby servo to handle the loading and unloading of the blanks. The servo will control a sliding device that has three positions.

  • In the first position it acts like a support shelf for the disc. The bed slides under the feed tube and a disk drops into the pocket.
  • The next position is the clamping position. This holds the disc still while engraving.
  • The final position retracts the shelf so the disc drops through.

Electronics

The goal is to use a low cost controller like an Arduino Nano.

  • (2) Stepper motors for the X,Y motion
  • (1) Hobby servo for the disc feed system (PWM)
  • (1) Laser power control (PWM)
  • (2) homing switches
  • (1) interlock switch loop if there is a door and/or cover

Status

The major new feature of this design is the disc feed system, so I am primarily working on that right now.


If you want to be notified of future blog posts, please subscribe.

TWANG32 – An ESP32 Port of TWANG

 

I ported the TWANG game over to ESP32. I wanted to do this for several reasons.

  • Cost: The ESP32 is generally lower cost than the Arduino Mega
  • Speed: The ESP32 has a dual core 80MHz processor vs. the 16MHz Arduino Mega
  • Memory: The ESP32 has much more RAM and program space to allow more features, levels and audio files.
  • Physical Size: A Mega is very big. This creates a large enclosure that takes a while to print. The smaller enclosure is also more portable.
  • DAC Pins: The audio capabilities on the Mega are very crude and basically limited to square wave tones. A DAC can output digital audio. Currently I am just using a similar square wave tone to the Mega, but it works much better for adjusting the volume.
  • Wireless: The ESP32 has Wifi and Bluetooth. This will allow easier (smartphone) interfacing for options (brightness, volume) and level pack uploads. I also want to consider dual player battle type games with linked controllers.

The Audio

The original TWANG bit banged audio directly from I/O to a speaker. This was super simple, but the volume at max was not loud enough for noisy environments. The ESP32 I/O is a lower voltage (3.3v) and less current, so something needed to be done. I prototyped with a PAM8403 based amplifier (~$4 on Amazon). This worked great, so I added that I.C. to my shield. The volume is controlled by the amplitude of the DAC.

The Shield

I made a shield to simply the wiring and provide a stable way to mount the ESP32. I used a NodeMCU 32S development board for the ESP32. Under the ESP32 is a the audio circuitry. I should have some extra boards to sell on Tindie soon. I will publish the source files soon.

The Firmware

The code is on Github. The port was relatively easy, but I had to rewrite a few libraries. They were designed so the main “setup” and “loop” parts did not change much. Currently the serial port based setup from the Mega version was not ported. This probably won’t be used. A wireless version is in the works.

Enclosure

The new enclosure is smaller. It prints quicker and is easier to fit in my backpack. The size is still big enough to hold comfortably while playing. The files will be uploaded to Thingiverse within the week.

Next Steps

  • Wireless control: I want a simple way to read the game statistics (average score, levels played, boos kills, etc) and tweak simple settings like audio volume and brightness. I think the easiest way is to make it a wifi access point with a simple web server. This eliminates having to write any client side apps and any smartphone or computer can hope on easily.
  • Levels: Make some way to edit or upload levels via wifi.
  • Multiplayer: I should be able to link multiple controllers. If I can think of a good dual player game idea, I might try to add that.
  • Python: It might be a fun challenge to write the game in Micro Python. This might open up the development to more people.

If you want to be notified of future blog posts, please subscribe.

 

Laser Galvo Control Experiments

 

 

I recently bought some laser galvos from Aliexpress. What I got was the basic guts of a laser light show system. It came with everything I needed except the lasers. My goal is to control a laser to make a large interactive artistic display or game controlled by a micro controller with a DAC. I have a PSoC 5 and an ESP32 that have DACs, so I may use those.

Galvos work like speakers, old school analog meters or hard drive arms. They move proportional to a current. They can move extremely fast and precisely with the ability to move to 30,000 positions per second. The galvos came with drivers. This simplifies the control to a simple differential voltage. A differential voltage is used to increase noise immunity. The ILDA spec says the differencial voltage is 0 to 10V. This means at one end of travel you supply -5V and 5V and at the other end of travel you swap the voltages supply +5V and -5V.

My DACs are 0V to 5V (0r 3.3V). I need to convert this range to a 10V differential voltage. The easiest way for me to do this is to use some op amps. With what I have on hand it is easiest to get the 10V differencial using 0 to 10V and -10V to 0. I tested on the galvos by outputting a -10V to 10V sin wave from a function generator. It worked great.

Assuming I use the 0-5V DAC, I need to map that to a -10V to 10V range. That is a 20V span and requires a 4x gain. I then need to offset that by -10V. The op amp circuit I show below is what I made.

I used an LM324N because I had some. That has (4) op amps in a single package. The rails of the device need to be hooked up to a + and – supply that is greater than the range I will be using. Fortunately the galvos came with a power supply that outputs +15V and -15V. I used some potentiometers in the circuit to allow me to adjust the circuit.

The lower op amp provides the gain. The gain on the positive side is 1 + 30k/10k which is 4. The negative side is used for the offset and its gain is 30k/10k which is 3. I need an offset of 10V, so 10V divided by the gain of 3 is 3.33V.  I need that value to come from the upper op amp. That op amp has a gain of 1 so I simply need to adjust the pot in front of that to output 3.33V.

 

The DAC is connected to the lower left voltage source in the schematic shown as 2.49V. The galvos would be connected to Gnd and the output of the lower op amp (green line).  The schematic is interactive. Click the link below and try adjusting the input voltage between 0V and 5V.

Click here to interact with the circuit.

I needed to create 1 circuit for each axis. Here is my breadboard.

Here are the signals on an oscilloscope. The yellow trace is the 0-5V input as a 5kHz sin wave. The blue trace is the output. Both traces use the center line as the 0V. The scale is 5V per division. The input has a low of 0V and a high of 5V. The output goes from -10v to 10v.

 

I am using the tiniest laser I could find so that I don’t have to worry about safety yet. I 3D printed a base to keep things in line.

Here is a short Instagram video of some testing.

 

Playing with my laser galvos at NERP tonight.

A post shared by @ buildlog on


If you want to be notified of future blog posts, please subscribe.

Building a TWANG

Introduction

First…. Most of the credit must go to Robin Baumgarten and Critters for the inspiration and firmware. While I have hacked and tweaked the firmware a lot, the basic design is still all Critter’s. He did a great job.

A lot of people have asked me to help them build one, so this blog post is here to help them out. It is easy and fun to design and build your own parts and electronics. You can also either use my or Critters 3D printed parts.

The Electronics

The electronics are quite simple and only consist of a few basic pieces.

Arduino Mega – The firmware will not fit on an Arduino UNO, so you must use an Arduino Mega or anything using the the atmega2560 micro-controller. You can tpyically find a clone for less than $10.

MPU-6050 – This is a 3 axis MEMS accelerometer and gyroscope. The easiest way is to buy a GY-521 breakout board. You only need to use the VCC, GND, SCL and SDA pins. Note: My shield also has the INT pin, but that was for experimentation. You can find these breakout boards on Amazon for less than $5.

Speaker – You need a small standard speaker. The sound quality is not great, so don’t invest in anything expensive. I used an 8 Ohm speaker, but anything should probably work. The speaker is hooked directly to the Mega I/O, so you also need a 100 Ohm resistor in the speaker circuit. Typically a 1/10w to 1/4w resistor would be used. Note: This resistor is included on my shield. If you use my 3D printed design you will want a 40mm diameter with very little depth to it. Note: Do not connect directly to an amplifier. It is not designed for that.

LED Strip – The FastLED library that is used, supports a lot of types. I like the APA102C (Dotstar) type. I have also tested WS2812 (Neopixel) types. Most of the testing I did was on a 1 meter 144 LED APA102C strand and it looked great. The game gets difficult when there are less LEDs, so I would recommend at least 90. I have also tested with (2) 1 meter 144/m strips soldered together and a giant 5 meter 90 LED/M strip. They all look and work great.  The firmware supports up to 1000. Most longer strips are soldered smaller sections. It is easy to solder strips together like the image below. Be sure the 5V, Gnd, etc. are aligned the right way. I have some strips that are waterproof. That is not required, but does not hurt.

Note: Do not power the LED strip directly from the Arduino. Power it separately from a power supply. Note: My shield has an input for this. It will also power the Arduino.

Power Supply – Technically, you could need upwards of 40mA per LED. I bought a 10A supply and it has worked fine without getting hot up to 450 LEDs.

Life LEDs – The firmware supports remaining “life” LEDs. I prefer to use the main LED strip for this. It is fun to live within the limitations of the LED strip as the sole display. Using the strip also allows you to adjust the life count in firmware. The default is 3 lives per level, but I have boosted it to 5 for testing.  Note: My shield uses different I/O pins for the LED than the original TWANG firmware, so you need to check this if using them.

Wiring

The image below shows all the required connections to the Arduino Mega. My prototype used male header pins poked into the Arduino headers. It worked fine, but wires did often pop out when removing the cover.

The TWANG Shield

While hand wiring is very simple, I found it to be messy and I worried about failures. I made a basic shield to clean everything up. Here are the features of the shield.

  • LED Strip Terminal Block – It is very easy to hook up the strip. It works with both 3 and 4 wire strips. The power comes from the shield and no additional connections are required on the strip. Connections are clearly labeled. 3 wires LED strips do not use the CLK connection.
  • Accelerometer Terminal Block: This has clearly labeled connections using the same names that are on the MPU-6050 accelerometer module. Just hook them up 1 to 1.
  • Speaker Terminal Block: This also has 5V and Gnd if your hacking requires these connections. The 10 Ohm speaker resistor is mounted on the board.
  • Main 5V power entry connector: This powers the LED strip. It also powers the Arduino. It uses a diode so you can also power the Arduino via USB for programming.
  • Arduino UNO compatible: While the default firmware will not fit on an UNO, future compact version might be possible.
  • Life LEDs – My enclosure does not use them, but you could wire some in. The resistors are included, but not the LEDs. You could solder LEDS on the board or remotely locate them and solder wires to the PCB.

Shield Source Files

The 3D Printed Parts and other hardware

You need to 3D print a bunch of parts, a door spring, some hardware and a little hot glue.

Tindie Store

Typically I buy a small batch of PCBs for all my projects. If everything goes well I sell the rest on Tindie and often order more if they sell out.

  • Just the assembled shield. (coming soon)
  • A kit with all the custom parts
    • Assembled Shield
    • MPU-6050 wired and terminated with wire ferrules.
    • Speaker wired and terminated with wire ferrules
    • Door Spring

The Firmware

All of this is fully compatible with the original TWANG firmware. I forked the original and added a few changes. I would be happy to merge back to the original some time in future. The firmware relies on several libraries. Follow the instructions on GitHub pages to get those libraries.

Hacking the Firmware.

Hacking the firmware is quite easy. You should at least try editing some levels. More advanced hacking could improve the graphics and sounds.  Please give feedback if anyone has made any improvements.

At a minimum you have to set the number of LEDs and the LED strip type in the firmware before compiling.

Video

(coming soon) This thing looks so awesome in person, but is nearly impossible to video due to the crazy brightness of the LEDs. A friend is going to help me try to get a decent video.

In the mean time, take a look at Critter’s videos.


If you want to be notified of future blog posts, please subscribe.

TWANG Play Testing

 

I took my TWANG Clone to ORD Camp, NERP and the Hardware Happy Hour Meetup over the past week. It got a ton of play time.  I received a lot of feedback to work on.

Observations and Feedback.

It’s difficult to beat.  Only one person got all the way to the boss level and defeated it. Amazingly, it was Elan Lee. He loved the game and gave me some good ideas to work on.

Most people got killed in the second to last level. It has a lot of enemies and a conveyor that keeps pushing you back to the bottom. There is also a sneaky enemy spawner at the bottom that gets a lot of people.  It is a great level, so I don’t want to remove it. I have added a few more levels before it to practice before that.

The Lava Pools. The lava pools confused some people. I changed the pools to look more red, flickering and scary when they are on and less scary when off.  To me it looks more obvious now what to do.

The Sound. I love the chip tune style sound out of the Arduino, but it needs to be way louder. In a large crowd, you cannot hear it at all. I think it needs an amplifier or an option for an external speaker.

Boss Level: By design, the exit at the top of the boss level does not appear until all bosses are dead. People did not understand this and tried to exit out the top early, because the boss respawns below you after the first “kill”. That caused the players to try to leave the game without ending the level. If you exited the top in this mode, the player disappeared without a way back.  This is very annoying if you get all the way to this last level.  I fixed the code so you can’t goes past the second to last LED when the boss is still alive.

New Features: I asked several people for new ideas. I got some to work on, but already added one. The attack width is now adjustable. It will default to the old width, but you can change it per level.

More levels. A typical game lasts about about 1-2 minutes. I think a few more medium difficulty levels would help.

Scoring System: It would be cool to know how you did compared to others. It could display the score as a bar on the strip, with the max possible being the full length. You could then mark your level somehow by the strip. (Postit note flag, dry erase pen, etc)

Next Steps

  • Release all the source files.
    • Firmware: I have been hacking the code quite a bit.  I’ll release my changes after some clean up and testing.
    • STL files: I have been using odd sized speakers harvested from some cheap external speakers. When looking looking to buy some, it seems like 40mm diameter is a good standard size that is cheap and available. As soon as I get some and test them, I will release the files for this size.
    • Sell on Tindie. My shield makes wiring super easy, but is definitely not required.  I think I’ll sell everything, except for the Mega and LED strip. I’ll also just sell the assembled PCB by itself.
  • New Hardware:
    • Raspberry Pi Zero W: I have looked into several hardware options and this seems to be a good candidate. I think it will be a simple way to get good audio and connectivity. I have the accelerometer and LED strip working so far.  The audio will be an I2S amp chip that will be put on a shield. The (2) drawbacks are boot time (20-30 second) and you are probably limited to APA102C (dotstar) type LED strips. Edit: I got a good portion of the code on the Pi running. It runs fine, but I don’t like the requirement for a slow and controlled shutdown of the Pi. It would require a button and some sort of visual feedback.

 

 

TWANG Pi Zero Prototype


If you want to be notified of future blog posts, please subscribe.

TWANG Shield

While the my TWANG clone has been running great, I wanted to clean up the wiring, so I made a shield to plug into the Arduino. I previously used header connectors plugging into the Arduino. The connectors go to three different places and come from all over the Arduino , so there were a lot of connectors including some single pin ones. I was worried they might pop out or fail. I also had to externally power the LED strip and supply power via USB to the Arduino.

The shield takes care of all of this and groups all of the external connections by function on easy to connect and clearly labeled terminal blocks. Here are the features I have…

  • Single 5V Power Connector: This connector powers the LED strip via a very heavy trace on the PCB. It also powers the Arduino. The Arduino is powered through a Schottke diode. If you plug in the USB, the Arduino switches to be powered by the USB. This allows you to program and hack the firmware while the LED strip is powered.
  • Terminal Block Connections: The wires are grouped by peripheral (Accel, Speaker, LED Strip) and clearly labeled.
  • LED Strip Connections: This powers and controls the LED strip. I have tested it with 4 wire (APA102, Dotstar) and 3 wire (Neopixel) strips.
  • Speaker Connection: There is an integral 100 Ohm resistor that is required when you directly power the a speaker from an Arduino. The terminal block also has 5V and Gnd in case you want to add a simple amplifier. BTW: Driving the speaker directly from the Arduino is plenty loud in my opinion.
  • Shield Size: The shield will work on both an Arduino Mega sized board or an Arduino UNO sized board. The TWANG firmware requires the extra memory of the Mega, but a tiny, reduced feature, UNO version could probably be made.
  • Life LEDs: There are provisions for 3 LEDs that are typically used to show remaining lives. I have not been using those. I prefer to use the LED strip to show remaining lives. I like working with the restriction of a 1D LED strip display.

Prototype Assembly Notes: I did not have all of the correct parts for the build. I did not have a 100 Ohm SMD part, so I tacked on a through hole part. I did not have the right terminal blocks, so I cut one and only used 3 positions for the speaker. The correct parts will arrive soon.

Here are some more images.

 

Future Changes

  • I will probably get rid of the life LEDs.
  • I will add a large capacitor for sensitive LEDs, like Neopixels. Right now I just connect the cap to the terminal block.
  • I will probably sell the rest of this batch on my Tindie store in a week or two. I will probably sell assembled boards and full assemblies (less LED strip and Mega)
  • I will release of the documentation under an CC4.0-A-SA license.

If you want to be notified of future blog posts, please subscribe.

TWANG!

I have been a Patron of Robin Baumgarten for a while. He makes experimental hardware for games. His Line Wobbler one dimensional dungeon crawler is my favorite and I have always wanted to play it. It uses a door stop spring as the controller. An accelerometer in the knob allows it to work like a joystick and also detect the wobble used to attack the enemies.

Original Line Wobbler (Robin B.)

After seeing his playable Christmas tree version of the game, I had to make one for myself. I could not find any source files that he published, but I was able to find an open source clone called TWANG. The game is quite fun and surprisingly challenging.

Original Twang Version

Electronic Hardware

Here is a list of the electronics hardware used.

  • Arduino Mega.  The Mega is way overkill for the I/O requirements, but an UNO does not have enough memory.
  • MPU-6050 3 Axis Accel/Gyro Breakout Board. These are available for about $5 and have good library support for Arduino.
  • Small Speaker. I bought a pair of external PC speakers at Micro Center for $4 and pulled out some 2″ speakers. You need to use a 100 Ohm resistor on one of the wires.
  • RGB LED Strip: The default code is written for the APA102 type strips. The FastLED library used also supports the cheaper WS2812 (Neopixel) strips. I used a 144 LED 1 meter APA102 strip. The Clock and Data type strips can work faster and they typically have an overall brightness factor that gives them a more useful brightness range than Neopixels. The brightness of these strips is insane and you typically run them at about 1/2 brightness.
  • Life LEDs: You can use 3 individual LEDs to indicate the number of lives you have left. I decided to skip that. I preferred the simplicity of a signal display element. I added a game over animation to the game to make it more clear that you are dead, dead.

Printed Parts

I created my own 3D printed parts. I was having trouble with the TWANG Thingiverse files. They are OBJ files and the parts are grouped. Cura was not creating good prints. My speaker was not going to fit anyway.

  • Chassis: I made a heavy walled enclosure to give it a little weight and make it extra strong.
  • Cover: The cover is also very thick. The speaker mounts in a pocket and is attached with hot glue.
  • Spring Clamp. This holds the spring to the cover securely. I also added a little hot glue to prevent it from rotating.
  • Knob Base. This is very similar to the official TWANG version. It has a longer, threaded interface to grab the spring. This parts takes a lot of abuse.
  • Knob Top: Snaps on, but also gets a little hot glue.

The Firmware

The firmware is well written and pretty easy to follow. You need to download a lot of libraries. Some can be installed from the Arduino IDE and some must be downloaded manually. This is pretty well explained on the Github page.

Everything works on a 60 frames/second loop. This includes the display and the sound. I was able to tweak a few things easily and add a game over animation.

The levels are very easy to edit. You really don’t need to know how to program. I tweaked a few to make them easier for beginners.

Assembly

Build Spring Assembly

  • Solder wires to the accel module.
  • Slide the spring clamp over the spring.
  • Assemble the knob to the spring top.
  • Feed the wires through the knob base and spring.
  • Screw the module to the knob base.
  • Attach the knob top to the knob base.

 

 

Attach Spring to Cover (make sure spring stays vertical when attaching)

  • Adjust the metal spring base until the spring stands vertically.
  • Put a little bead of hot glue in recess on the cover
  • Feed the wires through and place the spring in the recess.
  •  Put a little hot glue around the spring where the clamp goes. Screw it down.

Attach Speaker to Cover

  • Blah
  • Attach some wires. Put a 100 Ohm, 1/4W inline on one of the wires.

Assemble Base

  • Install the Arduino Mega into the base with screws.
  • Connect all the wires per the graphic below. I wired the accel SCL/SDA at the left end, but you can also wire them to pins 20 & 21 at the right end.
  • Attach Cover

Usage

  • You need to power the LED strip with a separate 5V power supply. I used a 10A supply for my 144 LED strip.
  • You also need to power the Arduino. The easiest way is to do it via the USB port.  You could wire the power supply in the first step to the 5V on the Arduino, but be careful to never power from the power supply and the USB at the same time or something will likely break.
  • Note: I have been hooking up the LED power first. When I only power the Arduino, I see some flickering of LEDs.  That concerns me that it is drawing some power from the I/O pins.

Next Steps.

  • Make it Easier to Build: The wiring is a pain and probably not too durable. I used pins crimped into connectors that mated to the Arduino Mega. To make it easier I designed a little shield with screw clamps. It will also power the Arduino through a diode that will allow the USB to also be used. The speaker resistor is part of shield. It is also compatible with an Arduino UNO, so a pocket sized TWANG might be possible. That arrives next week. I will likely sell the extras on Tindie.
  • ESP32 Version: I would really like to try this. The sound and speed should be better and the ability to network with another player sounds cool. It is also smaller and cheaper.
  • Scoring System: Everyone want to compete.

Video

Here is a video of the Twang.

 



If you want to be notified of future blog posts, please subscribe.

Coasty Source Files

A lot of people have asked about building their own Coasty Laser Cutter. It takes a lot of work to get the files ready for release. I will release the source files in stages as they are ready so people can get started. Watch this post for updates. Subscribing to this blog or following me on Twitter (@buildlog) is a good way to keep up.

When everything is ready, I’ll probably also post on Thingiverse.

3D Printed Parts

Here are the STL files for the 3D printed parts. The parts are generally pretty easy to print. They require no support and can be printed in low resolution. I print at 0.28mm layer height. You need to watch out for warping on the chassis and front door. If the chassis warps it will stress the PCB and could damage some parts. The door needs to be flat in order to close properly.

I printed my parts in generic PLA. They printed fine, but if you have some crappier PLA or if you don’t have a heated bed, you should probably print with a brim. I would suggest printing the chassis first. If you can print that, the other parts are easier. I have some PETG on order to test. That supposedly warps less that PLA.

The holes used for the 8mm rods are designed to be a press fit. If the rods are hard to install, try cleaning the holes up a little by hand with a 5/16 or 8mm drill. The drive shaft bearing is also a tight fit. Try using a vise or clamp to press it into the chassis.

Zip File containing the STL files.

Mechanical BOM

 

Part DescriptionQtySupplierSupplier P/N
3mm Smooth Pulley (16T equiv dia.) 6mm Wide1
Bearing 3mm x 10mm x 4mm2Generic623-2RS
BEARING 5mm 16mm 5mm1Generic625-2RS
Bearing Shaft 8mm2
Butoon Head Screw M3 x 302
Button Head Screw M3 x 121
Button Head Screw M5 x 201
Coasty Chassis13D Print
Coasty Controller Assy1Buildlog.netCoasty Controller
Coasty Drive Shaft13D Printed Part
Coasty Final Assembly1---
Coasty Laser Carriage13D Printed Part
Coasty Laser Carriage Assy1User Assembly
Coasty X Motor Cover13D Printed Part
Dual Fan Cover13D Printed Part
Flat Head Screw M3 x 64
GT2 Belt 6mm Wide cut to 385mm1GenericGT2 6mm
Hex Nut M33
Laser Module 3.5W 450nm1EleksmakerLA03-3500
Linear Shaft Bearing 8mm Dual2GenericLM8LUU
NEMA14 Stepper Motor2Generic
StepperOnLine
14HS13-0804S
Nylock Locking Nut M22
Nylon Locking Nut M33
Pan Head Screw M2 x 122
Silicon Oring #9052McMaster Carr1283N428
Socket Head Screw M3 x 820
Socket Head Screw M3 x 162
Socket Head Screw M3 x 203
Timing Pulley GT2 18T 6mm Wide 5mm Bore1
Wiring Cover13D Printed Part
Coasty Window149mm x 76mmJ Tech PhotonicsRating: OD+4 @ 445nm
Coasty Door13D Printed Part
Beam Stop (Metal Strip)170mm x 9mm x (0.5mm - 1.5mm)Fabricated

 

PCB Source Files

See this blog post

Firmware

Coming Soon

Build Instructions

Assembly Drawing


If you want to be notified of future blog posts, please subscribe.

Using The midTbot Controller

The midTbot Controller is a controller for midTbot pen drawing machines. It is sold on my Tindie store. When fully populated, it has the following features.

  • (2) Stepper Motor Drivers for the X and Y axes with microstepping selector jumpers
  • Servo Connector for Pen Lift
  • Arduino Nano Controller
  • 5V power supply
  • (2) Homing switches
  • Bluetooth connector for HC-05 or HC-06 module.
  • Aux power connector for easy access to 5V and 12V power.

Power Supply

You will need a 12V DC power supply with at least 3A of power. The DC plug should be a coaxial 5.5mm x 2.1mm type with center positive. This type of plug is the most common type and should be pretty easy to find.

Microcontroller.

You should use an Arduino Nano compatible controller. The controller bootloader will need to be changed to the smaller Arduino UNO bootloader in order to fit the firmware. I have instructions on how to do this here. If you would like to buy one already modified, I sell them on my Tindie store. Be sure to install the controller in the correct orientation. The USB connector should face the edge of the controller as noted on the silkscreen of the controller PCB.

Stepper Drivers

You will need 2 stepper driver modules. I recommend ones based on the Allegro A4988 controller or the TI DRV 8825 controller. The drivers often come with heatsinks. The current will typically be set low enough that heatsinks are not needed.

You will need to set the microstepping level. I recommend using 1/8 microstepping. That gives a good balance of accuracy, smoothness and speed. You set this using the jumper blocks. Each stepper driver type has its own configuration. Here are the jumper setting for A4988 and DRV8825

Microstep ResolutionA4988 JumpersDRV 8825 Jumpers
FullNoneNone
1/2MS1MS1
1/4MS2MS2
1/8MS1 + MS2MS1+MS2
1/16MS1+MS2+MS3MS3
1/32Not AvailableMS1+MS2+MS3

Note the MS1, MS2 & MS3 labels next to the jumpers.

The orientation of the drivers is very important. You will break the drivers and likely other parts if you insert them wrong. Most drivers have the pins labeled and the the controller PCB has the corner pins labeled. Be sure the labels match. Here are the correct orientations for the A4988 and DRV8825.

You should set the stepper driver output current to the level required by your stepper motors. The midTbot does not need a lot of power. If you set the power too high, the motor could get hot and damage the 3D printed part it mounts to. You set the current by adjusting a potentiometer and reading a voltage. The drivers need to be powered when you do this. You can install them and power the board to do this. Do not connect the motors when adjusting the potentiometer. Each driver will have a small hole with exposed metal. This is the measurement point. The metal adjustment screw of the potentiometer is also a place you can measure. The reference voltage to current formulea are here.

DRV8825 Current = VREF * 2   (Example 0.4V = 0.8A current)

A4988 is a little more complicated because there are different versions. See this page.

Stepper motors:

The controller is designed for NEMA14 motors. Be sure to get 4 wire motors. Just about any size should work, but I prefer to use smaller ones to keep the size and weight down. You will need to attach connectors to them.  Trim the wires to the correct length so they reach the board connectors when installed. Wires colors should be installed as shown.

The wiring legend on the board that shows where to plug in the motors might not be right. It depends on the way the motor manufacturer wired the coils and which stepper drivers you use. You may need to swap them or rotate the connectors 180° if your axes are moving the wrong way. Here is a photo of how mine are wired. Try this first. Note the wire colors and which motor goes to which connector.

Bluetooth

You can add an HC-05 or HC-06 Bluetooth module. They have different connectors, but just match the pin names on both sides. You will need to setup the module to have a baud rate of 115200, N,8,1. I have detail on how to do that here (HC-05, HC-06).

 

 


If you want to be notified of future blog posts, please subscribe.