Showing posts with label DIY. Show all posts
Showing posts with label DIY. Show all posts

Thursday, January 1, 2015

Replikeo Prusa i3 Rework Build - Part 1: Unboxing

About a month ago I decided to build a 3D printer. This only left me with the task of deciding what kind of printer to build. While I had dealt with the Makerbot we have at school, I did not want to shell out that kind of money for a prebuilt, so I decided to go the RepRap route. After consulting with a friend that has a RepRap and searching around online, I came up with a few options to decide between.

Eventually those options narrowed to two. I would either build an OB1.4 printer. Or I would buy a full Prusa i3 rework kit. With Christmas break fast approaching and not wanting to forget a screw and have to wait until next semester I decided to go with the full kit from Replikeo. At the time I couldn't find too many reviews on it, so I decided now that I have it up and running I would post a few things about how it went. I would encourage others that buy the printer to do the same.


Long Story - Short 

I would recommend this kit to anyone with a little electronics and mechanical knowledge (the basic knowledge needed to build any RepRap). I got it up and running in about 4 days. Maybe 25ish hours. While I have some improvements planned, it had everything I needed to get it going. I really like the injection molded parts. The electronics look genuine. I am glad I purchased the kit instead of sourcing my own.

Long Story - Long

I ordered the "iron" 1.75mm Replikeo kit for $350. Shipping from wherever to my house in Southern Tennessee (USA) was $90. Addtionally I ordered $23 of Hatchbox PLA filament from Amazon and a Full Graphic Smart Controller from Ebay for $25. Everything came for less than $500. 

Shipping took exactly how long they said it would. 3-5 days via DHL. I think I got mine in 5 days including a weekend. Mine was not beaten up like another post I saw. I was irritated that there was no parts list but HERE is the wiki page. Now here are some unboxing pictures.
All my purchases together. Replikeo box is one the right.
Removed from the cardboard
Top removed exposing the frame
Steppers and Power Supply
ABS filament, electronics (in cardboard box), and rods protected below.
Threaded rods and smooth rods protected in packaging

I thought this was interesting. Apparently this kit was made just for me (that is my name).
Hardware and Electronics removed.
Electronics in anti-static packaging
All small parts laid out.

After getting it unboxed I took inventory of all the parts. While I did not bother to count all the small screws I estimated that I had enough of each. All the electronics were included. The one thing I would recommend is getting a longer USB A-> B Cable. The one included is tiny and inconvenient. I had one sitting around from my Arduino projects. The Arduino appears to be a "real" Arduino (or else a pretty good clone).

The injection molded parts are really nice. I don't see any of them breaking anytime soon, and it makes assembly very easy. While I would probably have used higher gauge wire on some components I am more or less pleased with it. The heated bed works well and the carbon fiber build plate is working well so far.

That is all I have for the unboxing section. Look for the next part (HERE) soon when I post pictures of the build.

-Matthew

Monday, April 14, 2014

Cheap Drill Batteries! Making a Corded Cordless Drill

This was a quick afternoon project that I worked on a few weeks ago. The beginnings were pretty simple. I was digging through the basement and found an old 12v cordless drill whose batteries had died. Being me, I decided that it would be cool and pretty easy to connect a cord to it and plug it into a lab power supply or other 12V source.


As this project is pretty dependent on the type of drill you have, I will try to include what pictures I took. Also, it is worth noting that as I type this Walmart has plenty of decent corded and even cordless drills for less than $40.

Step 1)
Take apart the battery. Determine the positive and negative leads. On mine white = negative,  black = positive (similar to wiring a house).


Step 2)
Aquire a cord. The wire I scavenged is suspected to have come off of an old vacuum. I would recommend scavenging for this project to keep costs down. I also found some banana plugs to make it easier to connect to a power supply. I considered using some old test lead alligators.

The kind of Banana Jack I used

Step 3)
Remove the batteries and wire together. I actually left some of the batteries in the casing to add some counterbalance. I then soldered on the wire, punched a hole in the case to let the wire out, and hot glued everything together.

