Studio Contrechoc

design & textile & technology entries

Monthly Archives: November 2009

Attiny 44, just some questions reading the sheet

Question:

page 4: The AVR core combines a rich instruction set with 32 general purpose working registers. All 32
registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent
registers to be accessed in one single instruction executed in one clock cycle.

page 7: Instructions in the Program memory are
executed with a single level pipelining. While one instruction is being executed, the next instruc-
tion is pre-fetched from the Program memory.

page 8: Answer?

The fast-access Register File contains 32 x 8-bit general purpose working registers with a single
clock cycle access time. This allows single-cycle Arithmetic Logic Unit (ALU) operation. In a typ-
ical ALU operation, two operands are output from the Register File, the operation is executed,
and the result is stored back in the Register File – in one clock cycle.

page 13: sleep is not delay() ? really waiting for interrupts?

page 15: The Flash memory has an endurance of at least 10,000 write/erase cycles.Β  why???

page 16: The EEPROM has an
endurance of at least 100,000 write/erase cycles. why the difference?

page 18: /* Wait for completion of previous write */
while(EECR & (1<<EEPE))

how is that possible, to start a write while a write is currently running, interrupts are disabled?

LINKS:

for a few examples in assembly:

http://www.avr-asm-tutorial.net/sitemap_en.html

Ok first I looked at ASSEMBLY.

Then I did a debugging in AVR studio of a simple example, simulating is nice!

Question: can I simulate input of a text or CHAR to test my modified ECHO code?

(YES! you can change the registers by hand during Debugging. EEPROM can be inspected too!)

What is the function of the WATCHDOG timer?

Is a timer not just a counter? Is the difference with normal counting the possibility of setting an INTERRUPT?

Advertisements

Something Big

work in progress,

in fact I already made furniture and stage design objects. I did all by hand and saw. First with the help of tools, later on I discovered that a handsaw was more precise, and more gentle for the wood. But ShopBot is even more precise. Since I had made the geometric shapes, I looked for a model with an organic look, but staying in touch with the five sided forms I am usually working with. I found the basic model for this organic look in former sketches, it is the cut-out in the scale model chair made in the press-fit assignment.

I made this model in BLENDER, I add a few pictures, and I add pictures of my furniture at home. There is also a double pentagon table, which enlarges my room, because the pentagon creates an extra perspective illusion.

This chair cannot be cut by Shopbot I think, because it has oblique crossings?

This shape could well be done by the shopBot, but I did it all by hand! (Height = 160 cm)

This last chair was designed for a theater play in France. It is called “Nihil est sine Causa”, or “nothing is, without a cause”. Of course Heidegger turned this around: being is that which has a cause. This is why I choose this title.

Well then I am behind in this assignment, but the idea is ready, just find some time!

Linking a button board to FLASH

I wanted to do something more with the button board. As a contrast to the very technical looking board I made a soft button of artificial fur and connected it to the board at the small button.

Then I used Tinkerproxy to be able to get the input from the serial port to FLASH. Serial Proxy is also good to use. Actually Tinkerproxy cannot talk back to the board. With SerialProxy you can talk from FLASH to the board. (Tinkerproxy and SerialProxy are free.)

In FLASH i used some actionscript to get the input from the socket and started a sound and a text at button-down and started a small video bit at button up.

The text displayed in the textfield is actually coming from the board, this text is in the HEXFILE, of course it is very easy to make the text in FLASH too.

Here is the link to the FLASH file:

http://www.contrechoc.com/fablab/HelloWorlLinkedToFLASH.zip

I have made a movie from the actions with the button board which i uploaded to youtube:

http://www.youtube.com/watch?v=vk-ujIEsvrg

Debugging the Button board

blog in progress

What to do and how to check if a board does not function?

First of all check the cables.

Serial connector:

With a voltmeter check the input on the serial connector there should be 8-9 Volt on the right to small wires.

Then check if this cable transmits the voltage to the board. So first check if the voltage is on the steel parts of the connector. Then if the voltage is passed through to the copper lines of the board.

(In my case the second connector pin to the board from the left was loose two times.)

Then check if the chip has a voltage of 5 Volt over pin 4 and 8, see datasheet. (look for it in Google under ATTINY45 pdf )

Use the resistance part of the voltmeter now:

Then check if the other pins of the chip are connected to the second connector. Pin 5 should be connected to the left pin of the connector (MOSI). The pin right to this should be connected to pin 1 (RESET). The middle pin of the connector should have resistance 0 with the Ground, GND pin 4. The pin right to the middle pin must be connected to pin 7 of the chip. And the right pin of the connector is the MISO, pin 6.

Then check if the left pin of the connector is having resistance “infinite” with the middle pin of the connector. Also do this checking against the ground (middle connector pin) to the pin to the right, MISO.

Second connector on the board:

         9        18        10
   | MOSI (3)  GND (2)  MISO (1) |
      -RESET (4)  SCK (5)
            7        8
                  | cable direction
                  v

I had a shortcut of the MOSI with the GND, very strange!

The programmer warned me about it, and it was right.

Now the programmer, or avrdude cannot complain anymore!

PCB making: programming troubles

blog in progress…
After we had made a board with the Modela we had forgotten our frustrations. Of course we mixed up inches and centimeters once, measuring the X in inches and the Y in centimeters. Surprise! The Modela just followed orders and didn’t think itself…so we had another mistake added to our formidable list of mistakes. But this is learning!

We had a board, although it was still on the bigger copper plate, not cut out, this was proving difficult for the combination Modela-myPerson-FABLAB Amsterdam. Other students had the same problem, so we decided it was the MODELA….. πŸ™‚ ……Blaming others is so easy!

Indeed it was our mistake! We lowered the head too much, so the Modela could not get deep enough to mill out the board.

But the board on the copper plate was ok for this test, since I could use the surface making notes on the ports etc.

Soldering went well! (When things go well, there is nothing to tell, that is our way of thinking…)

Then trying to transfer the program. Alex helped us with a great link:

http://fab.cba.mit.edu/classes/MIT/863.08/people/Inna_Koyrakh/Week4_PCB_Documentation.html

which only lacks an image ( …I am an visually inclined artist…), so I thought one cable was enough to program the chip. It wasn’t of course. I was suspicious, because i noticed the two connections pins. (I should learn to read more carefully!)

this is a picture of my board, including the pins, and the two connecting cables, I added the MOSI MISO because I cannot stand not having an idea of what is happening, I looked up the ports in the datasheet pdf of the ATtiny45:

Then the difference in parts between Europe and California tricked me in a roundabout way of working.

First the parts: these connectors with shifted pins….! If you dont have the right male-female combination…you have to use dirty tricks…

I did! And also: i have a laptop running two OS: XP and MACOS. I have to prepare al my stuff already in these two OS, so I didn’t install Linux. And my laptop has no parallel nor serial port!

There you are!

Either go to the FABLAB every time for every part and programming, or…DIY.

I am DIY!

Luckily I bought a USB Serial converter this summer. Great chance to put this to use. Took a little while to get the driver. The MACOS driver was not up to date with my MACOS, so I had to do it on XP:

(around 5 dollar at dealextreme.com)

In a program called 232ANALIZER I could connect to a port. Then connecting pins 2 and 3 of the serial connector I could see it worked, sending back what I sent in.

Then I had to make the cables. Not able to use the parallel port I had to use my programmer AVRISP mkII, in combination with AVR STUDIO.

I already programmed a ATtiny2313 on a breadboard, so making the several connecting cables took me a few houres (checking and double checking) but then the ATtiny45 on the board could be programmed.

First I was stealing power form the USB port, but this didn’t prove enough for the progammer – chip combination, or the circuit was consuming energy. So I used a slightly more powerful pack of batteries and the programming went well.

Later on I programmed again, using the Serial port (converted from USB).

In 232ANALIZER there was clear evidence that the chip was sending, but the data were nonsense. Fiddling with the setting make me set the party to NONE and then the hello world text appeared.

This is nonsense, but with parity “none” this becomes:


“hello world”….isn’t this amazing????? πŸ™‚

Next step will be cleaning the process: making more boards, and possibly re-programming the chips.

Conclusion:

  • you can do it with a modern laptop (of course)
  • it can be done with XP (of course)
  • it can be done with the most simple pins (of course)
  • the beautiful design of Neil’s board is wrecked (sorry: methods will be improved)

What did I learn:

  • making PCB’s using the MODELA: great!
  • using the USB to Serial Converter for communication
  • some Linux, I have to install LINUX somewhere…but YIKES, maintaining three OS’s!!!

