Fab Lab Barcelona SuperNode

Add an output device to a microcontroller board and program it to do something.

Class syllabus::
http://academy.cba.mit.edu/classes/output_devices/index.html

[what i learned /am learning]

_ Relearned Arduino installation.

_ Work with DC motors and H-Bridge IC with Arduino; and its general concepts.

_ About the various Fab versions of Arduino and their features and differences: hello.arduino, fabkit2.0/fabduino, barduino.

_ How to make and program the hello.H.bridge.44 board to use a DC motor.

_ Started learning how to make and program my own version of Arduino: hello.arduino and fabduino.

_ Related to the past weeks, eventually! i learned what high byte and low byte mean. I had been quite confused with this, because High and Low, mean of course different things depending on context. I found the answer in the Arduino Cookbook, p:85, that Tomas Díez once recommended: If we consider a byte / 8 bits; the low byte are the four first [right to left] bits/digits, and the low byte are the second four bits/digits. Sometimes, as in our use of serial communication, it is convenient to break the bits in two parts. Then you usually need to put them together again. All this we have been finding in the C and Python scripts that we have been using; but i didn’t understand it until now. A start bit and a stop bit have to be put in front and at the end to tell the computer how to interpret the data.
Fab Lab Barcelona SuperNode

Starting to work in the assigment, i realized we were missing in our local inventroy a part that was needed in all of the hello boards proposed for this week, which is the regulator. So i ordered them at digikeys together with some other materials that we will be needing soon. In the meanwhile we started working on one hand studying the boards, milling and stuffing them, and on the other working with arduino, and preparing our own arduinos at the lab to fabricate. Thanks to Luciano [Barcelona / barduino], Nuria and Ruben [fabduino / León], for their great help, as well as, of course, to all the preceding htmaa and Academy students for their tremendous projects and documentation.

I have to mention, i like enormously the Arduino project. I consider it one of the most amazing things that has happened in the field of knowledge and production in the last decade. I might say that i had met David Cuartielles, one of the project leaders before he started in the project, and were using a server of him for some years in an independent media project that became quite relevant.

I think that from now on we will try to work on two lines in electronics; on one hand we will make and test the Fab Academy prototypes, and on the other we will rely more on self-made-arduinos for the final project, as it seems easier for beginners; and also more accessible to work with in the future. We will see…

[assignment development]

[preparing, milling and stuffing the boards]

For the assignment i wanted to use a board with the H-Bridge IC that professor Gershenfeld had praised in the class. The H_bridge allows to control higher-demanding device such as a DC or stepper motor, with the 5/3.3V and ca. 40mA supplied by the hello board [or the Arduino].

So i chose the first DC motor board – hello.H.bridge.44
-. I most probably will use motors for my final project, and this seems to be like a good starting point. To find out about some not so clear board components, i checked the .cad file, that indeed gives some info about it:

IC2 = regulator_SOT23(‘IC2\n5V’)

Double checking the fab inventory, as mentioned, that it should be “IC 5.0 100MA LDO VREG SOT23” digikey ref. LM3480IM3-5.0/NOPBCT-ND and i realized with some dissapointment we don’t have them, and as mentioned, i ordered them, but still went on preparing the board. The other components we have already used in previous assigments, so that feel familiar.

Planarity calibration notes for the iModela
It might be not so easy to tell in the pictures, but this milling was truly high quality. We are still milling with the 0.2mm 45º mill. Speed was 40 mm/s; depth 0.01mm, just one milling layer. The mill was quite new. It was the third board milled with it. It took 1 hour and ten minutes to mill.

The workflow has been the one we have eventually determined to work well with the available tools. 1/ Generating paths from png to dxf with fab modules. 2/ Making further offsets in Rhinoceros; approximately 0.06 from the interior path towards the outside + adding lettering. 3/ Exporting to .ai and importing it in iModela Creator. 4/ Fixing the FR1 board with double tape to the iModela platform. 5/ Carefully confirming planarity of the FR1 PCB set in the iModela; 7/ Setting the milling parameters as described above; 8/ Milling; 7/ Watching the milling process carefully and stopping it after the 0.01 or 0.02 mm layer has been milled. 9/ Washing the board and if necessary cleaning minor details with a precission knife; 10/ Cutting the board perimeter with a precission table-top saw. 11/ Applying lacquer to prevent oxidation.

The second and/or third board i wanted to make this week are the hello.arduino.168 and the fabduino. For these two, again, i had to order new components, basically the ATmega168 smd microcontroller. Some weeks ago i had drawn in cad the ATmega168 and double checked the geometry just to see how tight it is and how much the milling machine has to be demanded. It looks to me like the Fabduino is even tighter than the hello.arduino, so i decided again to start from the “beginning” and try first the former, which i milled and stuffed, leaving some components waiting to leave space to be able to solder de micro as comfortably as possible.

Milling the hello.arduino.168 board; performing a little surgery to it to get a quite nice result; the hello.arduino.168 milled board with an Arduino Uno. Stuffing the board, which had to remain waiting for some supplies.

Monday early afternoon we got the supplies. Thursday to Monday by digikey, pretty excellent! And we went on with soldering. The pins of the Atmega168 are truly tiny… They make me almost dizzy…

While waiting for the components i thought it a good idea to advance some with a regular Arduino board. I did find an example that actually uses an H-Bridge IC to control a DC – it is one of the projects in the excellent Arduino Projects Book edited among others by Massimo Banzi, Tom Igoe and David Mellis, the former very involved with the Fab Academy as we are using an ISP design by him.

To start with i reinstalled the Arduino IDE without much trouble… Ubuntu 10.04, still has minor problems with it – managing the serial connection… The error message is omething like RXTX Warning: Removing stale lock file. /var/lock/LCK… which googling it, it seems i am not the only one with the same problem. It looks though that using arduino as root [sudo] lets me work ok; until now.

Of course i have to update to 12.04, but i need some time to back up etc, that i cannot find… Hmmm.

In order to better understand the working so the devices first i redrew the schematics and made a diagram of my own, for a project called “Pinwheel” that uses a DC motor and a Mosfet to control it. It was helpful, i have to say. Then i rewrote the code and compiled ok.

Fab Lab Barcelona SuperNode circuit
Below the schematics – with some coloring – for and Arduino controlling a DC motor using a Mosfet [transistor], the above mentioned “Pinwheel” project. From the Arduino Projecs Book, p:95: “Transistors are components that allow you to control high current and high voltage power sources from the low current output of the Arduino. You can think of transistors as digital switches. When you provide voltage to one of the transistor’s pins, called the gate, it closes the circuit between the other two pins, called the source and the drain. This way you can turn a higher current/voltage on and off with your Arduino.” And this is the Arduino sketch that can run this configuration [written by to get some practice me following the instructions]: arduino_projects_09_pinwheel.

 

For more detail: Fab Lab Barcelona SuperNode


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top