Step 4)
Test. My next step was to hook it up to a car battery and test it. It worked! for a few seconds. Then the burnt smell.

The drill did not like being run on a car battery. There is a large diode inside the drill that I burnt out. Luckily, I found a replacement in a box of old hairdryers that we happened to have on hand.

With the replacement diode in, I took it over to a lab and tried it out. It worked fine. There was still a slight burning smell, but I suspect that may just be dust in the motor from years of non use. Overall it seemed to work ok. The video below will give you a peak at the power supply readout during testing.



Some might call this a wasted Saturday afternoon, and they are probably right. However, if you enjoy tinkering with things, making a corded cordless drill might be right up your alley.

-Matthew

Tuesday, January 7, 2014

Homemade Adjustable Breadboard Power Supply

I just finished making a breadboard power supply and decided to share it with the world. I decided to make one when trying to reset the fuses on an ATtiny as discussed HERE. I needed a 12V supply, and the 12V wall wart I was planning on using read 18V.

Full disclosure, I got the idea for this project from THIS Instructable. Furthermore, breadboard power supplies can be purchased for less than $10 on Ebay. Adafruit also sells kits. If you just want a 5V or 3.3V power supply those are even cheaper. Get a $2 MB-102 Power Supply off Ebay. However, if you just enjoy building things or want soldering practice continue reading.


This schematic is really the only reference I used. I found the LM317 in an old computer. The same for the ceramic capacitor (.1uF is one marked 104). I had the other parts. I used a cheap 10k pot I had sitting around and a 220 ohm resistor instead of the ones shown. Be sure you put the polarized capacitor in correctly and mind how you connect the potentiometer, and it's a piece of cake. I didn't use a heat sink but feel free to put one on if you anticipate pulling a lot of current.

Below are some pictures to give you some ideas.

As you can see, the power supply plugs right into the rails of my MB-102 breadboard. Double connections keep it plugged in nicely and the screw terminal allows me to plug in any DC wall wart I want or attach a barrel jack if I need to. Turning the 10k pot adjusts the output from 0V to the voltage of the input.

My mini voltmeter seemed to fit nicely, so I taped it onto a blank space.

That's about it. Now go make your own supply to power all the breadboards in your life.
-Matthew



Wednesday, November 20, 2013

Homemade PPM Encoder

This project is a spin off from my PPM decoder project. The overall goal is to translate the individual PPM signals from an RC receiver (like THIS one) into usable data that can be sent via serial, I2C, or a simple analog pin. Breaking that down, we get three smaller goals. If you have no idea what I'm talking about, read up on the subject HERE.
1) Combine the different channels into one "PPM Stream"
2) Decode this stream using a microcontroller
3) Do something useful with this decoded information

This post will tackle the first issue. To decode the signals coming from the RC receiver we first want to combine all the different channels (e.g. aileron, rudder, elevator...) into one channel. We want to do this so that later we can decode all the channels with one hardware interrupt (a single pin). 

Before you begin, you should consider your different options
1) Buy a PPM encoder ($25) - This seems to be the most popular one. There are a few others floating around Ebay
2) Buy a receiver with a PPM Stream output - Various receivers have this functionality. There have also been reports of people using satellite receivers like THIS. I can neither confirm nor deny the feasibility of that.
3) Hack your existing receiver - Funny enough, your receiver probably has the signal in the form we want at one time or another. It then decodes it to separate out the channels for the different servos. If you can find the correct place to solder on a wire, you're in business. HERE is a great write up on this. I preferred a noninvasive approach.
4) Make your own external PPM Encoder- Read on!

Now, there are several ways you can make your PPM encoder. The most complicated way is described HERE. If you choose to go that route, I will forgive you. I have no doubt that it probably is more robust and "correct" than the way I am going. The schematic is included as well as the PCB gerber files, so if you have access to all the materials have at it.

The method I am using is pretty simple. Put a diode on each channel with a pull down resistor at the end. The schematic is below.



