Thursday, May 1, 2014

One Last Post

This will be the last blog post for the Alfred project. To begin, here's a little history:

  The project idea was conceived god knows how long ago (3 years?)  and started first semester my freshman year, Fall 2012. I had originally joined so I could learn Arduino and robotics wasn't totally foreign to me since I did FIRST all throughout high school. After a year of casually participating I decided to pick it up over the summer since I wasn't doing anything else. After this, I got roped into being the project lead since everyone else quit and I didn't want to be the one to leave the project to die.

What went wrong:

  A lot. For the first semester (of my tyranny), we had no money due to administrative issues. There was good deal that needed to be fixed that needed new parts so most of our meetings were us sitting in EHC doing absolutely nothing. Once we did get funding from the school, there wasn't nearly enough time to finish for the Accepted Students Day deadline.

And now this is the end. Most of us have lost interest in the project and have found other things going on. The remains of Alfred will stay in the EHC closet for the foreseeable future until another ambitious freshman wants to take on the project.

Eric Oswald


I was told by some of the leaders to elaborate a little more so I'll give it another shot.

  When I was handed the project, Alfred was kind of in a wreck to no fault of my predecessors. The previous year involved quite a bit of rushing as well. This is some of the stuff I did in the past two semester.

  To start, the motors were directly mounted to the top of the base plate with a wheel keyed onto the end of the motor shaft. Because of this, the weight of Alfred would apply a torque onto the motor shaft and occasionally lock up the motors which I would have to rebuild every so often. So the first plan of action was to redesign the entire drive train system. Hopefully into something that actually had bearings and gears and stuff. This final design could be seen on our last blog post. The fatal flaw for this design (which was finished earlier this semester) was the motor selection. These motors where lent to me by a friend of mine who had no other use for them. Little did I know these were actually spindle motors, like for CNC machines. That basically means they are the kind of motors that are meant to be spinning very fast before applying a load to it. In the application they were used for in this case, there was already a load applied to it (the resulting torque from the weight of Alfred) before it started spinning. Needless to say, the motors weren't very happy with us and usually needed a push before starting and even then they didn't cooperate.

  As far as the drink dispensing system goes, that was also in need of renovating. The system was set up so that there were four 2-liter bottles that lined the bottom of the front panel of Alfred. In each bottle was a hole drilled at the bottom with a hose feeding into it and a hose coming out of the mouth. The idea was to have tank of compressed air shoot air through the bottom of each bottle and the result would be liquid shooting out the top which then gets fed to a contraption that puts said drink into your cup. Don't get me wrong, it worked. The only probably was how were you supposed to refill the drinks especially when everything was sealed with some magical FDA approved silicone caulking? The new design was to have the two hoses going into a modified bottle cap, leaving the bottles themselves untouched. The idea is when air gets shot into the bottle, drink would also shoot out the top. It worked when we tested it but we didn't have time to add it to Alfred. Don't ask me why we didn't just flip the bottles upside down and call it a day. I still don't know the answer to that.

  Since we weren't going to have time to finish the drink dispensing system for Accepted Students Day, the night before we went to Walmart and bought an RC car and a Nerf gun. We hacked apart the RC car and used the remote to control Alfred since we were most likely going to run into problems with Bluetooth interference with crowds of people and RC cars are kind of made for that. The Nerf gun was a substitute to the drink system so Alfred wasn't just a black box with a limp. We made it controlled by one of the buttons on the RC remote in addition to making an Android app for everything that worked over Bluetooth. On the tablet, we also made it box peoples' faces in red and say something along the lines of "Enemy Detected" on top. While we were at our table at Accepted Students Day with EHC, we also implemented the RPI-RFID reader (another EHC project) by having it unload the entire magazine onto anyone who swipes their student ID. Everything was exceptionally silly but actually a lot of fun.

  And that's the end.

Saturday, March 29, 2014

Alfred the Butler Bot
What we are up to.
Over the last semester we have begun finishing up our design and are building the robot. We have a drive train now. We are using two motors for independent control of the robot. Two solid states relays are used for powering the motors from the battery. We were originally working on making the robot line following but now we are going to make it move randomly like a Roomba. Drink dispensing uses a Galaxy Tab with facial recognition in it to stop and serve people drinks.
Things are under a time crunch and we are rushing to finish everything by Accepted Students Day on Saturday.

Thursday, August 1, 2013

So here is the new and improved H Bridge. It's been tested and works perfectly (First try!):

I also decided to color-code the wires this time since it actually works. One thing that I had to do though was take apart the motors and kind of smack the axle with a hammer on either side and re-grease them with white lithium grease. This is because the way we have the motors mounted on the base plate applies a torque on the shaft and forces the bearings to freeze up. Before I mount anything back on I need to design a new drive train to reduce the torque on the motor shafts. So yes, that does mean the driving of Alfred will be delayed again but this should be a much simpler issue to fix.

As of now, I am also working on getting Alfred to line follow. Since I have no knowledge of vision processing I am going to try to get it working by using four cadmium sulphide photocells on the bottom of Alfred just to get a stable version done as soon as possible. Then I can work on the more advanced stuff. This shouldn't be too hard to do considering there is a ton of documentation and code on how to do this available for the same project in RPI's IED course.

Oh, and duh, I will also need to whip up another one of these H Bridges for the other motor so I will also be occupied with that (these are very tedious). Hopefully I can get a good portion of these things done for my presentation Tuesday.

Monday, July 29, 2013

