Friday, April 19. 2013
Cheap deep discharge protoction for ... Posted by Thomas Kolb in Projects at 17:12
recently, I decided to power my Raspberry Pi from my solar battery. However, before I could do that safely, I needed some deep discharge protection for the battery, which had to switch off the Pi when the battery voltage becomes too low.
Most available solutions for this problem missed one of the features I wanted: low current in “off” state, no relays (as the use too much power while active) and low price. So I designed one myself:
You might also want to get the image of the copper layer (SVG) in case you want to etch the board yourself.
In this circuit, the 7555 timer IC is “abused” as a simple monostable flipflop. When the “Power On” button is pressed, the trigger input (TR) is pulled low, which sets the Q output of the IC to 12V and consequently switches on the FET. This state is kept until the voltage at the threshold input (THR) exceeds two thirds of the supply voltage. As the supply voltage is the battery voltage, it will decrease while the battery is discharged. The voltage at THR will also decrease, as it is connected to the supply voltage. However, THR has a specific “minimum level”, which is set by the Z-diode, so at some point, the voltage at THR will be higher than the threshold of 2/3 the battery voltage and Q will be pulled to ground. This causes the load to be effectively disconnected from the battery. Even if the battery voltage rises again (which it does, because the load is disconnected), the load will stay disconnected until the button is pressed again.
In my version, the circuit itself draws about 0.5 mA when the outputs are switched off and 0.6 mA when the outputs are switched on, but without any load (so having the OKI-78SR powered without load doesn’t make a real difference).
If you want to build this board, take care to use the 7555 timer IC in the final version. For a simple test, you could also use a normal NE555 (or similar), but those are not very power efficient (idle current is about 10 mA compared to <0.5mA for the 7555).
The raw costs of the whole board are less than 10 €. The most expensive part is the OKI-78SR with about 4 €, the prices of the other parts are mostly below 0.50 €.
So this little circuit fulfills all my requirements and even has the 5V regulator built in. With this I can finally run devices with solar power without having to worry about the battery.
Friday, July 13. 2012
This time I’d like to show another project I’ve worked on recently. I call it “Musiclight”, as that describes quite well what it’s all about .
My goal is to visualize music using RGB LED strips, in a way that it actually enhances the listening experience (for example, impressive transitions in the music should cause impressive transitions in the light).
The idea for this existed for more than 2 years (I learnt how a DFT worked around that time ), and I tried different methods of visualization since then.
Most of the time, I used a simple RGB LED strip which could only have one color at a time. I tried calculating colors directly from the music (which caused extreme flickering) and extreme averaging (which turned out to be the best solution for single-color strips, as it showed the “mood” of the music over a longer time). However, I recently got my hands on a LED strip with multiple, individually setable modules (like this one), which made totally new things possible.
The RGB LEDs on each module are controlled by a WS2801 chip, which features a serial (shift-register like) interface and 3 output channels with 8-bit PWM. The modules can be daisy-chained to make longer strips which can still be controlled by a single microcontroller. The strip I’ve got consists of 20 such modules.
To be able to control the LEDs using my laptop, I wrote a driver for the Ethersex firmware, which runs on my AVR Net-IO. The driver takes commands through a binary UDP-based protocol and sets or fades the module’s colors accordingly. The LEDs are updated in fixed intervals of 40 milliseconds, which is enough to remove any visible steps in fading.
On the laptop, I wrote a program that takes audio samples as input, does it’s calculations to generate some nice visualization and sends the result to the Net-IO.
Currently, the algorithm works roughly as follows:
You can get the code from my git server. Or clone it directly:
git clone git://git.tkolb.de/musiclight2.git
Please note that the program is not really portable in it’s current state.
I hope you’re still with me, as here comes the interesting part: A demo video!
There is also a high-quality version with better sound quality and full 720p resolution (all my DSLR could give me at 30 fps ). And yes, the music is edited in, but there was no significant delay between music and visualization in the real world, too (and you wouldn’t want to hear the original recording from the DSLR anyway, would you?).
Despite the current visualization looks really good (in my opinion), there are still some things that I’d like to improve.
Saturday, June 2. 2012
Some news about the Quadrocopter project Posted by Thomas Kolb in Quadrocopter at 20:58
Such a long time after my last post, here is an update about the Quadrocopter project.
And it works quite well, although it took a lot of tuning and testing to get it stable (and there’s still room for improvement).
However, before it worked, there were some problems to solve.
The first and most serious problem were the propellers, which were very badly balanced. This caused vibrations which the Software couldn’t compensate and made the Quadrocopter very unstable in flight. It took almost 2 months before I determined the propellers as the cause of the stability problems, as I always looked for a problem in my Paparazzi config and tried to solve it in Software, because I thought the vibrations were normal (they didn’t feel that serious when holding the Quad in my hand). However, when I balanced the props using small strips of tape, the stability problems were mostly gone.
Next I had to tune the control loops, which I mostly did by trial-and-error, trying to find the most stable settings. They still are not perfect, but they work in most cases.
I also managed to get the altitude controller working, which measures air pressure to determine the current altitude and then tries to hold the Quad at the same level. This works very well as long as there is not too much wind. However, with wind, the pressure levels vary too much so the Quad won’t stay at the current altitude level. But as flying with strong wind is not really much fun anyway, this isn’t a real problem at this time.
All in all, I’m very happy with the current performance of the whole system, even though it’s not perfectly tuned. I'm currently having a lot of fun flying this great aircraft .
At this point, I’d like to express my thanks to the Paparazzi project and all it’s contributors, who did (and are doing) a great job in creating all the hardware and software as an open-source project.
Finally, here are some pictures of the Quad in flight:
Tuesday, August 2. 2011
Here’s a gadget I finished some time ago: A 10 watts LED hand lamp with dimmer.
About a year ago, I bought a 10W LED from china, more or less just for fun. It turned out that these things are incredibly bright and so I used it sporadically as room lighting for some time. Then I got those lipo-batteries for my quadrocopter and thought: “Why not build a hand lamp from this?”. So here it is!
This case contains:
One battery charge will last for about 2 hours at full power. In reality, it will last much longer, as full power is much too bright for normal use at night (20% is mostly enough, so you get 10 hours of light). By the way: The photo on the left was shot at the lowest possible output power. If it wasn’t the whole picture would be black .
Another great thing is that this LED has a very homogeneous light distribution over it’s 120° aperture angle. So, if you carry this thing pointing straight forward, everything you see is brightly illuminated .
Tuesday, August 2. 2011
Quadrocopter hardware is complete! Posted by Thomas Kolb in Quadrocopter at 16:35
The hardware of my quad is now complete and assembled! Yay!
As pictures say more than a thousand words, here are some photos which show an overview of the whole construction and some details:
The motor controllers are all connected to the central power distribution board (PDB for short), which is also directly connected to the battery. The Lisa/M is mounted in the center of the PDB and rests on a piece of foam rubber, which is a very soft but still tight material. On the one side, the foam rubber prevents short circuits through the copper beneath, on the other side, it helps in mounting the board in level with the frame, as the bottom of Lisa/M is not flat.
The motor cables are held to the frame using Velcro strips. The RC receiver is also held by one of those strips, as you can see in the second photo. The battery is mounted on the bottom also using velcro strips (I hope they will be strong enough when in flight, but as I can lift the quad only holding the battery, I don’t think this will be a problem). Finally, I have added a piece of heat insulation tube (which is light, but quite stable) on each arm of the quad to keep the battery from touching the ground and to act as a damper in case of hard landings .
By the way: the transmitter problem is also solved. There seems to be some problem when building the paparazzi software inside of a 32-bit chroot environment on 64-bit systems. The DX6i transmitter works without any problems when building the software on a real 32-bit system or inside a virtual machine. So, if you want to use paparazzi, too, I recommend to use a real 32-bit system or a VM.
To summarize: The hardware seems to work completely now. I still have some software/configuration problems, which will hopefully be solved soon with some help from the paparazzi team . So I think it’s not long until the first flight!
Tuesday, July 26. 2011
Yesterday I basically built an aluminum frame for my quadrocopter in a six-hour marathon. Before I go into detail, I’ve got some pictures for you:
As you can see, the frame mainly consists of square aluminum pipe, which you can buy at any hardware store. The dimensions of the pipe I used are 15.5x15.5x1000mm with a thickness of 1.5mm.
To get the two rods on the same level, I cut halfway through each one so I could put them together to a “plus” form. The whole construction is held together by four screws with 6 mm in diameter and two solid plates, consisting of wood on the top and plexiglass on the bottom (maybe I'll put some LEDs there some day ).
The topmost plate you see is the “Power Distribution Board”, which will connect all the motor controllers to the battery in the end (I hope the 5mm tracks are enough for 50A peak current ) and also hold the Lisa/M.
So, that’s the new frame, and here comes the status update for the rest of the thing:
First the bad news: I returned my Spektrum DX6i to manufacture because the first channel wasn’t received correctly by the Hobbyking Orange receivers. I also tested with another DX6i, which worked, so I assumed there must be something wrong with my transmitter. Today I was told by the Spektrum support that my receiver works perfectly normal, but I got the DSMX version which obviously has some compatibility problems with my “unofficial” setup. Maybe it’s possible to implement some workaround in the Paparazzi software, or I have to get myself the DSM2-only version of the DX6i.
At least there’s some progress: propellers are ordered and should arrive this week!
So in general, I guess it doesn’t look too bad for my goal of flying this thing at the Chaos Communication Camp (maybe with someone else’s transmitter...).
Sunday, June 26. 2011
In the last few days I prepared the motors and controllers. That means I have attached all the connectors to the wires of motors and controllers so they can be easily plugged together.
Finally I built a little test setup with all four motors attached to a piece of cardboard. I also attached a piece of paper to each motor to get a bit of air resistance (but I don’t think it resembles the load of real propellers very well ). To be able to set the motor speed, I wrote a little program for my AVR evaluation board which generates the signal for the motor controllers, which was distributed equally to all controllers.
I took these photos at relatively low speed (about 20% according to the signal on the oscilloscope). At full speed, the whole setup draws a current of about 4A, so 1A per motor, which is not that much, as the motors are specified for up to 12A permanent current (15A peak). I guess the current will be much higher with real propellers.
Anyway, I wouldn’t be able to test with much higher load, as my power supply does only provide up to 5A .
The next step will be a test of the Lisa/M with the motors and the receiver connected, so I will finally see if all the hardware works together.
Saturday, June 25. 2011
Current State of the Quadrocopter ... Posted by Thomas Kolb in Quadrocopter at 19:58
This time I’d like to tell you about my plans of building a quadrocopter.
I already have most of the components, so I guess I will start to assemble them soon. For the record, this is what I already have:
Propellers, a frame and (most critical) crimped PicoBlade wires for the Lisa/M are still missing – the wires are already ordered and should arrive next week. I’m also awaiting a frame from HobbyKing, but that was somehow lost on the way to Germany and they have started investigation about it. But, even if they re-sent it tomorrow, it would still take about a month until they arrive, so I will probably build my own frame for the start .
Anyway, I still hope to get the whole thing airborne before the Chaos Communication Camp in August!
Friday, June 24. 2011
Recently I decided to start a blog instead of updating my old (and totally outdated) website. The old page will stay online, of course, but I will probably not update it any more. The reason why I started a blog is that I don’t have enough spare time to maintain the code of the old site (which I mostly wrote while I was in school, so it is really chaotic ).
Some updates for those who only know me through my old page and wonder why there where no real updates for my programs in the last two years:
« previous page (Page 1 of 1, totaling 9 entries) next page »
Last entry: 2013-04-19 17:12
9 entries written
4 comments have been made
0 visitor(s) online
ProjectsCheap deep discharge protoction for solar batteries»
Hello everybody, recently, I decided to power my Raspberry Pi from my solar battery. ...Musiclight»
Hi again! This time I’d like to show another project I’ve worked on recently. I call it ...Some news about the Quadrocopter project»
Hi there! Such a long time after my last post, here is an update about the Quadrocopter ...The 10W LED Hand Lamp»
Here’s a gadget I finished some time ago: A 10 watts LED hand lamp with dimmer. About a year ...Quadrocopter hardware is complete!»
Hi! The hardware of my quad is now complete and assembled! Yay! As pictures say more ...