Small Prototype Engineering

These are projects that I've built for people or projects I've done for myself. Just for fun, and because i can!! When building a prototype I prefer to use hole mounted components because it's much easier to troubleshoot and modify than SMD components. It's always possible to use SMD components if needed.

2020-06-17 Four4 usb charger

So it was time to make another kickstarter project. At first i needed a reliable charger at home due to that increasing number of gadgets we are charging. When i designed it i was so good that several collegues wanted one and they all liked it. It was then decided to make it as a crowdfunding project.

It uses the 16F18346 controller which is a cheap and feature packed mcu with alot of memory. At first i used a smaller mcu but when starting programming the memory wasn enought. The Oled display uses more than 50% of the memory due to it's drivers. Good to have in mind.

Another issue i had with this newer mcu was that i never succeeded to actually set up the registers correct to use the internal I2C modules. I ended up using software I2C. Slower but works fine in this  application.

Two sided main PCB is used and both top an bottom of the casing is black FR4 material. The sides are 3d printed

I put alot of effort into the product to make it bulletproof and i have worked more than 6 months on it. Had alot of issues with the wall power supply and discussed with the vendor.

I tested and verified everything to the extent that there were no isses left!!

One main feature of it was thet it had almost zero internal resistance and therfore it had very low voltage drop and powerloss at maximum charging power. It had really low temperature at high load!

Click on picture below to check out the campaign movie

The campaign failed unfortunatly bigtime. I had way to high pricing on a complete kit. Since i made it initially for myself i had no thougts on making it cheap and alter on it was hard to change the design.

I learned my lesson. Always keep prices as low as possible. People will NOT pay much even if the product is perfect

2019-03-21 Car security

New cars are often delivered without any alarm installed. And the user does not really want to install an aftermarket because it's expensive and you probably will need to cut wires etc. 

Therefore, I wanted to design a simple alarm that is very easy to install. Of course, easy to install is hard to combine with bulletproof design but with some well thought through compromises I designed an alarm that is.

-Easy to install. Connected to OBD connector, no additional connections

-Detects shock/impact to any part of the car

-Measures battery voltage to control the alarm, neg voltage transients when unlocking doors and higher voltage levels when engine started.

-GSM enabled

There are to ways to detect the battery voltage. One is by reading ADC channel 1, this is used to detect if the engine is started Vbat>14V. The alarm module is not active if engine is on. Also, low battery voltage is detected by the ADC. 

I did a lot of measurements of the battery voltage when unlocking the car and the pic above shows that the voltage level drops with 800mV when doors are unlocked. Great but this is under a very short period, 10us. 

I tried to catch this with the ADC, but the ADC need around 4ms to complete a reading. The built- in comparator module was fast enough to handle this fast transient.

Every time this pulse is detected the software goes into a delay loop for 10min so driver can enter the car without triggering the alarm.

Detecting impact to the car is done by ADXL345 accelerometer. It communicates with the MCU through I2C which is used for setting up the chip but also for resetting it after it has been trigged. The ADXL345 is configured to detect a single tap, when this occurs a logic output pin goes high which is sensed by the MCU. Then a I2C reset command is sent to the ADXL345 chip.

I did a lot of sniffing the I2C bus to the accellerometer chip both to control what I'm sending to the ADXL345 chip, and what the chip responds. I also did a lot of trouble shooting when trying to identify the I2C restart issue

Without having a proper logic analyzer it's impossible to sort out any issues in this kind of signals. I bought a cheap eBay analazyer which did not work well at all. I decided then after Googling to try the Logic 8 analyzer from .

It's their smallest model but it worked great instantly without any time lost trying the get it work. The biggest benefit is that it just works without any issues and on everything. The days and hours one save on using Saleae instead of some weird clone is worth every cent of their "high" purchase price.

Below is the communication between the MCU and the ADXL345 sniffed and decoded by the Logic 8. The analyzer shows also a real good picture of the signals but for this purpose the actual writings are more of interest.

It took some time to find correct settings for the ADXL345 chip to work as desired. The commands above are sent once to the chip when the circuit is powered, and configures the chip with correct threshold levels etc. Every command is first sent and then i read the register to see that correct command is entered. 

The commands to the left are the reset command and is sent every time the accelerometer needs to be reset. 

Pic 16LF1937 has all modules and can be clocked up to 32MHz, which is well suited for this project. Although the code runs on 16MHz. It's required to be fast enough to catch the unlock pulse. I put a lot of effort by solving this by a interrupt trigged by the comparator but it was triggering in a way that was unpredictable, and I didn't find any solution. I dropped the interrupt idea and wrote the code to be fast enough instead. It uses a counter 0-10000, the voltage transient is checked every cycle while the ADC readings are done 1/10000. Basically, it could miss one unlock transient but it's really low risk.

