Could a Picaxe have landed on the moon?

JimPerry

Senior Member
.... The computer had 2048 words of erasable magnetic core memory and 36 kilowords of read-only core rope memory. Both had cycle times of 11.72 micro-seconds. The memory word length was 16 bits: 15 bits of data and 1 odd-parity bit. The CPU-internal 16-bit word format was 14 bits of data, 1 overflow bit, and 1 sign bit (ones' complement representation).{/QUOTE]

From http://en.wikipedia.org/wiki/Apollo_Guidance_Computer

Any thoughts/designs?
 

Buzby

Senior Member
No, it was invented 30 years to late.

But could a PICAXE do the sort of work the Apollo machines had ?, I think so.

All the details for the instruction set and memory etc. are available from the link you gave.

It would be an interesting project to build one using a PICAXE.

Let us know how you get on.

Cheers,

Buzby
 

Jeremy Harris

Senior Member
Military/space technology is pretty much always a bit long in the tooth, even when it first gets into service, as it has to undergo a lot of reliability testing post-development, which can take years.

Many years ago I wrote a 3 D trajectory calculator running on Basic on a Psion Series 3. It took aircraft airspeed, heading, wind speed and direction, altitude and weapon mass, drag and stabiliser data and predicted the water entry point of an air launched anti-submarine weapon. This easily outperformed the tactical navigation computer on the Nimrod MR2, to the extent that I could sit on board and give an accurate splash point prediction, in a fraction of the time, and with better accuracy, than the Tac Nav. The accuracy enhancement was largely from being able to include Coriolis correction and do fast math with good FP resolution, something the tactical navigation computer didn't have the computing power to do.
 

Dippy

Moderator
And, according to "The Invasion of the Moon 1957-70" by Peter Ryan, the downlink data speed was 51.2kbps and uplink data was 1200.
In answer to the question; depends who designed/made the circuit and who programmed it.... :)

I was also quite amazed as to the slowest speed that the Apollo craft whizzed along at between Earth and Moon.
All in all a gobsmacking achievement.
One of the occasions where the too oft word "awesome" really applies.
 

Jeremy Harris

Senior Member
Great stuff Jeremy, we just need to team you up with jshenfiedd (http://www.picaxeforum.co.uk/showthread.php?22178-servo-control-help ) and we can give DARPA a run for it's money !
Funny coincidence, but around eleven or twelve years ago I was looking after the SA80 upgrade programme within a bit of MoD, responsible for turning the old and unreliable L85 into the L85A2. My bit was modest, arranging the contract with Heckler & Koch in Obendorf and making sure the MoD did all the prep work needed on the old weapons that were being sent to Germany to be rebuilt into A2's, but as I'd never had any dealings with small arms it was an interesting few months. Somewhere I've still got masses of photos of all the SA80 (and LSW) components, from the time when I was trying to memorise them all (and translate component names into German to ease the task for H&K).

I was mightily impressed by the H&K factory at Obendorf, although the sight of beer vending machines in a factory making every flavour of small gun known to man seemed a bit out of place.............
 

hippy

Technical Support
Staff member
It's very hard to compare as the Apollo computer was specifically designed for its job and had an architecture suited to that. An alternative architecture might easily need to be larger or a lot faster just to do the same because it would do things differently.

In modern terminology it was 16-bit, had 4KB RAM and 72KB ROM, so not quite as minimal as it's often portrayed. With an architecture suited to what needs doing, a whole gang of smart people who can think optimised assembler and you can squeeze an awful lot into that. Early PIC16C54 had just 25 bytes of RAM, just 896 bytes of program memory and it's surprising how much could be done with those.

I think you have forget how they did it and ask that headline question "Could a Picaxe have landed on the moon?" - That then leads to what was the Apollo system actually doing, what would a PICAXE have to do ?

If one takes it that a PICAXE and comparable micros are all general purpose computers, not designed to withstand error conditions and adverse events then the answer is perhaps automatically, no. Discount the difficulties of space flight and I'd say, possibly.

Rocket motor, two servos, an ultrasonic distance module and a stop button. About 20 lines of code :)
 

srnet

Senior Member
No, because a PICAXE uses BASIC.

Thats not my thoughts, but an approximation of 'opinions' from 'experts' when you explain to them that you are planning to put a PICAXE into a mere Earth orbit.
 

KeithRB

Senior Member
"Digital Apollo" is a good read on the design and evolution of the system.

One of the requirements was that even after a reset, the Apollo computer could pick up and continue right where it left off. (This happened several times during the "too much data!" alarm.)

That might be tough with a modern PIC.
 

Jeremy Harris

Senior Member
IIRC Apollo used a fairly standard military aircraft type radar altimeter, together with a ground doppler radar sensor virtually the same as that used on helicopters for auto-hover.

Using core memory gave them the ability to recover from a reset, because it's inherently non-volatile. To do the same with a Picaxe would probably mean sending every critical bit of data out to EEPROM to be stored each time around any loop, which would fairly quickly hit the EEPROM write limit I think.

My first contact with mini-computers was with Elliot 920B "suitcase" computers, recovered from the ill-fated TSR2 project and re-purposed for another military task. IIRC these were broadly similar in capability to the Apollo machine, around 8k of core memory and logic gates made up with discrete transistors and diodes. The core memory always amazed me, as each bit of storage was a delicate little hand-wound toroid, with hundreds of these toroids assembled on large boards.

Certainly the Picaxe would be more than capable of doing everything the Apollo computer did, and unlike the Apollo system (which was heavily restricted by the size and weight of the components) it could easily incorporate a lot more redundancy and error checking to get the required reliability. Using a three parallel system approach, with different code (doing the same thing) running on each, together with frequent error polling, should get a system that would meet the fairly tough reliability requirement. The weak points would be the common code in the interpreter and the common silicon, but given the fairly simple (by modern aircraft control standards) requirement it should be possible to do 100% testing, something that's now virtually impossible for an aircraft FMS, due to the high code line count.
 