What did go wrong:

  • handling the MODELA
  • handling Linux, old computer with serial and parallel ports…
  • i have to understand a bit what I am doing, otherwise i get frustrated, so luckily i understood a bit about the chip

Who/What helped me a lot:

  • Alex in FABLAB with links and his experience
  • my former projects in programming AVR chips, handling the programmer, (knowing about fuses!)
  • my former experience in soldering, and knowing about the parts, resistors etc
  • having wires, some pins etc in my studio, so being able to work independent from the tools in the lab: DIY for ever!
  • having bought the usb2serial converter this summer and having it available

Later on I discovered another great link: (ooops on my XP side of this laptop…)
http://soshfab.fabfolk.com/

What can be done: making my own PCB’s, needed because I have to deliver an RFID module. The chip is ready, but I have to design the right PCB (pentagon shape). Going on cutting circuitry with the vinyl-cutter.

PCB making: Modela troubles 1

In Amsterdam we did a lab-session for learning how to handle the Modela for making PCB’s.

All went wrong!

First a new computer was installed with UBUNTU but it took linux experts 1.5 houres to NOT get the USB port speaking to the Modela.

Then Alex recovered the slow old computer with a serial port. This thing worked, although we had to repeat the phrase “This thing goes very slow indeed!” every time we tried milling another board.

Yes every time because we didn’t really get one done decently.

The first went well, but the outline failed to cut out through the board.
The second one went wrong because we wanted to be conscious of environment and not wasting material, so we tried to do several on one copper plate, but the base was not really horizontal, so the corner gave us a tilted version of the engraving, see image.

Then slowly the screws for the millers became stressed…and we could not really fasten them properly.

Then we did the last one, wanted to mill it out with the outline, but we forgot that we were doing economically in the corner, it cut the thing out in the middle.

So all ended in tragedy (for us) and comedy for the reader of this blog….
We will try again!

ok, but only not deep enough!
a tilted version and one waiting to be cut out
ok, but the outline was on a different spot , right? Maybe the one in the corner is still usable….

we still pamper our dreams of milling perfect PCB’s, and indeed, making 5 sided PCB’s, to be fitted to a very intelligent chair….

πŸ™‚

PS, and as if this wasn’t enough: when the protecting layer gets loose you get this:

PS:
Most of the problems were caused by the lowering of the head of the Modela: it was lowered soo deep that the Modela had no space left to mill out the board. It took some time to realize this was the cause of our failures.

Press fit 1, more a kit.

files: http://www.contrechoc.com/fablab/press-fit_chair1_AI_CS3.zip

First working with new tools and also trying seriously to think visually in shapes at the same time is always a difficult task, because the latter presumes having mastered the technical stuff. But this “mastery” has still to be acquired!

I wanted to make something 3D with the 5-sided shapes but not (really) the usual dodecahedron, nor the rotational symmetric press-fit examples.
I decided to opt for a inside out segment of the dodecahedron. What that means is most easily seen from the pictures.
It becomes, sort of, a chair.
In Adobe Illustrator I could make the shapes needed. Using the symbols in AI makes the same trick work as cloning in Inkscape.
The five sided shape is enriched with a smooth shape in the middle and hard openings in the middle of the sides.
Later on, to contrast the geometry I added a hand. The hand is of course also a thing based on 5.
(The hand is also one of my favorites!)
I made the path of the hand from a photo of my hand in PHOTOSHOP. Importing the path in AI.
In BLENDER i recreated the shapes too. Importing a path from AI (the hand) as a SVG file is not too difficult, the only thing I have to find out is extruding the path of the hand, to give it volume.

(ok, found it: editing mode, tab editing (F9) and curves and shapes, has a extrude button).

The other thing to be done is to calculate is one of the angles in the dodecahedron, the dehidral (117) is easily found, now the side angle over the edge.

(Well this was easy: seen from the side the dodecahedron has a horizontal top and bottom surface, so one angle is the dihedral, the other its complement, 180 – 116.57).

Here are the pictures.