Real life testing.

During development I had one big issue with the pic reset/restarted randomly. That was what I believed initially at least. After a lot of testing I found out that sometimes when the output from accelerometer was trigged and detected by the MCU, it should send the reset command through I2C, but it did sometimes reset. Originally, I used 18F4685 but due to not finding any solution to the restart problem I decided to go with 16f1937. Changing the MCU solved the problem I thought.

Built one more fully assembled unit with the 16F MCU and the restart problem was back. So, I had one unit fully working with the new MCU and unit with restart issue and new MCU. I put a lot of work into solving the issue but could not find the root cause unfortunately. First, I had enabled the i2c module in the chip and thought it woul be a good idea to try the software I2C routines instead and see if that would make any difference, but it didn't.

I got a lot of help from forums on what I could test, but nothing pointed to any root cause and no solution was found. At the end my conclusion was that it might be some timing error that occurs sometimes when the I2C reset command is sent and that will hang the entire routine which will result in main program not executing.

Finally, I wrote some additional code that kept track if reset had occurred or not and then force the whole program into "normal" behavior. Sad to not find the real cause but I felt that I had tried everything. The alarm works well but the code fix is not the best solution!

Since then I have used I2C in several much more demanding projects without any issues more that writing correct commands to correct registers.


Two working units are mounted in a Mercedes C class and one in an old Opel Vectra. The alarm module works perfect in the Opel but in the Mercedes, it is very hard to trigger the alarm. The Mercedes is a much more stable car and trying to shake it will not trigger the accelerometer, maybe if something crashes into it or somebody takes a big rock and throws at the car it will trigger but that's kind of hard to test :)

In future I might make a new version of the alarm equipped with a mechanical shock sensor such as the 801S instead of the ADXL345 and that way make it more sensitive (and cheaper).  

DIY Watchwinder 2018-08-22

Automatical and mechanical watches have power reserve of 30-50h. Leaving them unused for more than that will make the watch stop, and you have to wind it and set time and date. A watchwinder can be used to keep "power reserve spring" winded for a longer time.

It's not recomended to leave a watch on winder for months because the spring needs to rest if the watch is unused. But it's perfect when the watch is laying still for a weekend or so!

When building a winder it's a good idea to have as few RPM's as possible, just to keep the watch winded but not more!

Fortunatly i have a power reserve meter on my Seiko watch where it shows how winded the watch is measured in hours. I  will use this feature to really set proper RPM and not overwind the watches, of course with some added marginal. At the moment it keeps the watches winded but i don't know how much.

I decided to etch the PCB, so the esthethic result is not that great but it works well. The program is simple and can be downloaded for the 16F1847 mcu used for this project. I use two SMD H bridges which can be powered with 2.2V-6V so they will be able to power almost all small motors used. They H bridges are supplied by an adjusatble regulator to set preferred voltage by a voltage divider.

The housing is built of 0.6mm plywood as the cower is bent and 2mm plywood for the sides and bottom.

Also some 4mm balsa was glued to reinforce the bent plywood after it was glued together.

Unfortunatly the casing acts like a guitar and the otherwise really quite geared motors where loud enough to disturb when mounted in the casing. I damped the wood case with asphalt sheets and lowered the motor speed as musch as possible. It helped alot but i never got really satisfied with the noise levels.

First the motor was mounted into the case and i was relying that the tilt of the top was enough to rotate the winder weigth but i needed to add more angle to move the weight. Therefore i 3D printed a small extra console for the motors with greater angle.

The mechanical assembly is 3D printed and both looks and works great. I had to reprint a couple

parts due to the fact that printed parts shrink and holes become to small. Adding 10% on hole dimensions and so will make the real printed part fit perfectly. So a thumbrule is 10% shrinkage.

One watch "pillow" is for smaller watches and the other one has added foam to increase the diameter for bigger watches.

GSM IO module 2018-05-21

Designing a universal module with one 12V input, one 5V IO that can be configured as ADC input and one output that can deliver +5V/~300mA to control external circuits such as relays. I also wanted to use a of the shelf box.

Made a tight power desing with a internal 3A LDO which is intended to be powered from a 5Vusb power supply. Also tried to have a small form factor and use the Hammond 1551RBT enclosure.

As few components as possible were used and PIC12F1840 is used as mcu.

Second time i use the SIM800L module. After this project i can fairly admitt i was lucky with my first project having no issues with the module.

First of all this module can require up to 2A current supply in worst case, this is mainly for short periods but will display if your power design have any flaws. In my previous project i was lucky using a big 7805 reugualtor powered from 9Vdc.