Note that the receiver is running at a 3.3V logic level. For some microcontrollers this is not a problem; the Arduino DUE operates at 3.3V logic. However, for a standard Arduino like the Uno or Mega2560 operating at 3.3V is flaky. While it may work, fluctuations could cause glitches. At any rate, I included a built in 3.3V to 5V logic level converter circuit.

The circuit consists of 4 resistors and 2 transistors. I based mine off of the circuit found HERE. It is worth noting that there are other ways to convert 3.3V logic to 5V. I am not qualified to explain all of them, but I can say that ready made solutions are available from many different vendors.

When you combine these two circuits, the following schematic emerges.


Running a quick LTSpice simulation on it yields the graph below. Note that blue is the output on the 5V side. Red is the input on one of the channels (in real life this will be digital, but I just did a voltage sweep from 0 -3.3). Green is the voltage at the 3.3V output. Note the slight voltage drop. While this is insignificant when using the logic level shifter, it is something to note if you are using a 3.3V microcontroller.


Now to assemble it.

Bill of Materials:

  • 1 - Protoboard
  • 9 - Male Headers 
  • 6 - 1N4148 Diodes
  • 2 - 2N3904 NPN Transistor
  • 3 - 1k Ohm Resistor
  • 1 - 10k Ohm Resistor
  • 1 - 1.5k Ohm Resistor

1N1418 Diode Array

Finished Product

Underneath Side

The keen eyed observer may spy that I substituted a 1k resistor for the 1.5k, and it works fine. I didn't have a 1.5k. You may also notice that it could be made a bit smaller with a little effort. That will be work for v2. 

On the finished product picture above, the six male headers are the six 3.3V inputs. The two male pins the the right are the 5V and GND connections. The single male header at  the bottom is the 5V encoded output. Below is a picture of it connected up to my Arduino Mega 2560 and 6 channel OrangeRx receiver.



Here are the results. The first picture is the signal when all the pins of the receiver are just straight wired together. The second picture is when the signals are run through my encoder without the logic level converter.The third is the full encoder output with the logic level converter. The main difference is the peak voltage. Without the encoder, each peak is about 500mV. With the encoder, each peak is about 4.9V. All three circuits are on channel 1 on the oscilloscope. See the scale in the bottom left of the oscilloscope screen.
Without Encoder
Encoder Without Logic Level Converter Circuit
Full PPM Encoder Output
As you can see, the encoder works perfectly. Each signal is distinguishable from every other signal and is large enough to be read by an Arduino. It is ready to be fed into one of the Arduino's hardware interrupts to be decoded. To decode the RC receiver signals go to my other post, Arduino PPM Decoder: Decoding an RC Receiver with an Arduino.

Let me know if this works for you! If you have problems, comment below and I will do my best to help you. 
Matthew

Arduino PPM Decoder: Decoding an RC Receiver with an Arduino

In this post I will detail how to decode the PPM signals from an RC receiver using an Arduino. Specifically, I will decode the signals from a 6 channel OrangeRx receiver using an Arduino Mega 2560 r3 and my custom PPM encoder board that I describe HERE.

As most interested people know, the only good way to do this is with interrupts. While pulseIn will work for a few channels, more than 2 or 3 will bog it down too much to do anything useful.

Step 1
Access PPM Stream. THIS site describes what I mean by that. In short, we want to combine the single signal from the six individual pins into six signals on an individual pin. This allows us to decode all 6 channels with one hardware interrupt. That's something any Arduino can handle.

Like I mentioned above, you will need my PPM Encoder to do that (there are other options that I discuss in that post as well). Luckily, it is fairly cheap and easy to make. You may ask, "Why can't I just wire all the pins together?" In short, it doesn't work. I tried. This is because when one pin is high, five are low. Again, more details are in my other post.

6 Channel PPM Stream

