Small Prototype Engineering
These are projects that I've built for people or projects I've done for myself. 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.
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
-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.
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.
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.
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!
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.
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.
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
I wanted to try Kickstarter just for fun and the USB fuse was the thing to try.
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
CAD vs reality. Seems ok
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,
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.
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
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.
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:
USB killer v3
Nixie tube clock
Volvo S60 panel
801S Vibration sensor
US to EU converter
Remote controlled hatch opener
Nikon Coolpix repair
TPA6120 Hifi headphone amplifier.
Room temperature panel.