With the tight power design i thought it would be enough to supply the module with 5V and have internal system voltage on 4.6V. It did not work, the Sim800 module did not get enough power when connecting to the GSM net. The solution was to increase the internal voltage to 4.84V and to find an USB charger with higher output voltage than 5V. The Apple 12W charger is the far best alternative for this module. It outputs 5.2V and 2.4A.

Finally there were alot of issues with antenna placement. This module is physichally small and the antenna is close to the electronics. Often the antenna disturbs the GSM module making it lose GSM net and resetting itself.

After many attempts the final solution was to add some copper tape connected to ground as shielding between antenna and module!

GSM update 2017-12-06

Why not make the Home Diagnostic system below even better with extended connectivity thru GSM!

Tested some simple code with EasyPIC7 dev board and the GSM click 3 from Mikroe to see how it can be done. The GSM click 3 is expensive and not well suited for more than prototyping. Fortunatly its possible to buy the SIM800L gsm module for around 8USD on ebay and they both use the almost same GSM modem unit. Same code and ATC commands can be applied on both.

Connected the TX pin of the SIM800 module to the UART input for the PIC. Powered it by 5V.

The code is written in that way if a wireless trigger detects a event/incident it will send one SMS to a pre set mobile number and inform the user which sensor has trigged. Not all events will trigger the SMS function. Recieved mail is one that will not trigger SMS function.

Crowded inside!

Home diagnostics 2017-08-23

Some time ago i realized that i wanted to have some kind of system monitoring water leakage, mailbox, cooler and other important things in my home. One reciever with a display and sound that recieves data/ triggering from several wireless 433MHz sensors. Things that will be monitored are


-Drainage wells (2pcs)




It will also be easy to add new sensors to the system in the future by updating software.

Complete system with RX unit and sensor one for drainage well

3D printed casing

For data transmission a couple different 433MHz transcievers has been tested where the best had very good reach and fucntions but where to expensive. Sine i will monitor many nodes the price of each sensor card i important.

The HC-11 transciever can found on ebay for 2,5Usd and has a reach of 15m indoors with the bundled spiral antenna. Better antenn will improve transmission reach. I have done alot of testing with HC-11 and have not found any cons so far. I'm using default settings for the modules but they can be set by user. Only gnd, Vcc and data pins are used. One thing i noticed that different batches of the HC-11 loads the power rail uneven. I needed to increase the bulk capacitors to 30uF close to the Pic, othervise the Pic was resetted every time it attempted to transmitt data.


The TX units which i call sensors can be used in three ways. The sensor board can be completly off when used in water leackage monitoring and is actived by shorting two probe pins with water. These pins controll the enable pin on a small SOIC LDO. Two CR2032 batteries will provide power for many years.

For the mailbox detection a IO pin is connected to a micro swithc close to the hatch. The sensor board is now always on and draws 800uA in idle mode. Transmission is during short periods and current consumption will be 30mA. In this case a small rechargeable battery with solarpanel is used.

It's also possible to read analog values but this function is not implemented in software at the moment, only supported by the sensor board.

Since many sensor board will be used i ahve tried to keep down the cost to around 5Usd/pcs. This includes

2 CR2032 batteries with holders

1 HC-11 RF unit


1 NMTS4177 fet used as load switch

2 BC847

1 LP2985-5.0 LDO

1 Green SMD LED

and some RC components and header connector pins

The first unit is used as water level indicator in a drainage well. For this purpose i 3D printed a small round holder to connect the sensor wire to which then are held in place by two small screws. These screws will actually sense the water level.


The RX unit uses the same RF module and outputs information on the 2x16 display, in some cases a buzzer is enabled. Since more sensors will be added in the future i have chosen a PIC with as much flash memory (14kB) as possible. 16F1846 has alot of functions and the main feature i use is of course the built in EUSART module.

The way the whole system work is that every sensor sends a unique word depending on where its mounted. The sensor in the well sends the word "Well" and when this is detected by the RX unit, it will alarm and tell the user which sensor has trigged. To save battery life the word is sent 10 times. After transmission is complete the RF module is disabled.

A load switch will output 12Vdc from the RX unit which can be used to trigger external IOs. It can of course also send information to other external units but this is not implemented for now.

I 3D printed the upper plate of the enclosure with holes for the display, push button and some small holes for the buzzer sound. The whole thing is fixed with hot glue inside. There is a small lid on the bottom plate that is attached with one screw and can removed when updating software.

And some final installation pics

USB killer V3 2017-05-12

When i was running the Usbsafe crowdfunding campaign i often got the question if my fuse was designed to protect against Usb killer. At that time i didn't even heard about this device.

Since then i seen alot of videos of what this device can do/destroy, so i decided to purchase one myself and see what it does.

Specifications below is from the Usbkiller homepage

Killer Specifications:

-Input voltage: 4.5 - 5.5 VDC

-Output voltage: -215 VDC

-Pulse Frequency: 8 - 12 times / second