Step 2
Decode the PPM Stream. As you can see in the picture above, the PPM stream consists of six spikes that we need to decode. Now, there are many descriptions online about how to decode these signals using interrupts, but I wanted a hardware independent approach. I didn't want to have to worry about my timers not working when this code is running or anything like that. For that reason, I wrote some fairly simple code that runs right in the Arduino sketch (vs tucked away in a library). I just set a hardware interrupt that triggers from a rising signal and subtract the times between each. (Read more on interrupts HERE). This of course causes a problem for channel 6 which doesn't have a signal coming after it. For this reason we have to do a few other things when we get to channel six.

HERE is my code. Look at it for yourself. It reads the values from the RC receiver, scales them to 1-100 and then prints them to the Serial Monitor. I'm not entirely happy with the way that I handled channel 6 at this point, but it works fine. I initially tried getting its value inside Spike(), but the micros() function does weird things inside it. I may revisit my approach someday, but it works for now. Though I wouldn't put anything life threatening on channel 6 (or any of the channels for that matter..). Below is an example output.


There you have it. A simple Arduino PPM signal decoder. Now you can get inputs from virtually any RC receiver and use them in your projects, library free. Hopefully you found this useful. As always, if you have any problems comment below and I'll see if I can help. If you had success, great! I'd love to hear about that as well. If you like this post, check out some of my others by clicking on a label that interests you.

Best of luck,
Matthew

Saturday, November 16, 2013

iRobot Create - Arduino interface cable

This post details the construction of a custom Arduino interface shield and cable for the iRobot Create. See my tutorial series on the iRobot Create. This cable allows the user to easily and cleanly interface with the Create and communicate with it via the Arduino Mega2560's Serial1 port.

Parts List:

Assembly is fairly self explanatory when you see the pictures. Here are a few useful charts.

Arduino Mega PinCreate Cargo Bay Pin
TX1 (pin 18)RXD (pin 1)
RX1 (pin 19)TXD (pin 2)
GNDGND (pin 14)

The chart above shows the connections that must be made. Note that Serial0 on the Arduino cannot be used without additional external hardware.




Cargo Bay Pinout.JPGArduinoMega pinout.png
First things first, assemble the protoshield as per THESE instructions.

Next, solder the ribbon cable to the DB25 connector. I chose to do it in such a way that the pins would be mirrored on both end. Note the way the ribbon cable connectors work, every other wire is connected to the top row. Really, the only important thing is that you include pins 1, 2 and a ground. Crimp the ribbon cable connector on.

Now you need to solder on some male headers to the protoshield. This is where the ribbon cable will connect.

Connect the male header that corresponds to the ground to the ground pin on the Arduino. Use the colored wire to make a jumper that will go from the RXD and TXD pins to the Arduino TX1 and RX1 pins respectively (in the picture below, it is the black and white wire in the bottom center).

Note that Serial1(TX1/RX1) must be used on the Arduino Mega (the Uno will not work without external hardware). The serial port output TXD from the Roomba/Create is too weak to drive the RX serial port (Serial0) input of an Arduino properly. This is because of the USB-Serial converter on the Arduino: it also tries to drive the RX serial port input via a pullup resistor, but the Roomba does not have enough drive to pull the RX down below about 2.5 volts, which is insufficient to be reliably detected as a TTL serial input of 0. Furthermore, using Serial1 still allows for the use of the Arduino Serial Monitor for debugging purposes. Also note that Serial2 or Serial3 could be used if selected in software.

Test your board and see if it works!

I hope this post was somewhat useful. It isn't so much of a how to as it is a description of what I did. There are many ways to do it. Really, the only important thing is that you connect TXD to RX1, RXD to TX1, and GND to GND. When you do that, you'll be ready to head back to my tutorial series!

Matthew

Monday, September 2, 2013

Simple Arduino Robot Arm from 9 gram servos

Greetings once again. I just wanted to take the opportunity to introduce you to my new robot arm. It doesn't have a name, but it is made from house insulation foam and 9 gram servos. I won't do a full tutorial on this because frankly it isn't required. There are tons of this sort of thing out there. Use mine as a starting point for your own design based on what you have sitting around. This is just one example of something that works.


For this project you will need a few things.

The first is an Arduino or other microcontroller. I suppose you could use an RC receiver or some other sort of signal generator, but I will be using an Arduino Mega2560 r3.

