Some info on the LED LENSER M7R charger

It’s getting darker for every night here now. So I dug my LED LENSER M7R flashlight out of my closet.

However. I couldn’t seem to find the charger anywhere around..

And since I wasn’t sure if the charging circuitry was embedded in the flashlight itself or in the charger, I did a mini teardown before trying to hook it up to my PSU (in fear of damaging the battery).

It turns out the charging circuit is embedded in the back of the flashlight on a small circular PCB (sorry for no pictures).
There was, I think, 2 ICs on the PCB. But I could only read the markings on one of them without desoldering the springterminal.

It turned out to be a LM3658 (marked L111B on IC) from TI:

Click to access lm3658.pdf

I gave it 5V with current limit at 600mA from my lab PSU. And it went into Pre-qualification mode, drawing 50mA, for a couple of minutes, before going into constant current charging mode at 540mA.

Center is positive (5V) and outer ring is negative (0V).


Charging LED LENSER M7R with lab PSU.

This might not be useful information for anyone, but you never know.

CA3080 Tremolo effect (with audio samples)


Here is a tremolo effect I made this weekend. It’s CA3080 VCA is based on a design from Thomas Henry’s “Making Music With The 3080 OTA”.
The modulation signal is generated using a 74HC14 inverting schmitt trigger configured as a relaxation oscillator.

I’ve built and tested the circuit on breadboard and stripboard. And as long as the input signal level is kept in range, it seems to work pretty well.

The next version will definitely have a mix/bypass-potentiometer.

schematicBreadboard proto Stripboard


Nord Electro 3 Electric Piano

Nord Electro 3 Organ


All audio recorded trough Focusrite Saffire 6 USB soundcard. No other effects applied.



Feel free to ask questions.


Simple RIMS brewing system

Me and my friend Torstein have always enjoyed a good beer, and have recently got hooked on home brewing. Actually, Torstein did some extract based beers, and then I joined him on brewing a partial mash brew (extract + special malt). And now we’re doing our first All Grain beer! This gave me a perfect opportunity to do another DIY build.

Mash Tun

I got a 37litre stainless steel tank from a colleague, which I polished and attached some hose barbs, a ball valve, some handles and a fitting for my temperature sensor.

Handles (left side), temperature sensor connection (front), hose barbs and ball valve (right side). The inlet and outlet got swagelok fittings on the inside for connecting the false bottom and the top manifold.

False bottom and top manifold

False bottom made from stainless steel pipe sandwiched between 2 perforated aluminium sheet metal pieces using 3 stainless threaded rod and  acorn nuts. Pickup tube is ø8mm swagelok.
A bit pain to clean this, but it does a great job at holding the grain away from the pump.

Top manifold is just some bent SS tubing, with some holes I made using a dremel. It’s not perfect but it works for now.

Wort Cooler

I made the wort cooler of some ø10mm SS swagelok tubing and connected a PVC hose with some hose clamps.

Temperature control and circulation

The temperature control is just a PID controller switching a solid state relay which then switches the hot plate. Pt100 temperature sensor for sensing the mash temperature.

The pump is a circulator pump which can withstand temperatures up to 110 Degrees C. It got 3 preset speeds which can be selected using a switch on the pump itself. I also got some hose barbs for the pump.

Here’s some more pictures (by Torstein)

Automatic drink mixer (aka Drink-O-Matic Deluxe)

While browsing the web, I found this automatic drink mixer called Bar2D2. A very nice build, which inspired me to do my own automatic drink mixer. I didn’t need it to move around by itself, which simplified the construction a lot.

Instead of using compressed air, I went for a solution using pumps. This might be the biggest flaw in my design, as it shows under testing that the pumps stirs the beverage  so much, that there’s is no CO2 left when it hits the glass. So be careful if you’re planning to go for a pump based solution and need to mix carbonated beverages.


  • 6 tanks (juice bottles with the bottom cutted off)
  • 6 pumps
  • 6 solenoid valves
  • PVC cup for mixing the 6 lines together (milled on lathe)
  • Aluflex (aluminium profiles) based frame

