Skip navigation

Category Archives: Tech

first of all, i got this idea from http://jethomson.wordpress.com/2010/02/21/diy-usb-to-serial-cable-for-3usd/.

today, I got the last of the parts to build an arduino clone and the serial cable that is used to program it.

The cable includes ground, TX, and RX, which are the minimum needed to control it.  I added another wire so it can use usb power.  It then looked like:

the other end was also simple.  I just soldered the wires to a female header socket and covered it in electrical tape:

the boarduino was also simple, I built the power section and then did the rest: it lights up!

then i built the rest, the blink program was pre-loaded:before i put in the chip

I have blinking lights!

next: my evil coilgun.

Advertisements

I built a board to hold an LCD and the parts to control it.  I started it over a week ago, and finished it today(I forgot about it).  it uses the shiftreglcd library and a 74ls164.  To save one I/O pin, the design included an AND gate made from a diode and resistor.  The board reduces a complicated LCD to data, clock, power, and ground. This will keep me from having to make a whole circuit when I want an LCD in my Arduino projects.

lately, I’ve been working on turning a line following robot into one that is controlled by an arduino.  I took out the main board and line following sensor, as they did not work.  I replaced one of the dual AA battery packs with a 9v to power the arduino, and left the other to power the motors.  I installed a switch between the 9v battery and the 2.1mm jack for the arduino, and hotglued it in.  I have ordered a l293d motor driver on eBay, and this will soon be controlled.  I wil but the l293d in a board, then hotglue that board in, below the arduino’s platform, with a female header breaking out the necessary control.  I also ordered a boarduino, which may be optimul for this project.

i got the temperature sensor i bought from sparkfun a while ago working today.  One site I found recommended a 2.2k resistor, but i found 8.8 worked better for me.  I found this by running the demo sketch in the library(in the arduino playground), and fiddling with a potentiometer.  When I got values roughly consistent with another thermometer, I measured the value of the pot’s resistance between the output and 5v(I did not connect ground, so it was not  acting as a voltage divider.  I then connected 7 resistors in series to match this, so a twisted pot wouldn’t corrupt my measurements. it is accurate(within a degree or two), and i hope to make it better.

after an hour of messing with code, I was able to get a simple demo working with a parallax ping and a servo.  This is for a self navigating robot.  When there is an object within 2 feet of the robot, it will stop.  The servo will then rotate, scanning the PING))) sensor, telling which paths are open for travel.  The robot will then choose the one that is closest to its destination.  I have only been working on getting the servo and PINg to work, and another group of people are working on the GPS.  No one has worked out the motor control for the robot tank yet.  I will post the code if anyone asks.  This was composed without access to the internet.

Today, I followed the guide at http://www.arduino.cc/playground/Code/LCD3wires on using a shift register to conserve pins when using an arduino.  As a standard HD44780 LCD requires four data lines, an enable line, a read/write line, and a register select line, it would use at least 7 of the arduino’s 20 input/output pins, some of which you will be using for other purposes.

The board is simple, with half a dozen of the LCD’s 16 pins going to power and ground, for logic and LED backlight power, as well as contrast, although in some conditions you will need a potentiometer for it(pin 3).  The first time I tried to build this, it didn’t work, probably because I used the wrong IC ( I just got 10 74HC595’s from eBay around the time I ordered the LCD).  I used the example that came with the LCD3wire library rather than the example on the site.  I am planning to migrate this to the 74ls164, for which an easier library exists and which uses one less pin, or the 74hc595, which I have more of, and works the same way.

The program displays a random fruit on the first line and the text “Score: 6/7” on the second.  The code needs to be modified so that lines = 2 for a 2 line display(obviously).

Today, my mom had to return something at Home Depot.  She sent me inside, saying I could use the refund to get some stuff.  I remembered an instruction at http://kennethfinnegan.blogspot.com/2010/01/switching-120vac-with-5v-digital-logic.html and got most of the parts. I could not find the terminal block, but that can wait.  MY main problem is that I do not have a 5v relay, I have a 12v one.  If I had to feed in 12v, I would also need to keep my wall wart handy, and then I wouldn’t be doing anything but following instructions.  So I decided to make a 12v wall wart part of the project.  I just have to hook up 5v and ground to control it.

I decided to do this because my relay is 12v and I therefore would need to always use the 12v wall wart for it.  I put both in a gang box, added a transistor and a resistor, wired them to the outlets and power cord and was done.  I followed the original instructions, but where they said +5v I put in the 12v, and added wires to connect the wall wart to power.  This has the advantage of only needing to connect 2 wires to the arduino as well as only drawing the power needed to control a transistor.  The disadvantage is that it has to be plugged in to test the relay.  I only got shocked two or three times while making this.  Total cost under $15, I had most of the parts on hand.

this is three main parts: the relay board, the power outlet, and the wall wart.  power cord from an old computer.

Yesterday, I went to PVIT, an engineering club at my School.  WE were working on an arduino robot, and were trying to wire up 2 h bridges to it.They would take 4 pins(1 pwm) each normally, but as our project also was using a GPS module, limit switches, an ultrasonic sensor, and a servo so far, we decided to save pins.  We were setting it to go in forward and reverse, for forward, the 4 pins on the h-bridge had to be fed 100(PWM) and for reverse 01(PWM)0.  THe pins that would occasionally need pwm would need thier own pins, but the others were as simple as an output and a NOT gate.  Not having any IC, I built a NOT gate out of a 2n2222 transistor and 2 resistors according to a diagram I found on http://www.kpsec.freeuk.com/.  I tested this with LEDs, and have drawn a diagram of it for next week’s meeting.

Today, I soldered together a new shield, this one has a switch, shift register, and 7-segment display so far:

I already had a few shields soldered together.  The first has 5 LEDs, a reset button, and a button:

the next has 2 buttons, 3 LEDs, a switch, anda allows access to the reset button and half the pins:

the next has soldered on perfboard with a dual 7-segment display, only half used:

I also had a protoshield from adafruit with a mini breadboard:

This was going to be a minishield with a shift register and a bargraph, I never got around to finish it:

This one was supposed to be a 3×3 led matrix, something must have shorted:

I was trying to breakout an LCD, it should wotk but it uses an uncommon, older chip so I haven’t tried it:

And last, a bunch of stuff I soldered together.  These include a piece of perfoard with headers and a desoldered transistor, a switch, a dip switch that kept popping out of a breadboard, a piezo buzzer, and a few other things:

most of these things work, after re-soldering.  The transistor was salvaged from a batter batter baseball” toy I found, along with several others.  I used it to control the relay in my earlier post

these are some random electronic sculptures, I made them using leftover/ unusable parts and scrap pcbs.  The first one I made is a person, based around a DIP switch.  I tried to solder it into a pcb with some pullup resistors for use in breadboarding, but it didn’t work.  So I built something with some resistors from a hundred pack, an LED with short leads, and a scrap of pcb:

I made several more of these for friends and family, but do not have photographs of all but one:

last, I made a fighter jet, using a free serial port, 5 LEDs I got for 5 cents each, 2 unmarked TO-220 transistors, a few resistors, a DIP switch, a photocell, a switch, and a few resistors on a custom-cut pcb (took a while).