Next you will need two HXT900 9gram servos (or similar). These can be purchased  from hobbyking.com (what I recommend), or you can search for 9 gram servos on Ebay. They are common and cheap. I will say that the one's from HobbyKing are pretty decent quality (for a $3 servo). They aren't without fault, but you could do much worse.

For the arm's physical construction I will be using half inch house insulation foam. It is also cheap, but you will probably need to buy a full 4x8 sheet of it. You might be able to use styrofoam or foam board as well. Just make sure it is light. These servos aren't very big.

Last you will need some sort of hinge bracket. I use a part off some old plastic blinds for the base and then just a plain screw for the elbow.

First, cut two lengths of foam about 6.5" x 1". This is about the maximum length that I would use. Beyond that the servos start to get overtaxed when fully extended. Next cut the center cross beam. It is about 1.25" x 1". Basically, make it big enough that your servo and hinge will fit in between the first two pieces.

Next we are going to glue it together. Make sure your servo horn is pointed in the right direction, and hot glue it in place as shown. I use the servo itself along with the plastic blinds bracket as the joint. Again, if you are using a bracket completely dissimilar to mine, you may need to modify this. The spirit of this arm is use what you have.


Next we are going to make the other arm segment. This is about 5" x 1". I cut two of them and then glued them together to make one solid arm.

Next I screwed a screw into the center of the arm about a half inch from the end. This works as my other hinge. The metal on foam is actually pretty fluid.



Next we need to mount the elbow servo in the 1st arm segment. I cut a nice slot in the arm and slid it in. A little hot glue, and it was secured. This is a good time to go ahead and make sure your elbow servo horn is in the correct position. This is important. It will be hard to change later. Place the horn to achieve the desired range of motion.



Now cut a hole in the 1st segment opposite of the servo to create the other side of the hinge. Insert the screw of the 2nd segment and glue the horn in place once you get it straight. You should now have a completed arm without a base.

Go ahead and cut a base. I used a 5" x 5" slab of the same foam. Now just hot glue the servo of the first joint to the base, and you are good to go. Your arm is now done!

The keen eyed observer may not that this arm can't really do much. It can't rotate or pick up things. About the only useful thing I have done with it is tape a sharpie to the end. That is not the point. The point was to build a tool with which I could explore inverse kinematics. That goal is achieved.

Inverse Kinematics is another post; however, you can test your arm with either the sweep or knob example programs. Note that if you have problems, try powering the servos from an external power supply. It is entirely possible that your Arduino just isn't providing enough current.


Maybe this post inspired you. Maybe it didn't. If not, wait around for inverse kinematics(now HERE). That will be more interesting.
-Matthew

Friday, July 19, 2013

Whirly-Gig: Charlieplexing and SoftwareServo on ATtiny45

I recently completed a project involving an ATtiny45 and wanted to share it with the world. The idea came from the world of FIRST robotics. At competitions some teams have spinning banners ("whirly-gigs") above their pits to attract scouters, judges, and anyone else who might be interested. I had a friend who saw it and told me to make one for her birthday. Sounds like fun! Let's get started.

Hardware involved:

  • 1: ATtiny45
  • 1: HXT900 Servo (modified)
  • 1: Momentary Switch
  • 1: 10k Potentiometer
  • 1: 5V Voltage Regulator
  • 1: DC Power Jack
  • 1: 2 Way Switch
  • 1: 3 Battery AA Holder
  • 6: 5mm Colored LEDs
  • 3: 270 Ohm resistors
  • Wire
Software Involved
First, the ATtiny core. I have done several posts involving ATtinys in the past. Follow the instructions from the link above to use an ATtiny with the Arduino IDE.

Second, the SoftwareServo Library on the ATtiny. I have already done a post on controlling servos with an ATtiny. Find it HERE. Basically, the regular Servo library will not work because it doesn't have the necessary timer, so SoftwareServo must be used.

Next we have the Charlieplex Library. It takes care of setting the pins correctly to turn on the LEDs we will be using. I have done a post on this library as well. Find it HERE.

