
Taking Pictures with a DRAM Chip - sizzle
http://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwww.kurzschluss.com%2Fkuckuck%2Fkuckuck.html&edit-text=
======
ernok
I am the original author of this writeup.

Did this hack together with my brother twenty years ago (look at the file
dates)!

Strange to see my 1994 hack at #1 on hacker news twenty years later..

It was done with 64kBit DRAMs in a ceramic package. Descrambling the physical
chip layout was a pain..

~~~
zafka
This is very cool. The kind of thing I expected to find on Hacker News. DO you
still get much chance to play around now days? I wish I had done a little more
playing 20 years ago, but I am trying to make up now. Nitinol,Rare earth
magnets, Bismuth.....There are just so many toys available, and so little
time..

~~~
ernok
I think nowadays you have even more possibilities to play around then 20 years
ago. You can use a Raspberry Pi for example and do some even more impressing
things with just a few lines code of your own - building on a lot of open
source software!

I have about four RasPis lying around doing doing things which where very much
unaccessible for a hobbyist then. Just look at my current blog at
[http://µc.net](http://µc.net) to see a few (it's in german alas, maybe google
translate can help here too..).

~~~
zafka
Ha, 94-99 I worked at Siemens in Boca. RIght near the end I stared listening
to German on tapes, but alas... I am still mon-lingual. I have two beagle bone
blacks, and a multitude of Microchip PIC boards. My current job we designed in
a dspic33fj256710. OF course I have a bunch of the prototype boards waiting
for the right project... I will be off to checkout your site now..

------
ChuckMcM
Wow that brings back the memories. DRAM cameras, or "Rameras" were popular
with robotics experimenters in the 80's and 90's. From "Android Design" by
Martin Bradley Weinstein:

 _" The ramera was first developed by the Robotics group at Case Western
Reserve University in Cleveland Ohio, in 1978."_

Apparently they wrote up their work in the Sensor Group Journal. They had used
a 4008 which was only 64 x 64 pixels.

Not surprisingly this work was the basis for early optical mice which use what
is a DRAM circuit as an imager to detect motion of the mouse in two directions
without using a rolling ball. This led to a number of roboticists hacking
their optical mice into simple cameras (which was much easier than popping the
lid on an increasingly hard to find DRAM chip). That practice was then
replaced by using CMOS imagers that had been pretty cheap by the early 2000's
and of course these days you can get a camera module for a phone very
inexpensively (see the PiCAM for $29 for example)

------
IvyMike
Almost all DRAM has some amount of address scrambling--logically adjacent
cells are not physically adjacent. It can get quite complicated. Here's a PDF
that describes some of the why and how: [http://ce-
publications.et.tudelft.nl/publications/1162_addre...](http://ce-
publications.et.tudelft.nl/publications/1162_address_and_data_scrambling_causes_and_impact_on_memory_te.pdf)

I have been told that a quick way to reverse engineer the scrambling is to
shine a circular pattern onto the physical dram, then read out the data and
test common scramblings until the logical data shows the same circle.

~~~
yuhong
Yea, I found out about the OpticRAM while doing research on this.

------
TerraHertz
This was an amusing read. I'd not heard of using DRAMs as image sensors, but I
had discovered that EPROMs sort-of worked as image sensors. Back in the 80s I
was writing video poker machine games. 6502 running at 700KHz clock rate, very
simple boards using interleaved video/CPU memory access, and all graphics done
via 8x8pixel sprites, that were programmed in EPROMs. One day I noticed that
bright sunlight on a sprite EPROM (no cover label) produced on-screen garbage.
With a bit of experimenting, I found I could get a fairly decent image into
the screen. Wrote a program to generate an index mapping into the game screen
RAM, so the sprite EPROM was mapping to the screen 'about right', then found
that by programming all 1 (or 0, I forget now) into the EPROM then partially
erasing it, I could get it quite sensitive to light. I only tried hand holding
assorted crappy lenses in front of the EPROM window, and there were all sorts
of optical and electrical and geometrical artifacts. But it kind of worked.
Pity I have no photographs of those experiments. Didn't consider it anything
more than a silly amusement. Especially since I already had a nice B&W PAL
video camera.