the five sided shape, this all stays flat of course, I should have started with a sketch, paper and pencil, but these shapes are already in my head, where i can play with them…
In the center a smooth shaped copy of itself will be cut out, only it should not be in the center though…(The surrounding hard shape (around the smooth one in the center, is still my inexperience with AI….will be removed.)

Difficult is the exact positioning of the press-fit holes, because of the rotated sides. How to solve this exactly?

all the shapes, including the connections, testing if the press-fit things are really connecting…still very flat…3D to be viewed soon!

hand in photoshop, copying the path to AI…and then: in 3D! BLENDER:

Basic shapes in BLENDER, without details, but the idea of the chair can be seen…think of it in soft materials…cushions

Fish eye picture in BLENDER, details added to one of the “chairs”…
(See the absolute cleanness of this space, where can I add some “dust”???)

Detailed picture of one of the possible configurations. Well not yet all details, like the smooth shape cut-out from the pentagons, seen in the AI doc’s.

Importing AI path’s into BLENDER made it possible to add more details:

Making my 3D virtual studio in BLENDER now, everywhere shapes to be saved….

Then at a certain moment more detailed pentagons don’t add to the esthetics of the design. Interesting to see that indeed we need a few basic pentagons. Otherwise the picture becomes messy. But from experience this also depends on the size. In reality this balance between details and simplicity will change, and going from a scale-model to a real size model it’ll change again….

The problem is always stability…time for the physics engine to test this :-)….

It should be possible to add the hand shape in a fashion you like yourself, also thought of as soft tissue.

The hand can also become a (soft) switch, triggering things in electronics in the chair.

I have used the regular pentagon for this exercise. Normally I deform the pentagon, shaping and shearing it out of regularity. Sometimes it is not even recognizable as a pentagon. That is why i prefer calling it a five sided shape.

But these are the virtual, digital preparations, what about the reality?
Tomorrow I’ll find out, making a scale model…. in cardboard or thin wood.

Actually it became transparent perspex, which could be used to get my first cutting done:

Of course the influence of the material, the colors, the transparencies have to be reconsidered, as well as the model…

Later on I got BLENDER importing the Illustrator of Inkscape SVG files and could make the 3D modeling with a good impression of its effects.

Press-fit 2: more of a chair

files: http://www.contrechoc.com/fablab/press-fit_chair2_AI_CS3.zip

The model shown in the last blog went well. I had to redo the settings of the fits, because the settings have to be adjusted to the material used: perspex of 3mm. Then I forgot to do the (famous) dihedral angle so I cut this angle wrong. I have to redo these connection parts.
I used transparent perspex and since this is totally transparent I have to do some parts in colored materials to make the final shape visible.

This first model was really a try-out. I there is time available at the laser cutter I’ll try a second model shown here, which is more complicated. I have checked and rechecked the fittings. This preparation is really important. I imported the model in BLENDER using SVG importing. Then I had the shapes from Illustrator visible in 3D in BLENDER which helps judging the model.

The holes in the model have been added to the path. There must be a way to directly export holes in Illustrator files….

Here the pictures from this: (Illustrator)

Picture from BLENDER. I reshaped the ILLUSTRATOR path’s, seeing the result in 3D.

The strange shape next to the chair is an imported double path in BLENDER. Seems to have been a BLENDER bug, because restarting BLENDER made it disappear.

I’ll add the reality picture when this model (small scale model) is cut.


This is a rather small scale model, for testing the precision of the printing, which is quite good!

Again this is spending lots of time in making the Illustrator files and checking in BLENDER (importing etc) and double checking, still making mistakes, reprinting one of the shapes…..
As can be seen by a meticulous observant I forgot to edit my Illustrator files, the BLENDER model being already reshaped.

The whole production chain and all the checks must become a habit…

Semester proposal fablab course

Semester proposal – bram van Waardenberg

semester proposal in a pdf

Exploration of the ubiquitous computing theme in furniture based on five sided shapes.

More explicit: two pieces of furniture consisting of non-rectangular shapes. (Two standing for β€œmore than one” – this gives also a possibility of communication between the two chairs.)

The surfaces of the parts, which in the images is flat must be shaped, given a relief, identity, or having a perforated pattern.

The inside of the parts must be enriched with electronics, like sensors and rudimentary AI software.

The rest of the text and the animations in BLENDER, i give the link:

semester proposal in a pdf

or use the attachment, this is the same

just a few images from the pdf:
one of the smart textile modules i am working on:

former shapes from five sided things:

youtube link: animations:

http://www.youtube.com/watch?v=-cAK1iF_o4s

http://www.youtube.com/watch?v=oHL_KnY4Bus

http://www.youtube.com/watch?v=c5uFDCeH-bA

http://www.youtube.com/watch?v=UnWfAMzJly4