Skip to main content

Posts

Showing posts from February, 2016

Fail: controlling a buck converter with PWM

I wanted a second try on my bench power supply build, something that would allow me to programmatically control the output voltage via an 'Arduino'. The supply already has two buck converters inside the unit, both controlled by their feedback resistors, so it was only natural to try to create a programmable resistor. Resolution The feedback resistors are in the potentiometer with ranges a few kiloohms. Since I'd like the output voltage to vary within 0 and 30V with a 50mV precision the needed resolution is 30/0.05 = 600 steps. That means a way to vary the output with 10 bits (1024 steps). A cheap 8-bit DAC ( PCF8591 ) would provide a resolution of only ~120mV. We should not confuse resolution and precision, but I will break the rules for now. Why a DAC does not work Third, just a DAC is not sufficient as we need to have the feedback voltage adapt to the output voltage. We could feed the input through and ADC, sample it, calculate and output the correct DAC value

Inside stuff - Racechip car tuning thingie

I bought my unit half a year ago, so you can say I have plenty of experience using it. It functions as a man-in-the-middle between the ECU and the injectors. I believe it alters the injectors' on-time and perhaps even the timing with regard to the TDC. See also:  http://hackcorrelation.blogspot.de/2016/04/racechip-tuning-box-part-2-reverse.html Short review I wanted to lower the consumption of my 3L V6 diesel engine to slightly more frugal values, don't care as much about power. Sure, some extra low-end torque would be nice as I feel my particular car is lazy in shifting up. Well, to my surprise, the unit actually does something, so it's not just a random box a la OBD-tuners. By the way, you cannot tune an engine through OBD, the engine protocol is filtered out by a gateway. Just some diagnostics are allowed through. The highway mileage improved from 8L/100km (30 US MPG, 35 UK MPG) to less than 7L/100km. With the default settings (the unit can be adjusted) the l

Essential Android software for power users

Similar to my Windows tools post , this one focuses on tools that make life a lot easier - on Android - or help you pinpoint and troubleshoot problems. AdAway If you cannot live without an ad blocker, this is probably the best one to use. Requires the F-Droid store. Root Explorer Quite expensive at 4 USD but I think it's worth the money - if you have root that is. You can find files, pack/unpack archives, change permissions, move stuff around, handle multiple tabs and work with SMB and FTP shares, Google Drive, Dropbox. There might be some free alternatives (ES File Explorer, Root Browser) around but at that time (~2012) there weren't many tools like this.. Titanium Backup Another paid tool, even more expensive (6 USD, I might've paid less) but I've used it hundreds of times. It does require root as well. You can back up an almost complete state of your phone/tablet and restore it to another device. The backups can be shared between accounts, so you can

I2C, Energia, Stellaris Launchpad and HT21D

A friend asked me to help him connect the HT21D temperature and humidity sensor to a TI board. He's using the TM4C123 board while I'm using the older LM4F Launchpad. The first thing to know is that neither of the boards have pullups adequate for I2C. You need to add a 4.7k resistor from SDA to VCC and another one from SCK to VCC. I've tested it with 1k resistors and it works with those as well. The second thing is that the Stellaris boards have several I2C modules, so you need to select one. Even worse is the fact that the Energia library by default chooses the Boosterpack: if(i2cModule == NOT_ACTIVE) {   i2cModule = BOOST_PACK_WIRE; } So you first need to go into this folder "\hardware\lm4f\libraries\Adafruit_HTU21DF_Library-master\" and edit two files as explained below. Adafruit_HTU21DF.cpp From: boolean Adafruit_HTU21DF::begin(void) {   Wire. begin() ;   reset(); To: boolean Adafruit_HTU21DF::begin(int moduleNo) {   Wire. setModule(modu

Fixing an RF socket, coffee machines and other stuff

This is somewhere between a tutorial and a rant about the X2 self-healing capacitors. The above cap seems fine and measures within spec but the appliance it's set into does not function correctly. In this case it was an RF socket from Aldi operating on 433Mhz. The LED would turn on but the load wouldn't. There was only a small click from the relay. From a set of 4 pieces, 3 have failed in the same way. Sometimes, switching to a lighter (LED bulb) or heavier (washing machine) load would make the problem go away for a few weeks or even months. A [Philips] Senseo Coffee machine failed to turn on - the red light would turn on for less than a second and then switch itself off. A Philips drip coffee maker would turn on initially but turn itself off when starting to heat the water. The common issue in all these cases was the X2 cap, replacing it cured the problem. So if you have the above symptoms just try swapping the capacitor with a new one and see if it fixes the issue.