-Pulse current: ≥180A

-CE & FCC Approved, allowing you to test in complete safety.

From this i could theoretically thatt the output power should be P=UxI=215x180=38,7kW.

Of course this is not possible in reality. The high voltage is possible to achieve but not at the same time as that kind of current output.

Basically usb killer is a DCDC voltage boost which takes 5V from the USB power outlet. The killer boosts 5V to around 200V and send it back into the host thru the datalines. Also it can be noted that the voltage sent into the host has negative polarity. Most likely to be able to pass any kind of over voltage protection.

The killer generates high voltage as long as it's powered from Vbus!

Due to the amount of energy the killer produces and the time the pulse is present compared to regular ESD discharges it will destroy most standard ESD protection solutions. It's only a question how long it takes.

Putting really big TVS diodes on the datalines that can withstand the killer is not possible. They have to high capacitance and will therefore make real datatconnection impossible.

I will try to analyze the output from the killer and see if it's possible to build any kind of protection against it and at the same time at least have Usb2.0 datatransfer rate possible.

I use differetial high voltage probes to not damage my oscilloscope and a 10A current

clamp to analyze the waveforms.

Measuring the killer without any load shows that the high voltage output is enabled with small

bursts with around frequency of 8Hz. Also note that a differential probe is used which attenuates the amplitude 10 times. So in the picture below the real amplitude is -157V

A closer look shows that the real energy can be be found within the -157V but the total amplitude p-p is around -200V. The fequency of the high voltage output is 1kHz and the duration of the negative pulse is 260us

When loading the killers output with 16ohm it can be seenn that the first burst pulse is highest and then it declines with time. Channel 1 is voltage and channel 2 is the current

One complete 1khz output burst

Loading the output even harder with only 4ohms which can be considered as a shortcircuit reveals interesting output characteristics. The highest current output is around 6-7A and the voltage is almost 22V. This will result in a peak power at 154W.

By loading the killer with 100 ohms a more realistic measurement can be done. Unfortunatly the results are terrible to see. The killer is really "well" designed, It ouputs high energy very very fast! Results below says it will be pretty hard to build something that can protect the Usb port.





Amplitude inc undershoot=348Vpp

Calculated power > 510Wpeak

There are not many alternatives to design a good protection device for this mad gadget!

The time it takes from power up until the first high voltage spike appears is constant and not affected if load is connected or not, it takes around 80ms

To be continued..........

2017-03-17 3D printing

One thing i have always lacked is the possibility to build custom made enclosures and other smaller mechanical solutions. The 3D printing has been around for a while but i have not found any printers cheap enough and with really high quality prints. Also i'm not amused by having calibrating and tweaking the printer to get sufficient quality. So the need for a plug n' play printer was a must.

By coincidence a collegue had a plug n' play printer he was very happy with and he showed me some printed samples that looked great.

The Zortrax M200 from 3Dprima has exactly all i wan't. U have to use their own filament which is a bit more expensive but every print turns out great without any tweaking.

I'm not used to design with mechanical cad tools at all but the one i'm trying to learn is the one from  Designspark. Below you can see some really simple design i've made just to get started both with the cad program and the printer!

The first print was two small lamps for my daughters dollhouse.

Then the plastic part of the hose for our central vacuum cleaner needed to be fixed/replaced. Buying one for 15$ is way to easy!

2017-02-08 Signal Hound Spectrum analyzer

Since i'm trying to learn more about RF emission and EMC, i purchased a spectrum analyzer. Its hard to find one that a hobbyist can afford, but i stumbled upon the SignalHound which is a "affordable" 

spectrumanalyzer that can measure frequencies DC-4.4Ghz. They have also a bigger unit that can be used for pre compliance testing.

For some reason it cannot handle DC voltage on the input so a DC block i highly recommended. Except this it's a great device with a lot of magic and usablitiy togehter with great software and hardware!

In Europe you can get it from the official dealer Foltronics in Holland.

Foltronics link

Measuring on a 1MHz signal with harmonics


Nixie tube clock 2016-12-15

I will not write alot regarding the electronics since it's not my design. I saw a collegue build this clock and asked if he had a kit i could buy from him. The clock uses russian tubes called IN14 and they have CCCP printed on the back. Also the clock uses a RTC in case of powerloss which is great.

Using a piece of 25mm oak tree gives a nice finnish together with the protective dome which is actually a dome from a surveillance camera. It's a great looking project and i'm really happy with it. Also a cool thing which is not visible on the pictures is that the dome is treated with som kind of UV treatment. This UV treatment makes the gas in the tubes more visible and the tubes glow in even better in dark.

2016-11-16 UsbSafe²

Making a second attempt on my USB fuse, but this time with SUCCESS!!

Added some requested functions and the fuse features now

