Since I was ordered many Half Ohms I tried to manufacture them faster. Fortunately Kalle had converted a grill to a reflow oven so I used that to reflow solder my boards. I had tried to do this before – and failed. The problem was that I had vias in components pads, so the solder was dragged to the via and half of the components ended up standing on one pad - “tombstoned”. Lesson for life – no vias in pads. New batch of PCBs had all the vias farther from pads so I got rid of that problem.
For stencil I printed the Adhestive layer (in KiCad, probably you can use Solder mask layer if you really want to) out on some random transparent paper leftover from making PCBs with photoresist method. Next I used scalpel to cut out all the larger pads (1206 component) and then poked holes to all the other pads with a tip of soldering iron. The result was ugly and non even. A bit of sandpapering both sides and it was fine enough for first try.
The solder paste I used was some three years old cheap Chinese one. Good enough for me but for real operations one should really buy quality one from real shop and follow the storing requirements.
I put the stencil on the board and aligned it more or less. Then used piece of plastic to drag the solder paste to board and took away the stencil. The paste got misaligned and was between the pins of SOT-25 chip but it all doesn't matter because surface tension does its magic.
Next – putting all the components in their places. Small tweezers and fun for two. Before this step the boards should already be in the oven or on a paper that you can use to transport your boards.
The heating itself was controlled by MCU in my case but the theory goes that first you heat the boards up to about 150°C for a minute, then heat it up to 350°C and turn off the heater. Or more ghetto way of doing it – put your electric stove to maximum and wait when the board starts smoking. Then wait for a little bit more and then turn off the stove. Either way the boards will smoke and it will look scary.
Finally – testing and fixing bugs. On my 18 boards with about 200 passives only 4 were tombstoned. Out of the 18 boards 5 had a short circuit between two SOT-25 legs. So next time I could invest more time than 5 minutes to making stencil.
Oh, and one more thing – don't try to reflow trough the hole parts. I tried to reflow golden connectors. The cold plating melted away from the connectors and they stick down to the oven. Also the boards with the connectors got gold plating on all the solder joints and the reflow oven got sticky.
To burn bootloader use one from here.
To boards.txt file add:
atmega88.name=ATmega88 atmega88.upload.protocol=arduino atmega88.upload.maximum_size=7168 atmega88.upload.speed=19200 atmega88.build.mcu=atmega88 atmega88.build.f_cpu=8000000L atmega88.build.core=arduino atmega88.build.variant=standard
And in all of the c files in hardware/cores/arduino replace #if defined(AVR_ATmega168) with #if defined(AVR_ATmega168) || (AVR_ATmega88)
Friend of my friend broke another rotary tool with daily grinding so I got another one to take apart. This time a Proxxon D-54518. Initial probing showed that there was voltage on the big 100V DC motor leads so I ruled that the motor was busted. Just for fun I tried to fit my 100A 1.5kW big brushless inrunner in its shell. It fit perfectly! The screw holes aligned and coupling to toolhead only needed a little drilling to make it fit perfectly. Later I found out that the original motor was working too.. so.. No idea why it didn't work.
To control the big brushless I used a Red Brick 100A ESC (Electric Speed Controller). But the model I had didn't have BEC (battery elimination circuit), so it didn't feed out any voltage from signal cable. This means - teardown time!
The build of the thing is quite surprising.The input capacitors are two 35V 1000uF electrolytic ones, nothing weird in there. But the thing itself is stacked up from three PCBs. The top one is two layer one and used only for controlling logic. Two bottom ones are both 3 or 4 layer PCBs that hold 18 d-pack mosfets each. The inner layers are needed for high current carrying capability and thermal reasons. All mosfets are N channel, 30V, 70A P0603BD. The total output current could be 420A but they have branded it as 100A, probably because they don't have active cooling and super awesome gate driving. All gates are charged through 33Ω resistors, probably to account differences in gate capacitances or to protect gate drivers.
The main board looks the same like in every Chinese brushless ESC. Half of the board is unpopulated, that was the reason for no BEC - the switching regulator was not in place. The main ingredients that make such ESC are:
Atmels ATmega48 (or ATmega88 for smarter ones) that does all the work. For some weird reason Chinese manufacturers LOVE ATmega48, it is in every design. Like always it is clocked at 16MHz with resonator. AVR in this design is in QFN package, in most of the cases TQFP is more common.5V voltage regulator in D-pack and some ceramic capacitors.Maxim MAX662 12V 30mA charge pump for high side gate driving. The output of the charge pump is stored on the ceramic capacitor on the right.
International Rectifier IR2101S high and low side mosfet driver. One for every channel. On the right of every driver there is a diode and a capacitor. This is probably bootstrap circuit that collects higher voltage for gate driving from inductance spikes of outputs.
In between of gate drivers are resistors for feedback.
The top part is for BEC. It looks identical to very common switching regulator block used in ebay products. Texas Instruments LM2575, originally a 1A step-down but now apparently a 5A one.
I did couple of tests with the rotary tool after installing the new motor and it is SCARY. It feels like there is a angle grinder in your tiny rotary tool's body. We tested with speeds up to 30% and didn't dare more.
I finally built tinyDino. I used AtMega168, so it is 100% compatible with Arduino IDE, just choose "Arduino Pro or Pro Mini (3.3V 8MHz) w/ Atmega168" as your board and it will work.
I built some and will sell them. Also, there is some more pictures:
So I played around with some tools in Satellite laboratory. This time measured impedances of different electronic components. I used this weird network analyzer to generate signals and measure reflecting patterns. It plotted impedances on frequencies from 300kHz to 1.8GHz on its beautiful CRT display. I made pictures of two displays: Smith chart showing the impedance on different frequencies, and phase angle graph. The display was normalized on 50Ω load.
Smith chart shows the resistance on horizontal scale, and the reactance on vertical one. The line on the display shows impedance on different frequencies. If the line is above the centre line then the load is inductive. If it is below - capacitive. The middle point of the graph is 50Ω. Because ideal resistor is not reactive, it should be a dot on the middle line. Ideal reactive elements should be curves on the other graph (see the pictures).
I always got puzzled when someone talked something about phase shift or something like this. From my simple view - if you plug the voltage in then there is voltage in. But, as it comes out - the current isn't. With simple resistor - the current is always proportional to the voltage, logical enough.
But with capacitor - if it is empty and you start charging it - it takes massive amount of current. When the voltage has reached to its maximum - the capacitor is full, so there is no current flowing anywhere. If we take the voltage away and connect it to ground, the current will also start from maximum and slowly approaches to zero. So, if we use a repeating pattern (like a sinusoidal wave) then there is an illusion that the current comes 90 degrees before voltage. So phase shift is 90 degrees.
With inductor, the same thing is a bit reversed. So, if we start with high voltage, the current is zero. And if we wait a bit, the current will climb up. After connecting it to the ground the current will start dropping slowly. And again, if we used repeating pattern, it would generate an phase shift. 90 degrees again, but, in another direction.
Using this knowledge, we can take some boring formulas and handful of resistors, capacitors and inductors to get whatever phase shift and series resistance we want. The complex number (two numbers in one) that we get from resistance and phase shift is impedance. It can be useful for describing passive circuits like filters. Also understanding this concept will help to understand how and why everything works in a weird way in high frequencies.
Some time ago someone from the lab found userial - a USB to I2C/SPI/GPIO/ADC bridge (http://www.tty1.net/userial/). It seemed like an useful toy - USB to I2C and couple of IO's to play with. Basically connect it to your computer, fire up your HTerm and you can speak in I2C. But the cost of the chip used was enormous, so I changed the firmware to accept readily available atmega16u4. Couple of IO's and ADCs were lost during the process, but nothing really bad. The new firmware is here http://jaanus.tech-thing.org/img/userial-firmware-u4.tar.bz2
The hardware we use is atmega16U4 development board what you can find from Erik's page http://pro.a5d.biz/atmegaxxu4-development-board/ But it works with whatever hardware, so you can use it to test if your design works, without writing single line of code.
It was and will be again released under MIT license, it permits to share and modify it as you please.
Through the hole LEDs are so big, that means that LED cube made out of them has to be big. But I want to make high resolution small LED cubes. So Kalle got an idea to use SMD LEDs. I soldered for couple of hours and made one. It consists of 27 red LEDs in 0603 package and 0.2mm copper wire. The side length of the cube is 3.3cm.
It was really pain in the ass to make. I won't recommend doing SMD led cubes to anyone. This will probably be my first and last one..
I bought an 17 inch ViewSonic VG712s LCD from local auction site. It didn't have an power adapter and there was no guarantee abut it working, but 10€ didn't seem much. After the arrival I read that it needs 12V@3.42A. Well, lucky me, I just happen to have 12V electrical system for my lab and an 12V 10A switching regulator powering it. After a bit of testing it came out that 12V means 12V, not 11.5V, had to make decent wiring to it to get rid of voltage drop. Because I try to power my 12V system from renewable energy sources when possible (I have 30W solar panel that powers it in the summer), it woult be nice to know how much power it draws and how it reacts to different states. So here is what I measured at 12V:
Lowest brightness, white screen: 1.662A
Lowest brightness, black screen: 1.768A
Highest brightness, white screen: 2.964A
Highest brightness, black screen: 3.051A
In sleep mode: 26mA
Turned off: 16mA
Couple of fun facts.. LCD takes less power with white screen on it.. weird. Also, there is no point of turning it off, because the difference is 10mA.. I guess that this power goes to powering the led on the front..
ITead Studio and Seeed Studio are selling PCBs at so ridiculously low price that I just have to make new projects. I just got my PCBs. I panelized six PCBs on one 5x5cm ITead order and Cmc demanded pictures, so here they are. I went with black board with tented vias, just to see how awesome they would look. And awesome they are. The designs on the board are: the latest Kobold, tinyDino, three boards for Golem, my Robotex robot, and a RF board for Matis.
At first I used dremel to cut the boards apart, but them Cmc told me to try to cut PCB with knife. Sound crazy enough to work. And after a little practice, it did work. It does require to cut several times from both sides, but it is order of magnitude cleaner and easier method than a dremel.
So, because my new design - Half Ohm, seemed ready enough, I ordered new PCBs. I used gerbmerge to panellize, because the Half Ohm is designed in KiCad and the other design I share board with - in EagleCad. After a small fight with conf files my gerbers were merged.
And going to SMD really takes down the holecount on boards. Normal THT boards require 1 hole per leg. My last design has 74x 0.4mm vias for signal, while it has 100 component pads (not counting passives), also interesting is that I put 100 GND vias on 10x10cm board, that sounds much but one via per square centimeter isn't much at all, especially for medium power designs.
While testing stepper drivers for my Reprap clone I had to generate variable frequency signal to one of the inputs. Seems easy enough, whipped up one from 555 timer and two potentiometers. It looked ugly but it did its job. One pot adjusted the low time and another the high signal. Thanks to diode configuration it could achieve any duty cycle. From making it I learned that 78% of 555 jitter problems come from bad potentiometers.
As another one of my slacking off from big projects I started constructing this function generator. I considered abut a dozen different schematics. With smart function generator ICs, 555 timers, pure analog op-amp designs and so on. But as always MCUs are just 20x cheaper and easier to use than any other design. The final schematic is very easy - it consists of Atmega88 (I had an extra one, use something cheaper), 20MHz crystal (not necessary, frequency will be inaccurate anyway) and resistor ladder DAC. I used two outputs. One from Timer1 PWM output and another from DAC. One could easily another potentiometer and get two PWM outputs with different duty cycle, but I decided not to because it seemed unnecessary. I planned to generate negative voltage and use opamp to offset the DAC output by 2.5V but I was to lazy for that. I can always add this later if I need.
The main attraction with this project was mechanical design. I bough pretty banana connectors and made it proper front plate. It has power switch and led, pot for frequency, pot for duty, two switches for timer prescaler, two function outputs and two power outputs (one is external 12V output).
The code is also pretty trivial, reads ADCs and digital inputs and switches timers accourdingly. The only noticeable thing is the play with prescalers. Atmega88 timer1 has five prescalers: 1, 8, 64, 256, 1024. These numbers seem logical but they aren't. I wanted to encode four of these numbers to two switches. One switch is 1X/8X and another is 1X/8X. But 8*64 is 512, and there is no such prescaler. WTF atmel.. giving us prescalers 20, 23, 26, 28 and 210. Also because the code is so slow the maximum usable speed is 100kHz. I could fix that with moving the code around a bit, probably, but whatever, it works.
The testing and setup went almost painlessly. I hooked up the 78L05 the wrong way for the first time but everything survived 7V or whatever it got. Testing showed that the frequency potentiometer is logarithmic for some reason, probably I had one logarithmic one in drawer. It works well on frequency ranges 40Hz to 100kHz, and duty 5-95%. The whole thing is powered from my solar-battery configuration like all other self made lab equipment I have.
Everybody are making Arduino clones. So I thought I should make THE smallest. I took smallest package atmega88 - 28qfn (5mm x 5mm). Routed smallest possible resonator and as much pads as i could fit on in.
The result - Smallest Arduino clone ever! Size is only 7.4mm x 7.4mm! Features include:
- Auto reset
- UART
- SPI
- 4 analog channels
- 1 digital i/o
- one LED
- funny readme with BOM
It needs arduino bootloader for atmega88 like ottantotto bootloader, probably it needs some hacking too because the resonator is 8MHz not the Arduino regular 16MHz.
Get it from: http://jaanus.tech-thing.org/img/tinyDino.rar
or
Support open source hardware - get it from the maker: http://tech-thing.org/tinydino/
I made 3 channel servo controller out of AtTiny13a. AtTiny reads 3 ADC channels and moves servos accordingly. So one DIP8 package chip takes analog reading for example three potentiometers and controls three servos according to the readings. I chose AtTiny13 because it is one of the smallest and cheapest MCUs I could get my hands on. The code converts 0V to 0ms pulse and 5V to 2ms pulse. It uses all 6 i/o pins (including reset) of chip so if you want to use the chip again you need fusebit doctor or hvsp programmer. Code is 100% by me and in C, includes comments in Estonian.
The servos connect to pins 5-7 (PB0-PB2) and potentiometers to pins 1-3 (PB3-PB5 (ADC0, ADC2, ADC3)). The example board was made out of protoboard. The pictures show of my pretty SO8 to DIP. I didn't have any DIP package AtTinys so I made this P2P CMC style adapter.
The video in the bottom shows little robot arm made from this servo controller and three 3.7g servos. It moves very jittery in the video because the video was made with the old version of the code. Also the servos are too weak for all this force.
Big projects continue to be scary, so I make and document smaller ones. First old project to live - 555 servo tester.
After modding servos for continuous rotation i wanted to test them, being too lazy for software I searched the web. First schematic that I found was Gadget Gangster's 555 servo tester. It works by generating pulses in inverted mode (since 555 "cannot" make duty less than 50%) and then inverting them with one transistor not gate. Next schematic from the web used a diode to make smaller pulses but used frightening control-voltage pin.
So, I made a design that uses minimum number of parts. I also used 10k potentiometer, because pot is the most expensive part in design and 10k seemed like the most common value. Although the design is simple enough to change it for whatever components you have lying around. I drew the schematic in KiCAD, not because i had to but because drawing only the schematic is actually more convenient than in Eagle.
[It was pointed out that the schematic is not working. I looked at it and fixed it. The resistors were swapped. I'm sorry]