Last we come to my sketch. You can get it HERE. It may be a bit convoluted , so I tried to comment it to be understandable. The essence is this, there are 10 different LED modes that the user switches between by pushing a button. At the same time the servo which has been modified for continuous rotation as discussed HERE is controlled by turning a 10k pot.

I made a nice wooden base for the electronics and mounted the servo on 2 wooden uprights. The sign itself is made of dowel rods and home insulation foam cut into circles. I made it such that an 8.5 x 11 sheet of paper will fit on it when rolled horizontally.

I soldered together all the electronics. I put a 270 Ohm resistor on each LED pin. I also put a 10 uF electrolytic capacitor across the power leads and a diode protecting against unwary users plugging in power backwards, but those probably aren't necessary.

I did run into one problem in the course of this process. The servo would stop working when I set a certain LED pin LOW. I never did get to the bottom of it, but it is discussed in THIS forum thread. I ended up changing the pins I was using, and it solved the problem. I included a diagram of my pinout in the code posted above.

That's about all the details I am going to give you. The whole project took quite a while, and it's a DIY project. I'm not selling kits. If you want, you can view my project photos HERE, and I took a nice video for you to look at. I hope I inspired you to greatness.



-Matthew

Tuesday, July 16, 2013

Deer Defense System: PIR motion sensor

Today I will provide information necessary to build a Deer Defense System (DDS). The specific plans I will be using were leaked from an undisclosed source at the DoD and are highly classified. Continue reading at your own risk.

This summer has been a unique adventure at the family garden. First, for whatever reason our squash have grown huge this year. Second (and more relevant), the deer have been particularly aggressive and determined.

For those of you that may not know, in certain areas of the Southern United States white-tailed deer (Bambi) are quite prolific. What may be less known is that these deer love to eat bean plants and will tolerate eating squash, tomatoes, cucumbers, and anything else you don't particularly want eaten. I can vouch for this from experience. Feast your eyes on the destruction.

Well we explored several more traditional methods of repelling deer. We tried all sorts of smelly concoctions. Some worked until it rained. Planting garlic did not help. Marigolds and mothballs did not help. The .30-06 did not work (We didn't try. Deer are out of season. Babies). They sell motion activated sprinklers that would probably work, but they are $50 a piece. No dice.

Having too much free time, I set about making a motion activated deer scaring device (these plans weren't really stolen from the DoD). Here is an overview.

At the heart of the matter is a Pyroelectric InfraRed  sensor. Mine was purchased from Ebay for $1.98. It does work, but be warned, when I asked for the datasheet they said it was a "trade secret." Right. Several other vendors carry them. For details on how to use a PIR sensor see THIS link. Basically, a pin goes high when it senses motion.


 My sensor had several adjustments on it. I found the picture on the left that tells what everything does. By wiring up an LED as discussed in the link above, I then found the settings that worked best for me.

After getting my motion sensor working I had to decide what brains to put in it. I considered another ATtiny45 , but decided to try something simpler first. I just hooked a transistor to the output of the sensor and used it to turn on a bright LED and sound a buzzer. 


Now the biggest concern I have here is the power consumption. I am powering the entire thing on 3 AA batteries. I read online that most of these PIR sensors use about 1.2 mA while on idle. I need a way to shut it down during the day (deer eat gardens after dark). Basically I want a nightlight circuit. 

I had a photo-resistor, but unfortunately the only transistors I had were NPN. This led me to use THESE plans to turn on the power to the PIR sensor only when it is dark outside. When it is light, it supposedly uses in the realm of .1 mA. With this addition, the DDS should last a month or so depending on how often the alarm goes off. Below is a rough diagram of what I built. The circuitry on the left turns on the power at night. The stuff on the right scares the deer.
The switch is the PIR sensor
I soldered everything together and hot glued it into a nice watertight container. Now it is ready to go. I don't know if it will actually scare off the dear or not. I suspect it will not do too much. Regardless, it was a fun project. I hope you enjoyed it!

-Matthew