1Current limit/monitor mode.

2Over voltage protection. (6.5V)

3Anti Juice jacking mode.

4Higher max input voltage (15V)

5Better pcb layout & design.

Follow the link to CrowdSupply and UsbSafe²

Producing 100 units of UsbSafe² requires a jig for production flashing. I use the unpopulated pcb for UsbSafe² with drilled hole at every test point. Pogo pins are mounted in the holes to apply connection to the boards to flash. The pogo pins are connected to the flasher thru a 10pin header.

Dave on EEVblog finds a UsbSafe² in the mailbag! 

Update 2017-03

1st batch of units are ready to be delivered. Itead produced 100pcs. They all look great. Only 4 units didn't work att first. Three had excessive solderpaste which short circuited a transistor. One unit had a faulty transistor that was replaced. Except this they all worked out great.

Crowdfunding summary.

The first thought after having a succesfull campaign is that it's really really really hard to have any real economic success. There is alot of expenses that are really hard to predict. There are alot of small amounts of fees that in the end makes the profit become zero in best case.

Production costs will always be higher than predicted. Import taxes has huge impact on profit and can easily be forgotten. Dave on eevblog has a recomendation to at least sell your gadgets 2.5*cogs to cover all expenses. I had around 2.0*cogs and it was not enough. My profit was none. I barely covered production and shipping expenses!

With that said, i did not loose any money and it has been great fun and experience to follow it through. I learned alot and will not fall into the same traps again.

My main lessons from this campaign are

1 It's great fun and i will do it again!

2 If i cannot set a price=2.5*cogs or more, i will not go through with the idea!

2016-10-10 Heat Chamber

I needed a heat chamber for testing different designs. Having some time over i built a 20L heat chamber in the easiest way. The box is built with 25mm mdf. Using a really cheap STC-1000 temperature controller gives enough accuracy (+-3 degC).

As heater elements two 250W/230V heaters are connected in series to calm the whole system down and not make the temperature variations to fast. Maximum temperature for the chamber is 70degC and takes about 20min to reach. Also a LED lamp for 12V is installed for better vision.

2016-04-02 Sequencer

A small project where a machine needed som extra GPIO connections with a predefined sequencing. 16F630 is used for simplicity. LED's used to display active GPIO's

2016-02-08 Kickstarter

I wanted to try Kickstarter just for fun and the USB fuse was the thing to try.

2016-01-20 EasyPIC7

There are some project ideas i have for the future that require more programming knowledge that i have at the moment. Therefore o purchased a high quality PIC development system that will help alot with learning more coding. The EasyPic7 from MikroElektronika has all i need and much more for low to high end coding. They also have something they call clickboards and these are simple add on boards for adding all kind of functionality., such as BT, Wifi, RFid and many many many more. Also one fantastic feature is that with each click board there is a simple code example that will make anyone get started really fast. Also there are good protocoll libs which i cant't write myself to use. All this basically means that you will get started writing your own code much faster end easier.

2016-01-15 USB Fuse

I often connect wierd stuff to my USB ports on the computer and the risk is that the port is somehow damaged. Off course depending on the PC the USB port is protected in different ways but it feels better to have an external fuse. At the same time i thought it could be good too have this fuse functionality when charging phones, tablets or whatever. With the growing market of endless USB connectivity it's a good ensurance with the external fuse.

There are 5 current thresholds that can be set by pressing a button. This makes the fuse circuit universal and easy to use. Currents that can be set are 500mA (USB1/2),

900mA (USB3), 1.5A (Android charging), 2.1A (Android charging) and 2.4A (Apple charging).

Each set current mode is shown if a short button press is applied. The LED will then blink fast

1-5 depending on current mode. Otherwise the LED blink every 3rd sec.

When a short circuit/ overload is detected the +5V output is disabled and the LED is turned on, the fuse is kept in this state until the button is pressed. At insertion of the fuse to a port it always shows once what current mode is set.

Maximum voltage drop across the whole fuse is around 240mV@2.4A


The mesurement above shows the delay time between measuered threshold and until the +5V output actually is disabled. This delta time is set to 10ms in SW to avoid false triggering such as very short transients. The measurement below is just for reference where the delta time is set to 1000ms

1000ms delta for reference

Comparison between the shutoff curve for 0,5A (left) and 2,4 A (right). As seen there is a big increase of over/ undershoots and also some oscillation for the 2,4A. This is very dependent of what cables are attached to the fuse output connector.

Not everyday i need to use almost all of my lab equipment. Even the homemade dummyload was used to simulate different load currents.

Finally i had a big issue with burnt output load FET's. This happened when the current threshold was set to 2,1 or 2,4A and a overload was detected. As soon as the loadswitch was turned of the FET was burnt.