------
bananas
One of my teachers did this in the 1980s with eproms. You could get a
reasonable 1bpp silhouette out of a 2716 and a couple of lenses out of a
broken pair of binoculars. You had to program it first then use the sun to
erase the picture onto it which meant exposure times in the order of 20 mins
on a sunny day to flip enough bits plus some figuring out of how the cells
were organised. He had one wired to a BBC micro user port with a couple of
shift registers and a BASIC program that copied the current state into video
memory. I think this was around 1986 and was probably the coolest thing I'd
ever seen at the time.

Edit: just remembered - he worked out that if you used a high power camera
flash and fired it 20-30 times it had the same effect.

------
owenversteeg
From what it looks like, if anyone wants to build one they'll need:

\- An IC (the one he used seems to be [http://www.ebay.com/itm/5-Rare-Vintage-
GOLD-NEC-044-D4164D-4...](http://www.ebay.com/itm/5-Rare-Vintage-GOLD-
NEC-044-D4164D-4164-64k-DRAM-RAM-16-Pin-IC-Cer-DIPs-Japan-/331025114689))

\- A small lens to place over the IC ([http://www.ebay.com/itm/MTV-6MM-CCTV-
IR-Lens-For-Security-IP...](http://www.ebay.com/itm/MTV-6MM-CCTV-IR-Lens-For-
Security-IP-
Camera-/170701642765?pt=US_Surveillance_Accessories&hash=item27be9c5c0d))

\- A parallel to USB cord if you don't have a computer with a parallel port
([http://www.ebay.com/itm/USB-to-PRINTER-DB25-25-Pin-
Parallel-...](http://www.ebay.com/itm/USB-to-PRINTER-DB25-25-Pin-Parallel-
Port-Cable-
Adapter-/190385076507?pt=US_Parallel_Serial_PS_2_Cables_Adapters&hash=item2c53d5b91b))

Please correct me if I'm wrong about any of these parts - I haven't tried to
build one myself.