Today was a good day. Alfred is going to move! I'll let you see for yourself:
Some of the problems I ran into and how I fixed it:
-Heat-sinking. I needed to heat-sink the P channel MOSFETs because they were getting too hot and started smoking. I just soldered a piece of copper to it.
-It turns out the N channel MOSFETs I was using required a greater gate current than the Arduino was producing. I replaced them with logic level N channel MOSFETs.
-The NPN transistors were pulling too much current from the Arduino. To fix that I just put a 1K resistor between the pin and the base of the transistor.

So yeah, once I fixed those issues the H Bridge started H Bridging. I plan on getting this on a perfboard and installed in Alfred as soon as possible. Now to start figuring out how to program line following...

Thursday, July 25, 2013

So I haven't blogged in a while because I really wanted my next post to be a success story but I really should post all the failures because you learn just as much from them. So here we go:

What I've learned from my earlier H Bridge failures is I can't use 4 N Channel MOSFETs like I was doing without something called a high side driver. Basically, the source of an N Channel MOSFET needs to be directly connected to ground. In my H Bridge design the source of the top two MOSFETs led to the motor and then the bottom MOSFETs. In order for that to work I would need to drive the top two with a higher voltage using a high side driver. In order to fix that I would need to replace the top two N Channel MOSFETs with P Channel MOSFETs. Also, to protect my MOSFETs from voltage spikes when switching (which have destroyed a few of my MOSFETs) I would need to use protection Schottky diodes (just diodes that switches very fast) on the MOSFETs with the cathode at the source and the anode at the drain for the P Channel MOSFETs and vice versa for the N Channel MOSFET. So that design will look a little bit like this:

^^don't mind accidental gate wiring error (crossed)^^
or this:

...which better illustrates where the problem in this design was. See, since we are using P Channel MOSFETs now, we need to use pull up resistors instead of pull down, and if the Arduino were to come into contact with that 12V wire it would destroy the chip. So now we need to use NPN transistors to ensure there is no direct contact. It'll look like this, except on both side sides:

or this:

However, it doesn't spin the motor and now I'm have this problem where the P Channel MOSFET that's getting power starts smoking which I assume is bad. I'll keep updating if anything changes. In the meantime I've been learning Java in preparation for getting the line following to work which is also why I haven't been posting too much. Anyways, back to work.

Update: So I was looking at the breadboard in the above picture and realized I wired something wrong so I changed that and tested it. Now instead of smoke, nothing happens. I guess that's better but I would really like for the motors to spin.

Wednesday, June 26, 2013

New Circuits

The last H Bridge I blogged about didn't work at all. I made a new one that I believe will work now. The reason I say this is because in my last H Bridge, I left the MOSFETs floating (I forgot to ground the gates) which was a big mistake and I accidentally switched source and drain. In the top two MOSFETs, drain should be connected to 12V+ and source feeds to the motors. In the bottom two, drain is connected to the motors and source to ground. This is the way it should be. I had completely backwards. Oops. So here is the new H Bridge:

As you can see I also lost the inverter because since the gates will receive a PWM signal, the MOSFETs that I want to be open will be rapidly closing and opening unless the duty cycle is 100% or 0%. That means I need two signal wires; I can't use one. This H Bridge will be tested soon. Also, I put all of the solenoid controllers on a perfboard and those have been tested and work well.

I will get to testing the H Bridge soon and post results.

Update: The motor worked slowly for a couple seconds and then stopped. Currently figuring out why it stopped. No sparks or signs of broken components/short circuits. This is the only H Bridge I made that actually worked so far. I consider this progress.

Tuesday, May 28, 2013

Reconstruction: A New Beginning

I know it's been a while since the last update but, you know, finals and the ends of the semester. However the summer semester for RCOS started a week ago (today was the second meeting) and I'm starting to get back into rhythm. And yes, I will be the only one up here of the group so we'll see how it goes.

Now to get you guys updated:
After careful analysis of possible issues that may have occurred during the Night of Transistor Smoke, I may have come to a conclusion. When designing the H-bridge, we rated our MOSFETs for 2.7 amps, the free current rating of the motors we bought. However, the actual current that the components need to be rated for is the stall current, which is the maximum current the motor will take when it's applying it's maximum torque given the load it is under. This is 133 amps. But as much as I would love to say I solved the problem, the motors weren't given a load when we were testing so I'm kind of hoping these new 150 amp MOSFETs do the trick, and yes, you heard right, new MOSFETs from Newark. These guys were even nice enough to give me a personal call to make sure I got everything okay. Classy. Check it out:

I also decided to buy a couple inverter ICs just so everything can run off the same pin from the Arduino. Now, ladies and gentlemen, for the moment you've all been waiting for *cue drum roll*:

I know, it looks sketchy, but perfboards really hate 14 gauge wire and i just wanted to be safe this time. Anyways, I just need to solder on some battery leads and we're good to go (for now). I do in fact plan to get a custom board printed because when I say perfboards hate 14 gauge wire I mean they really REALLY hate 14 gauge wire. Plus I don't trust the fine traces with up to 133 amps so I soldered them thicker as well. So I guess that's all in the world of motor controllers for now.

Other things to be done in the not too distant future:
-Find suitable base-plate for Alfred
-Tune drink dispensing system

These items are planned to be done by the end of this week so stay tuned. For all you RCOS folks, I apologize for all the hardware but when this is done there will be a lot of Arduino code and Java coming your way.