Blog

  • PWM output is working…

    Well, as you can guess, I got much of the PWM output working. I am now able to have variable-speed motors, seems pretty reliable, and the great part is that all the code is pretty much done.

    Unfortunately, the RX portion of the RS-232 line (both inputs COM0 and COM1 are completely blown, so I am unable to send motor commands through the serial line like I would like to. I also had a setback with the Futaba joystick, and I am getting no response. I suspect it is due to low battery, but I left it charge overnight, and I am still only getting 80% charge, and it drops quickly. Or, it could be a bad connection, like the other 27 times where the wire broke off the connector.

    Either way, something new to look forward to fixing. Like we always say at work — it looks like a hardware problem to me…

  • Serial comms and command parsing works…

    Well, I have most everything back to where I was, with the somewhat large exception to PWM output to the thruster motors. I think I have most of it nailed down, but there are a few question marks here and there. The motors are turning, but at a constant rate, and I am not able to make them variable.

    I think, with my initial code, that I used SW PWM to drive the motors. This time around, I chose to implement HW PWM. It seems much easier to implement, but I am having trouble making sense of the spec sheet, because there are so many options. I posted a note to avrfreaks.net, but no responses yet.

    Anyway, the serial code seems rock-solid, as does the LCD code, and the PWM input from the Futaba joysticks. I am real happy about that. I did run into a snag where things were resetting, but it was due to me doing bad things with pointers. Such is the case when there isn’t any STL::string class to make things bulletproof. 🙂

  • Back in the saddle again…

    Well, a long time since I did anything here. Lost the hard drive on the computer, and all of the ROV code as well. I managed to find some rogue code posted on AVRFreaks.net, but nothing close to what I had when I lost things. I also noticed yesterday many of the links to the photos referenced the wrong location, so I fixed those up. It was only two or three posts, but it was the posts which had the most pictures.

    A few weeks back, I installed WinAVR and the stuff needed to build the rogue code. Some updates according to the newer version of the compiler, and I found the lcd code I needed (thanks to Peter Fleury). There were some differences, but most of it worked out.

    Ok, this morning we had some extra time while Toby was napping, so I got the rogue code, and figured out how to get the LCD code to work again. I had to re-arrange all of the inputs to be the correct location, so I am sure I will run into more of this again later. This time, the code used the R/W line rather than delays, so execution time should be much greater this time around. The timing of the LCD screen seemed flawless. Now, if I can get the PWM input stuff to work.

  • Some EV research

    This is just a quick note for some research I did this morning.  I was googling in-wheel motors, which seem to be pretty popular in a lot of areas, and somewhat controversial, since having a wheel with a motor in it seriously increases unsprung weight.  There is some offset, as removing the engine and drive train removes a huge amount of sprung weight, you decide for yourself I guess.  Unsprung weight makes for a lousy ride and poor handling, so if you are willing to make the sacrifice, I guess it is worth it.

    So, when I was looking into regenerative braking, I ran across this study at Bradley University which shows regenerative braking in action.  The result — they were able to recapture a bit over 10% from the motor, back into the batteries.  Much lower than I had hoped.  A bit more research shows that hydraulic regeneration is much more efficient, although it is also heavier, and more expensive.

    Then I got to thinking — what if instead of an electric motor on each axle, we had a hydraulic motor?  And could the motor be moved to the sprung side of the axle to alleviate the unsprung weight problem?  It would seem to me that it would only be a universal joint away from being do-able.

    Can hydralic motors be capable of this type of performance?  How many RPMs does it take to move a wheel to get a desired MPH?  Here is a good site for RPMs to MPH conversion (just put in 1 for all of the gearing boxes). It looks like with a 15″ wheel, 1500 RPMs will reach 66 MPH, and 2000 RPMs will reach 89 MPH.  Here is a good site which describes how to size hydraulic motors for an application.  I wonder how expensive it would be?  If a single motor was used to drive and brake, it would be ideal — from both weight, and cost perspectives.

    BTW, another good link for statistics of large cars vs. small cars in crash tests report the obvious — if you drive a tank, you are less likely to get pulverized. If you are driving a microcar, if you get in a high-speed crash with a larger vehicle, someone will be likely to be picking you out of their radiator. Large cars have more metal to absorb energy, and there are some fundamental properties of physics which are difficult to alter (force=mass*acceleration – thanks to Mr. Newton). Large trucks and SUVs are also built higher off the ground — so large vs. small will result in the passenger in a large truck being situated above the accident, whereas the passengers in a micro car are basically going to take the brunt of a full-size engine block headed right for them. I noticed a bunch of links when I googled this, the Smart car got high crash test ratings, so lots of people were posting how great that is. Of course it rated high for the small/micro class rating for the car size — more proof for how to lie with statistics. Sure, small car handling is great for avoiding accidents, but once you get in one, a small car turns into a coffin with wheels real quick.

  • Baby coming soon…

    Well, it has been a while again.  Lots has happened since the last post — had our baby shower, which was lots of fun, and many of our most wonderful friends joined us, and showered us with gifts (although the point was to have a good time together).  We had a cookout, burgers and weenies (quite yummy), salads, baked beans, fruit, and an awesome teddy bear cake.  Sara’s BFF Stephanie organized the whole thing.

    So, I have since finished a dresser for little Toby – unfinished furniture from Wood You, built a cupboard for storing dry goods and such, and prepared the guest bedroom and nursery with Sara (painting, putting in shelving, etc.).  This left little time for other projects.

    I did manage to build the Brown’s gas generator, and give it a bit of a test run.  With just plain tap water, I got very little gas being produced, and a lot of reddish sludge built up on the bottom in a matter of minutes.  I used a battery charger for the supply.  I went to home depot, and bought a canister of drain cleaner, which contained Sodium Hydroxide (Lye), and added two teaspoons full, which brought the amperage draw up to about ten amps.  This caused a ton of churning within the cylinder, but no gas output at all.  I ordered some Potassium Hydroxide (Potash) from Camden-Grey in Miami, and it arrived today, but I haven’t yet tried it.  They also has Lemon Grass extract, which we will be using to hopefully trap a swarm of bees to populate our hive with.

  • WordPress is working…

    Well, due to some limitations in bblog, I decided to switch to WordPress.  The installer could use a bit of error-checking added, but once I beat my head sufficiently on the wall, I managed to get things going quite well.

    It took all day to get Gallery2 working, as there is a ton of stuff I had to upload to the server, and WS-FTP kept crashing on me for some reason.  Well, it was a ton of files, and my version of WS-FTP is pretty old.  They probably used fixed-size arrays somewhere, and I hit the limit.

    Anyway, it will be interesting to see how long it takes the spammers to try and leave trackbacks or ratings for their porn sites.  A shame that the wholesome goodness of the internet can be spoiled by a bunch of greedy jerks.

  • Smokies in the spring…

    We decide to go to the Smokies on a long weekend before baby comes.  We drove the whole way — left on Thursday after work, then left for home Monday night.  It was awesome.  We checked out chimney rock the first day, and spent the rest of the time in the Smoky Mountian National Park.  We stayed at the Cherokee KOA, which was pretty nice.  I have never stayed in the camping cabins before, but they are really sweet.

  • Wednesday AM…

    Well, up at 4 AM, so what better to do than build a power supply for my topside board. I am done by 5:30, and it works great. I had to use a 330 ohm resistor instead of a 470 for the LED, and a smaller LED, so it burns really bright. Hopefully it isn’t too much current, but I have lots to spare, so no biggie. I will have to be sure and order more low-value resistors on my next electronics order.

    Anyway, the power supply works great, and I hook up comms, and I get pretty decent output from the comms port. Hardly any garbage. I should probably re-think the power-supply circuit, as it is pretty minimal. Probably not too much noise immunity to it, but Ok enough for the lab. Once we go to batteries, it won’t get used anyway, so not too much concern here.

    Well, the next step is to verify the comms being sent is being decoded and read properly on the bottom-side board. The only way is to have the motors enabled, and I need to make noise for that, so I will put that off for later.

  • Monday evening…

    Well, not much time to work on things tonight, but I at least have a chance to re-test the topside board. It seemd to work great, and now it seems to reset a lot, and spew garbage out the comm port. Not sure what is up with that, so in the few moments I have before we crash for the night, I do a quick test — I try the board by itself, and it works great, but as soon as I plug the other board in, it goes whacky. I check the voltage, and it seems fine, so we must have a case of power supply droop, or some type of interferance.

  • Sunday…

    This morning, I attack the joystick again. There are a bunch on ebay for cheap, but the 4-channel models don’t come up for aution end in a few days (there is actually the same model I have, but 6-channel, up in three days). I take more apart, to find they sandwich the switch between two large peices of plastic, and then solder it to the board. That engineer should have gotten an “F” in maintainability design theory. So, the options are to find another switch just like it, or sind a suitable replacement. Since it is supposed to be a home project, I decide to jury-rig it with something laying around the house. I find an acceptable toggle switch, and as I suspect, the contacts which get made together on a toggle swith are opposite that of a slide switch (meaning if I wire it in pin-for-pin, down will be off, rather than the current up for off. So, I solder a bunch of wires on the switch pins, and cross the end wires from side-to side. Also to note, is the slide switch is pretty low-profile, but the part that pokes up to the user is pretty long. So, I dremel a hole which is large enough for the switch body through the lower peice of plastic, and then grind down the spacer in the top peice of plastic a good amount. In the end, the switch mounts in an acceptable manner, and I even find a decent switch washer, so it isn’t real obvious that it is jury-rigged. I can’t beleive I spent so much time on that, but I am happy with the results. It powers on and the power meter pegs to the top.

    I found that I had forgotten to mount the 1uF bypass cap between Vcc and ground on the MAX232 circuit. I was getting some extraneous characters quite often, and I recall this was one of the suggested fixes. After mounting, it seemed much worse, so I suppose I will call it a night and try in the AM. There seems to have been some issues getting Hyperterminal to work in a stable manner. It is such a POS, I can’t beleive I haven’t drop-kicked it for something better long ago. I should put that on the to-do list here shortly.