Here's my rudimentary understanding of the pin connection: (to connect it
yourself, use
[https://upload.wikimedia.org/wikipedia/commons/b/b3/Pin_numb...](https://upload.wikimedia.org/wikipedia/commons/b/b3/Pin_numbering_01_Pengo.svg),
[https://upload.wikimedia.org/wikipedia/commons/e/e0/Parallel...](https://upload.wikimedia.org/wikipedia/commons/e/e0/Parallel_port_pinouts.svg),
and
[https://upload.wikimedia.org/wikipedia/commons/e/e1/25_Pin_D...](https://upload.wikimedia.org/wikipedia/commons/e/e1/25_Pin_D-
sub_pinout.svg) as guides)

IC-Parallel

2-1

3-14

4-16

5-8

6-4

7-3

8-18

9-9

10-7

11-6

12-5

13-2

14-12

15-17

16-25

~~~
yuubi
> parallel to USB

Last time I looked at the spec for those, it supported send-byte-to-printer-
with-IEEE-1284-handshaking as a primitive (the USB interface saw data bytes,
not instructions to set, clear, and read control lines). The parallel ports
that attached to ISA (or inside PCI multi-I/O chips) connect each pin to a bit
of an I/O address in compatibility mode[ _], which connect-a-chip-to-parallel-
port hacks tend to use.

[_]
[https://en.wikipedia.org/wiki/Parallel_port#Pinouts](https://en.wikipedia.org/wiki/Parallel_port#Pinouts)

------
owenversteeg
Watch out - the source and binary file
([http://www.kurzschluss.com/kuckuck/kuckuck.zip](http://www.kurzschluss.com/kuckuck/kuckuck.zip))
is a tarbomb.

~~~
cpach
It’s so bad UX that we even need to worry one second about this when exploring
downloaded archives. I’ve pondered writing a wrapper around tar/unzip/whatever
that will automatically extract the archive to a suitable directory, even if
there is none in the archive itself. Any day now…

~~~
Spittie
dtrx (Do The Right Extraction):
[http://brettcsmith.org/2007/dtrx/](http://brettcsmith.org/2007/dtrx/)

"Modern" gui usually provide this too - For example in KDE I have a nice
"extract > extract here, autodetect subfolder" menu in Dolphin (the file
manager)

~~~
cpach
This is the kind of task I prefer to do in the terminal. dtrx looks good!

------
fhars
Of course these days there are only few 4164 with the metal cap remaining, and
they can be as expensive as a cheap webcam:
[http://www.ebay.com/bhp/4164-ram](http://www.ebay.com/bhp/4164-ram)

~~~
3rd3
Cheap china USB webcams are ridiculously cheap by now. I think it starts at
about $2 on Ebay.

~~~
tlrobinson
I wonder what sort of interesting things you could do with a large number of
cheap webcams?

~~~
3rd3
Ha ha, there is probably some potential for a crazy project, however, the
problem is that USB hubs and extension cords are comparatively expensive.

------
sizzle
Found the main claim page: [http://dramclaims.com](http://dramclaims.com)

"You are included in the Settlements if:

You are a person or business that purchased DRAM or a device containing
DRAM;Your purchase was made anytime from January 1, 1998 through December 31,
2002;Your purchase was made in the United States including Puerto Rico, the
Northern Mariana Islands, and the territories or from a seller located in the
United States, including Puerto Rico, the Northern Mariana Islands, and the
territories and;Your DRAM purchase was not made directly from any of the DRAM
manufacturers."

Guess this is the reason some of you mentioned why the price was so high? well
I'll be damned, submit your claims!

------
jedismith
Small, cheap, and high-volume eats the world, and it's hard to beat DRAM. For
any silicon hacker, this is disruption-in-waiting: make DRAM compute. Doesn't
matter how, just do it well. Whether it be naive CMOS sensor substitutes like
this, Micron's Automata processor -
[http://www.micron.com/about/innovations/automata-
processing](http://www.micron.com/about/innovations/automata-processing) \-
(their IEEE paper is surprisingly good), or whatever you find fit, once you
hit volume production you've probably won. It's hard for standard logic
processes to hit cost-parity with this beast.

------
toxicFork
I'm also impressed by google translator!

------
vii
The technique described takes a low quality sensor (a DRAM chip with an open
window onto it) and uses it to produce reasonable quality grayscale images.

Interesting to look at the sourcecode of the Kuckoo program (before the
widespread adoption of UTF-8!) and how it uses High Dynamic Range tricks to
read off the image at different exposures.

With much faster RAM and smaller cells nowadays maybe one could do something
cool with very fast photography, but of course the faster/smaller the RAM the
more trouble interfacing with it and calibrating the light intake.

------
sizzle
so I just googled 'DRAM chip' and this class action lawsuit popped up if
anyone is interested:
[http://blog.seattlepi.com/boomerconsumer/2014/03/04/dram-
chi...](http://blog.seattlepi.com/boomerconsumer/2014/03/04/dram-chip-
settlement-consumer-claims-being-accepted-for-computers-printers-dvd-players-
purchased-between-1998-2002/)

" DRAM is a widely used form of computer memory that is found in many products
including personal computers, servers, and MP3 players. Regardless of the
brand name, most of these types of products produced between 1998 and 2002
contained DRAM chips.

“This price-fixing wrongly forced consumers and state agencies to pay more for
computers and other high-tech products containing DRAM chips,” Attorney
General Bob Ferguson said Tuesday. “This settlement will provide some monetary
relief for affected consumers.”

The total multi-state settlement is $310 million. The amount of money returned
to Washington state consumers depends on how many claims are filed and the
types of products they purchased, Ferguson said."

price fixing?! interesting.

------
pravda
I was going to comment that Steve Ciarcia did this in the 80s, and then I see
he is credited on the page.

Byte September / October 1983 Steve Ciarcia: "Build the Micro D-Cam Solid-
State Video Camera"

ftp://164.41.45.4/pub/electronics/circuit_cellar/BYTE_Projects/D-Cam2.pdf

------
enthdegree
Looks like its US Patent No. 4441125

[https://www.google.com/patents/US4441125](https://www.google.com/patents/US4441125)