When this occured i could measure the oscillation shown above on the output of the fuse circuit. The reason for this was to low voltage applied on the gate. It was only 3,3V and it was not enough to turn of the FET, it went into some on/off state and the power dissipation increased until the FET was destroyed. By raising the gate voltage to 4,5V the FET was turned of properly.

Flashing PIC controllers is easy if you have right tools and adapters.

Also measured how much heat the shunt resistor and the load FET develops at different load currents. The highest values at 2,4A are,

Shunt(grey) 61degC

FET(orange) 45degC

Ambiant air (blue) 22degC

2015-12-01 Volvo S60 panel

A well known issue with most Volvo car models from 2002 is different intermittent speed panel issues. Now real troubleshooting was done here because the reason for fault lies somewhere around the four big IC's marked A-D. The connection pins are cold soldered or gets disconnected due to vibrations.

There is a protective colour on the pins that needs to be removed before resoldering. The best way to repair the panel is to use hot air soldering equipment. Have enough air flow to melt and blow away the blue protective colour. At the same time the pins are resoldered and the panel will work.

2015-10-01 801S Vibration sensor

I was asked to design a simple vibration sensor module for a vehicle. The module was intended to trig a gps tracker. The tracker has built in functions for this but the function is only enabled when the tracker is in normal mode. The current consumption of the tracker in normal mode is specified to ~65mA which is alot if the vehicle is not used every day. In standby mode the tracker consumes only a few mA and can be trigged/enabled by pulling an IO high. And here is where the 801S sensor module comes in.

It basically detects a shock or vibration and enables the tracker. It uses as mentioned the 801S sensor with the recomended application circuit. For the logical "intelligence" i used a PIC12F675 which monitors if for example ignition is ON/OFF. There is to mention also a "leave time" of around 5min when the vehicle is turned of,  the sensor module cannot trigger before this time has elapsed.

The only cons with this module is if the vehicle is lets say on a boat it will trig the tracker, This is solved by only having maximum two trigger events possible. To reset the module and get two new events the vehicles ignition must be toggled once.

By this solution the module and tracker together consumes around ~11mA.

With this project i tried out how it works to send gerber files to a PCB manufacturer and get a real PCB's done profesionally.


10 pin header connector used for both flashing the PIC and also for connecting the module to vehicle and tracker.

The 0603 size green led is used for showing in which state the module is in. Just for fun i will use a SPY vs SPY figure as signature on my PCB's.

A table for the pinout on bottom side

Cables to the 10pin header connector

Measurement of the trigger signals. The delay between CH1 and CH2 is set by external passive components and is actually the sensitivity of the module. The longer the delay the less sensitive is the module.

CH1=801S sensor signal

CH2=Output from schmitt trigger to PIC

CH3=Output signal to GPS tracker

Shrinktube as isolation and casing.

2015-09-11 Diptrace

I needed more functions and easier UI than Eagle could provide and after trying out a couple of different cad tools i felt that Diptrace had everything i asked for. Below is the first project created with Diptrace. For the first time i will order PCB's from manufacturer.

2015-06-02 Quanum Venture 

A ready built quad just for fun. I inly added the DJI Naza flight controller and the Graupner MX12 HOTT TX/RX system. There is a bunch of features of the DJI controller such as GPS mode, fail safe mode with return to home function and many more.

2015-06-01 Security System

A friend rebuilt his existing carport to a fully closed garage. Of course he needed to secure it with proper security system that has both theft and fire surveillance. Also i connected this system to his already home surveillance system so that it vill be connected to a security company.

The main features are:

-Two separated NTC sensors mounted in the ceiling above each car for fire detection. Also there is a internal NTC that monitors the temperature of the alarm system itself.

If fire is detected it will activate main home security system by wire. If internal heat is detected there will be an audible tone from built in buzzer.

-Built in backup battery.

-Mains power is monitored and if it's disabled there will be an audible tone from built in buzzer.

-Different logical dependencies to determine if there is doors are forced open or it's a legal entry.

-7seg display for showing status.

-Output for external siren.

-Keylock for enable/disable.

Double sided PCB was necessary.

Development of the FW. PIC 16F1937 is used as main controller.

NTC sensor used for fire detection mounted on ceiling. If temperature is above 55degC it will be considered as fire by the system

Micro switches determines if the garage door is fully open or closed

To decrease the power dissipation in the internal voltage regulator i connected two 1N4004 diodes in series with positive power supply. Here shown wrapped in shrinktube.

Setting timing and delays in the code was easiest to do with the real door hooked up to the PCB.

Closeup of the system fully installed and functional. The letter E in the display is for "Enabled".

2014-12-23 3A Dummyload

I needed a dummyload for different testing in my lab so i started to google for a suiteable design to start from. I found the one from  EEVBLOG #102 to fit perfectly.