MartinM57

Moderator
Using core memory gave them the ability to recover from a reset, because it's inherently non-volatile. To do the same with a Picaxe would probably mean sending every critical bit of data out to EEPROM to be stored each time around any loop, which would fairly quickly hit the EEPROM write limit I think.
A microcontroller with FRAM technology internal RAM would be the modern equivalent I suppose - I wonder if anyone makes one? There's probably a few issues around startup/brownout/power down to be addressed to guarantee it restarted exactly where it stopped
 

Colinpc

New Member
Using core memory gave them the ability to recover from a reset, because it's inherently non-volatile.

.
I was under the impression that the core WAS volatile and therefore required refreshing at a fairly high rate.

I have a few boards with core memory and always wonder how they managed to run those untra fine wires.

Fred
 

MartinM57

Moderator
http://en.wikipedia.org/wiki/Magnetic-core_memory

...Core memory is non-volatile storage – it can retain its contents indefinitely without power. It is also relatively unaffected by EMP and radiation. These were important advantages for some applications like first generation industrial programmable controllers, military installations and vehicles like fighter aircraft, as well as spacecraft...
 

Jeremy Harris

Senior Member
Yes, core is non-volatile, but has the unfortunate attribute of needing a destructive read - reading a bit resets it, so to read without altering the stored bit you need to read then immediately re-write each bit, slowing down the read cycle time. IIRC, the 920B took several µS to read each 18 bit word (it could do parallel reads from memory), so was pretty slow by even the slowest Picaxe standards. It was a RISC machine though, as I recall there were only just over a dozen or so instructions in total.
 

Paix

Senior Member
I do remember Intel advertising some of their early static RAM chips in the early 1970's, comparing the bit or byte price with that of ferrite-core memory and busting the $1 bit(byte) barrier. Sometimes I wish that I had hung onto that glossy leaflet.

Ferrite-core memory was relatively environmentally temperature constrained IIRC?

I do remember many years later being the operator in charge of a DEC KI-1070 (PDP6) and watching it's amazing recovery after a brief mains failure. Impressive, as was the size of the cabinet containing the 256k word (36 bit words) of core memory. Around 9 kilo bits . . . Times have certainly changed.
 

Jeremy Harris

Senior Member
Ferrite-core memory was relatively environmentally temperature constrained IIRC?
Yes, it was. The ex-TSR2 units we had were used in a lab that had a pretty poor heating system, and in cold weather they needed to be warmed up a bit with a hot air gun to get the memory to work reliably. They were designed with core heaters to warm them up a bit, I believe, but for whatever reason one of ours never seemed to like cold mornings without a blast of warm air first; bit like me with the morning cuppa, really...............
 

hippy

Technical Support
Staff member
Rocket motor, two servos, an ultrasonic distance module and a stop button. About 20 lines of code :)
Can you provide a datasheet reference for an Ultrasonic distance module that works in a vacuum ?
An SRF05 is only good for less than 5 metres so it's perfectly accurate for all but 0.0000013% of the mission and that's too trifling to worry about. The moon's pretty big so they should see it coming and they've got that stop button.

I remember playing the original Lunar Lander game on a DEC GT40 graphics terminal. It was always a tough choice as to play it properly or see just how deep you could bury a LEM into the lunar surface ;-)
 

KeithRB

Senior Member
And in *every* case, the astronauts took control away from the computer and landed the LEM manually, though the computer was perfectly capable of landing the craft.

One problem with the picAxes is getting a Real time operating system that has priority scheduling. You might need 9 picaxes, one as the exec and the others running the tasks.
 

Jeremy Harris

Senior Member
An SRF05 is only good for less than 5 metres so it's perfectly accurate for all but 0.0000013% of the mission and that's too trifling to worry about. The moon's pretty big so they should see it coming and they've got that stop button.
Except for one small problem; the moon has no atmosphere, so sound waves of any frequency cannot propagate.....................
 

Dippy

Moderator
I could see Jeremy waiting to pounce there... typing his answer as fast as he could. ;)

I think what Hippy meant was that it would be a good idea to put some long prongs on the LM feet.
Then have it wired to a "contact light".
I bet they didn't think of that!
 

hippy

Technical Support
Staff member
More that for all but the last 5 metres the ultrasound module will be reporting the moon is more than 5 metres away and be entirely correct.
 

Buzby

Senior Member
So the conclusion is, after forty years of progress, we have a chip that could land a rocket on the Moon, but can't do LET X = ( 1 + 2 ) * ( 3 + 4 )
 

KeithRB

Senior Member
The *Chip* can easily do it, it is the interpreter that can't. It can't do Let X = 2.71828 ^ (sqrt(-1) * 3.14159) either, so I am not sure what your point is.
 

Kecked

Member
Hardening a micro is not as simple as you think. If you use the wrong shield it can actually do more damage. For example you might use copper for a shield but what happens when you get hit by a cosmic ray....it emits a shower inside the copper of high energy x-rays that then impacts the silicon. It might only flip a bit or it might blow a junction. Point is a shield isn't always a shield. They have to do multiple layering and the best shield is the design itself. Spaceflight silicon is not ordinary silicon in material or design. This is why it costs sooo much to make a satellite.

Amateur radio enthusiests have launched some satellites in orbit and it has been found that the electronics can suddenly die and quickly. The environment in space is rather nasty. Even in orbit you have the earths maganetic field accelaerating particles to high enrgies and voltages.

PS: beleive it or not water is one of the best shields!
 
Top