The bottles, I bought at my local grocery store. Pumps, solenoids, hose barbs and silicone tubing I bought on eBay.
The PVC cup and aluminium for the frame was just old cuts laying around.

Electrical (and software)

  • 12VDC Pumps and solenoids
  • Atmel mega48 Microcontroller
  • Powertransistors for pumps and solenoids
  • USB to UART adapter for communication with PC
  • IR proximity sensor for cup detection
  • RGB LED strip for increased fancy factor and machine state indication (fading colors = idle,   green = cup detected,   red = filling in progress,   blinking green = drink is ready)

Old, extremely current hungry power transistors, with smaller signal transistors in front. Poor design, but it was what I had at my hands at the moment.

A simple description of the firmware on the microcontroller:

  1. The atmega idles until it detects a cup.
  2. Waiting to receive mixing ratios from the PC.
  3. Now it will begin to fill the cup, as long as the cup isn’t removed by operator.
  4. When the filling is complete, the LED strip will blink green until the cup is removed.
  5. Return to idle mode

Some of the key features in the PC client software:

  • Choose the currently loaded ingredients, and set cup size
  • Select drinks that can be made with the ingredients loaded
  • Make your own custom drinks
  • Randomizer function, which makes a drink with random mixing ratios
  • Manually run each line (pump+solenoid) for testing and cleaning purposes

All AVR code was written in AVRStudio4 and compiled with avr-gcc/WinAVR. All PC code was written in LabVIEW 2011.


Building the Drink-O-Matic was great fun, both the mechanical, electrical and software part. But I learnt a few things (which is the biggest reason I build things like this):

  • Air in the pumps, causing bad pump performance (Allow venting, or see next point)
  • Loss of carbonation because of the stirring (Go for a compressed air solution with pressure regulation instead of pumps)
  • Inlet pressure on pumps dropping propotional to the tank level, giving a flow rate dependent of tank level (Speed control of pumps with calibration curves in firmware or see previous point)
  • Burned some transistors by forgetting current limiting resistors on some of the power transistors (Don’t be me)

Feel free to ask me questing about this build in the comment section or via mail.

Here’s some more pictures (by Torstein) and a short video clip. And remember, drink responsibly!

CEM3394 Test

The CEM3394. A synth-on-a-chip, made by Curtis Electromusic Specialties, during the golden age of synthesizers.

The IC contains a VCO, VCF, VCA, a wave shaper, an external mixer and a cool sounding VCF modulator. Check out the datasheet for
a nice and tidy block diagram.

The CEM3394 was used in the Akai AX60, Sequential Circuits Six-Trax, MAX, Split8, and is still being used in the Doepfer Dark Energy.

Since I didn’t have much experience with op amps, this project became quite a challenge for me.
However, after some reading and simulation, I got around and did a PCB layout.

For pitch and gate CVs, I used the MIDImplant from Roman Sowa. Worked perfectly out of the box.

This slideshow requires JavaScript.

After populating the PCB, wiring the pots and hooking up the powersupply, I fed it with some MIDI from my computer and it actually did work
on the first try. Didn’t expect that. I tend to mess up the simplest circuits most of the time.

Audio demo:
Filter modulation, filter, waveforms and more

3 tracks with the 3394, and software drums.  A bit out of tune.

Here is the schematic. Please take a look at the red note..

Getting started with AVRs


If you have no experience with microcontrollers, programming or basic electronics, I recommend that you check out Arduino before starting with AVRs.

Getting started with AVRs is not that expensive or time consuming as you might think, but you should have some basic electronics skills, and some programming experience will make things much easier.

In this guide, I’ll use the following hardware.

-AVR ISP MKII clone (~$20-30 from eBay)

-A simple developement board with an ATMega128 ($25 from ebay)

The ISP (In System Programming) programmer is used to program the chip via USB (or RS232 on older versions)

On the software side, I’ll use AVR Studio 4 with WinAVR under Windows XP. If you’re using linux or mac check out this guides: Mac, Linux/Unix.

Continue reading