The power circuit is basically identical to the EEVBLOG's but i added aditional functions with the help of Pic 16F1847.

The dummyload can handle 3A/ 40V/ 50W. I have tested it with 40W continuous without any issues. Above 40W the heatsink and fan cannot cool the FET enough and it will be overheated after a while. With bigger fan and heatsink this can be avoided. The Pic measures the surface temperature on the FET. Above 45degC the fan will start, and above 85degC the DUT will be disabled to ensure that the dummyyload will not be overheated.

Also there is warning when over voltage/ current/ power occurs.

Closeup of the LM35 temp sensor mounted on the power FET

Final testing of complete circuit

2014-07-18 Simple PCB

A typical example of a tiny project i helped out with.

2014-07-01 Control panel

I needed a control panel for my heater system in my house. The main feature was to be able to set  the temperauter from the panel instead of going down to the basement to set it. Also i wanted to be able to see the ambient room temp. I also added battery backup solution for the room panel.

The Danfoss regulator in the heater has a communiaction bus similar to RS485 but Danfoss has altered to fit their application. My first idea was to hack into this bus but i soon realized that it would be to much work since they used a non standard protocoll.

I therefore decided to  use a model airplane servo to mechanically push the buttons on the Danfoss regulator.

Below  is the  panel mounted in the hallway fully operational.

Before i only used a free demo version of the MIkroC compiler but the FW was in this project to big. Now it was time to invest in a lifetime license. At the  same time i invested in the outstanding  8ch logic analyzer from Salae Logic

Startup of panel with backup battery and testing the servo function

The big 40pin 16F1973 ic mounted on copper side.

The chosen  PIC for this project was 16F1973.  There is a overcurrent protection circuit  to the servo. If the servo consumes to high current the panel goes into protection mode and the  shuts everything of. Then a master reset is needed.

Also needed to test the impact of a long cable.

Mechanical solution of the button pusher

2014-04-02 MikroC License

I have now reached that point where no longer a free compilator is enough for my projects. Therefore it's time to purchase a license from MikroE. One main advantage is that it is a lifetime license key.

2013-12-09 Paintball marker

Since it's not possible to do martial arts for me any more due to different knee injuries i needed to find a new hobby. It became paintball.I own a marker which is of semi pro quality. Often when i play i want to know if  i have few bullits left.

So i built a small levelsensor consisting of a LDO TPS77025 from TI which has 2.5V output, and a Pic12F675 (of course). The circuit is powered by a CR2032 battery. The way of detecting few balls is easy. I use a phototransistor FPT100, that detects light. If there are balls the phototransistor is covered and no light reaches the lens.

The unusual for this project is that it's SMD and the PIC is powered only by 2.5V which is within the specification for the PIC. Also the LDO is a low power variant.A great solution i believe!

There are three  "blink modes" to understand the function.

1- LED short blink every tenth second: normal mode, more than appx 30 bullits in mag2- LED short blink 2Hz: warning mode, less then 30 bullits in mag3- LED on: low battery

Flashing the PIC circuit onboard the small PCB.

Using the logger Wellerman PCS100 to determine battery life time.This time is only measured for normal mode as mentioned above.

The goal was to have at least of 20h battery life time. After 91h the logger crashed and logging stopped. at this time battery voltage was around 2,74V and i consider the battery drained at 2.54V. With this i believe the total lifetime to be around 110-130h. Well above the prediction!

The complete PCB with the FPT100 phototransistor next to the housing

The complete marker with mag and level sensor mounted.

2013-10-24 US to EU converter

Unfortunatly there is not much i'm allowed to reveal regarding this projectMy task in this project was to only write the SW for a PIC16F630 and to give design input by a  example schematics.

Reverse engineering with the help of Tektronix TDS754 scope

Test setup

2013-04-16 Additional documentation of motordriver from 2011

In 2011 i built a small motor driver prototype. Now i got a request for full documentation of the prototype. Unfortunatly i had no schematics or any other info saved.  By sending the circuit back to me i could see what and how things were connected. Nowdays  i'm very carefull with documenting every design.


2013-04-07 Remote controlled hatch opener

I have a hatch up to the attic that i wanted to design a remote controlled opener for. The project below is the second and now fully working version. The first version hade major issues with false triggering when i turned on different lamps in the house and not only triggering on the remote controll.

Click below  to see how it works!!!

The pic below is the fully cased controll unit and the small 12Vdc motor with gearbox. I use fishing wire to elevate the hatch, its durable and has low friction.

I use the electronic from a wireless doorbell for the RF trigger module. This is simple, cheap and reliable. The doorbell circuit is the smallest pba in the picture below.

PIC 16f630 is used as microcontroller and a regular H bridge is driver for the motor. I use a programmer and software from Mikroelektronika to program.

