Introduction from 2001:
controlled RC car, CPU interfaces with controller with a bunch of switching
transistors. Can preprogram course of action just like a NASA interplanetary
probe. May add feedback circuit later on if I can have the necessary radio
Update(051601) on the computer controlled
RC car, it is done, the documentation is also done, just needs a little
organizating and uploading before you can see how it was put together.
It has worked for a couple of months now, but due to lack of input, all
the CPU can do is either control the little RC car wirelessly in a preprogrammed
course or generate random movements. As you might have guess, this gets
old quick. Unfortunately, due to the size of the slave vehicle, it is difficult
to provide realtime telemetry. So I cheated on the implementation in feedback.
I put a light source on the vehicle and added a light sensor to the base
station. In a dark testing environment, when the CPU sees light, it knows
the vehicle is close by, and can then control the vehicle accordingly.
As of last night it controls the car only on one axis: come closer if you
are too far, and back off if you are too close. Experimentation yielded
an acceptible equilibrium where the vehicle will hunt around, moving closer
and then further until it reaches the acceptible position.
Update update (052101) The light hunting algorithm
has been improved with a little fuzzy logic, instead of moving a fixed
amount until the optimal distance is reached, it now knows how far off
it is and adjusts its movement accordingly. i.e. instead of going back
and forth with the intelligence of a thermostat, it now applies just the
right amount of movement until it get there and stays there. Less fun to
watch it run but it is easier on the batteries. One problem with fuzzy
logic though, instead of stopping at precisely the exact place, it seems
sometimes decide "arhh, that's close enough, never mind the details" and
stop very close to the mark but not quite there. I'll upload some graphs
later to explain better. At this stage, I have to decide whether to let
the program know it can also do turns and implement that or stay with one
dimension and make the thing learn about fuzzy logic by itself, and see
if it will evolve it. And as my buddy has suggested, it's probably time
to migrate the whole thing to a laptop PC rather than sticking with the
More elaborate algorithm to come, as the goal is to
have the car wander around a two dimensional plane and be able to figure
out by itself where it needs to go, how to get there, and if the AI is
there, learn from its own experience. All with just the feedback of one
single photoresister. The Holy Grail would be to have the machine learn
a la WOPR/Joshua in "War Games," i.e. being able to learn from experience
and spontanously attempt to apply learned knowledge to other topics. (Maybe
even teach its creater a thing or two.) One thing is certain, I don't want
a HAL9000, let it learn, let it make philosophical decisions, but three
basic laws or not, thou shalt not kill thy creater.
It was designed for a loud-music-junkie pal of mine who
had so many amps hooked up to his battery / charger it kills the both of
them without something like this. The system monitors the discharge rate,
and for now, when it notices the voltage gets too low, will turn on the
charger until the voltage indicates the battery is fully charged.
The system uses a home brewed optical coupler to monitor
the battery voltage and protect the Apple IIe. And a
Triac to turn the
line voltage on and off to the charger. (I built the
circuit to flash "marry christmas" in morse code with the christmas
lights last december. It works with any 110V appliance up to 6amps, that's
like 600+Watt, plenty.)
An easy software upgrade would be to use simple linear
regression to predict when the battery will die at the current discharging
rate. To enable it to see dimly into the future, so to speak, so it will
turn on the charger before you even know it was needed =) For the same token,
it will then be able to tell, at the current charging rate, how much longer
until the charging will be done. (That one shouldn't be linear tho, but
if we let the apple do it repeatedly at small time intervals, we'll still
have a pretty good estimate.) Yeah, I could use all them fancy algorithms
I learned in econometrics and multiple weirdo regressions to let it really
crunch the future, maybe later.
I say easy because the code now already
on the screen the charge/discharge rate. The computer just doesn't
know it has access to the curve yet. (Right now it just plots it one point
at a time.)
Oh yeah, this is one of the first projects of Pang Industries.
Again, it is just a prototype, once I can work out the requirements to
replace the apple's job with a cheap microcontroller, then we might see
this on sale.
Advanced Model Railroad power supply.
To our new friends at the awesome
Historical Railway Society,
here are the files that I have for a
transistorized power supply / speed controller -
the Cooler Crawler
by Ken Willmott and Rich Weyand. The reason this controller is different,
maybe slightly safer for kids, is because instead of turning a lever
to set power level valve style, you would control the speed
like one would on a cruise control in a car. A push button will
allow you to hold to increase speed, when you release it it will
more or less stay at that speed, a second button will decrease
the power / speed. A cancel / emergency stop that will cut power,
and a switch for reversing direction. Since you cannot just slam
a lever to max, you have to press and hold a button for the speed to gradually
pick up, it actually performs more like a real heavily loaded train.
I will do a write up on my implementation
and my understanding of how it works in a few days.
Here is what they say on trains.com
The circuit provides some pretty precise control.
And hopefully I can have some other useful designs too I/O wise,
like the IR and WiFi ideas we talked about.
Thanks for your hospitality and letting Nathan and Willie
play on your layout for so long.
Interesting side note: The components used in this project
was sourced from the
Mike Quinn Electronics,
shortly before the place was closed.
There is a reason why pretty much all manfacturing of gadgets
(along with the skilled jobs with it) are moving overseas.
What once was the supplier of the digital revolution, experimentation,
and innovation is becoming an endangered species.
Unless noted otherwise, graphics and text and designs are all Copyright (c) P A N G Industries.
Trademarks are the properties of their respective owners.
if you claim ownership of content and wish to have them removed.