To cad the PCB and draw schematics Eagle professional is used. The pcb is single sided and u might wonder why i use double sided pcb. The answer is, because this was what i had at the moment.

2012-10-12 TPA6120 Hifi headphone amplifier

The objective was to build a hifi headphone amplifier for myself and to CAD a pcb using SMD components. 

The choice for headphone driver circuit fell on the very popular circuit TPA6120 from TI. This is more or less a OP designed for Hifi. A input buffer stage is needed for the driver and for this LME49740 (also Hifi) was chosen.   

The power supply is a double 12Vdc with rated current around 400mA.In the design there are some additional filters and capacitors for reducing noise.Both OP stages are configured with gain=1, for better schematics picture pls email me.

The PCB is single sided with both SMD and hole mounted components. I use Eagle both for PCB and schematics. Also due to heat dissipation there is small heatsink mounted on both  driver and prestage. The prestage gets really warm even with no load. Probably due to it's hifi properties.

2012-02-20 Fuel Gard.

Is a extension module to be used together with any alarm system on the market that has external input possibility.

The module monitors the level in a tank to avoid theft, for instance diesel. If the fluid level decreases in the tank the module will send an enable signal to the alarm.

Most preferable is to use the module together with a silent GSM alarm that will notify that theft is ongoing.

The module has proven to stop ongoing theft . It uses aWEMA S3 level sensor or any other sensor with the same specifications.

The complete system example below contains a tank, sensor, wires, FuelGard module and the alarm module. 

2012-01-20--Powerbox 3000 repair

I recieved an older Powerbox 3000 that wasn't working well. When i loaded the output with the maximum allowed current (2A), it had a terrible voltage ripple. The picture below show the actual output ripple was around 5V.

Opening the case revealed that all of the electrolytic capacitors were really old and probably dry.  Using my homemade ESR meter showed that basically all capacitors were bad with ESR values at almost 10ohm.It should be 1-2ohms for a standard "low quality" cap!

After changing the bad capacitors the output ripple was much better at 2A load, around 13mV.

2011-10-17--The Black Box

A car used on a race track for towing away crashed cars needed to be equipped with additional flash light strobes and other light equipment for safety. The signal to enable the extra light equipment were taken from the hazard warning lights.

The signal from the hazard warning lights are pulsing, but the extra ligth equipment needed continuously 12Vdc. To solve this i built a simple relay card that outputs 12Vdc as long as the warning light is switching. A capacitor is charged and sources the relay with power thru a transistor every time the pulse is low. If the hazard warning lights are turned off the relay releases after 3-4sec and the extra light equipment shuts off.

2011-09-17--Homemade watchwinder

My father owns an old automatic watch from the 1960's that he often uses. If the watch is not used for more than one day it stops and needs to be set again. I built this watchwinder for him so the watch always runs as it should.

It's based on a PIC12f675 and a simple H-bridge made by old BD139/140 transistors to reverse motor polarity. The PIC is probably overkill for this project but they are so cheap and easy to use.

The box is built of plywood which has been coloured brown and then clear coated for the "right" finish. For test purpose i use my cheap Casio G shock watch.

2011--"Silent" audio amplifier.

Many years ago I built an 2,1 amplifier that I still use sometimes. It was rated 2x15Wrms and 100Wrms for subwoofer. I use this amp in my gym. 

Last time i started it the subwoofer was silent. The amp is NOT service friendly and my schematics were really bad and missing a lot. It was hard to follow the signalpath due to bad documentation. Finally I revealed that a OP-circuit which was part of the subwoofer filter was dead. Changing this fixed the issue.

2011--Electric motor controller.

The assigment was to build a motor driver that shifted the rotation in specific sequence. It was specified for 12V and 2A. The small motor in the picture was only for testing and not the actual motor used later in the prototype.

2010--Troubleshooting a motion controller.

A large construction machine was impossible to steer. A techincian identifed the controller box as faulty. It had been water damaged. The box contained two PCB's, one with mainly power electronic  and one with microcontrollers. My focus was to try to refurbish the power controller card. There were several damaged components that were exchanged.

Latest news/ Archive:


Four4 usb charger


Car security


DIY Watchwinder


GSM IO module


GSM update


Home diagnostics


USB killer v3


3D printing


Signal Hound


Nixie tube clock




Heat Chamber






EasyPIC 7


USB Fuse


Volvo S60 panel


801S Vibration sensor




Quanum Venture


Security System


3A Dummyload


Simple PCB


Control panel



MikroC license


Paintball marker


US to EU converter


Additional documentation 


Remote controlled hatch opener


Nikon Coolpix repair


Sparky 400


TPA6120 Hifi headphone amplifier.


Room temperature panel.


Fuel Gard


Powerbox repair


"Black Box"




Sp-Engineering 2019