Solidoodle: A proper fix Z axis wobble

5/16 screw tap?
Just take this heresy to Mordor and drown in the lava of mount Doom!
And use only metric stuff we have a plenty right here.
(c) A salesman at the local hardware store

 

Okay, fixing Z axis wobble, take 2, the proper fix.These instructions are quite complex, so make sure you have all the instrument and skills required. Otherwise, go for simpler lawsy’s fix.
And take care not to kill yourself trying to do it.
It all took about 12 hours of experimenting to get it working properly + a week or so seeking out the 5/16 screw taps throughout the city hardware marketplaces.

IMG_20130112_210544
(more…)

openwrt-sunxi: progress report

I finally managed to find a few spare minutes and make some serious progress on this port.

So, what’s new:

  • Rebased against the current openwrt trunk
  • Initial router name/model  stuff support via uboot env.
  • Now with stable 3.4 kernel from sunxi-3.4 branch. OpenWRT compiles kernel and working module packages
  • sun4i-specific modules like ahci, ir, i2c, etc. are now compiled and loaded by OpenWRT.
  • Instructions for building can be found at the github repo

wrt

 

extreme press’n’peel: prototyping MP2109DQ

Okay, I’m still around here. Somewhere. 😉
If you haven’t heard, there are some really cool&tiny stepdowns: MP2109DQ. I got a bunch of ’em nearly as cheap as AMS1117 linear lowdropouts.
These are synchronos stepdowns, 2 of them in one package. Unlike some bulky LM2596 – no diode needed. Only 2.2uH inductor and a few capacitors and resistors.
Cool things come in small packages: it’s packed into QFN10 (3×3 mm).
However, I didn’t want to put them on my BIG project without testing, so I decided to throw up a small board to test it, as usual. And also check, if my “press’n’peel” and “soldering ninja” skills are high enough for QFN10 (The first time I’ve done that to QFN, actually). Result was a success, from the very first time. Obligatory pics follow, more under the cut.

(more…)

Beware: USB killer-hubs

A few days ago a friend told me he had a nasty crash. An externally-powered USB hub screwed up his motherboard on the laptop just after he plugged in the power brick. He even showed me that hub. A 10-port hub just like the one I got from china (DX or aliexpress – I do not recall). The only difference – he picked up his at a local shop for twice its actual price. So, once I got to my lab, I cracked mine open to have a look what the heck could deal such a damage.

(more…)

stcdude 0.1-rc1 is here.

Well, that was fun, and I can now finally show off with the first release of the stcdude.
stcdude is an opensource ISP programmer for the STC microcontrollers designed to run under linux from commandline. A long awaited sane replacement for the retarted STC ISP Tool written in VB6.
Finally you can get on with the development using the tools you like: sdcc and make.

(more…)

Some fun calculus

Fun with STC goes on. This time it came down to a nice&shiny maths task. So. The Host computer determines the frequency the MCU is running at using 8 16-bit numbers transmitted in the infopacket. These are the raw timer values of 8 samples, that measure some part of a timing diagram. What part of 2 bytes being transmitted ( {0x7f, 0x7f} ) is measured – we do not yet know. From these we have to determine the MCU frequency. Fun calculus under teh break.

(more…)

Say hello to stcdude.

Okay, it’s been a while, since I made any (real) progress on the issue, but now, well, there’s at least something to show.
I happened to be an idiot and spent a few days trying to crack a CRC-16 with a non-standard polynome, and didn’t see that it was a plain sum of the payload bytes. Afterwards, stuff was quite trivial and the protocol – simple as hell. Right now I wrote some quick and dirty parsers in bash and lua to get me the mcudb out of KEIL CDB file processed with ‘strings’. Right now it’s just a plain lua table dump, that can be updated with info extracted from a keil cdb file or by hand. Kind of slow, but for this purpose I think it’s ok for now.
Anyway, my ‘proof-of-concept’ code already does the basic things like getting and partially decoding the info packet:

[necromant@lamia stcdude]$ ./stcdude -d ./mcudb/stc12x.lua -p /dev/ttyUSB1 -i
STC ISP Tool. (c) Necromant 2012
Using mcudb file: ./mcudb/stc12x.lua
Loading mcudb ./init.lua
Done with result 0
Loading mcudb ./mcudb/stc12x.lua
Done with result 0
Using /dev/ttyUSB1 @ 19200
fd is 3
Waiting for an infopacket from MCU...
 --- 8< ---
Part name:       STC12C5A32S2
Magic bytes:     D170
IRAM size:       256 (0x100) bytes
XRAM size:       1024 (0x400) bytes
IROM size:       32768 (0x8000) bytes
Tested ops: FixMe: implement reading of tested ops
Description:
        8051-based microcontroller with 1T(1-clock) High-Speed Core,
        Dual DPTR, 36-44 I/O Lines, 2 Timers/Counters, 2 PCA Timers,
        Alternative build-in oscillator,
        Independent Baud Rate Generator, Programmable Clock-Out,
        32K bytes flash ROM, 1280 bytes data RAM,
        On-chip EEPROM, 2 UARTs, WDT, ISP/IAP, A/D, CCP/PWMm
--- 8< ---

Further stuff is still work-in-progress, diggings showed up, that there might be at least 3 different variations of the ISP protocol, so we're far from full-blown support. But since most things stay the same, after the initial skeleton is ready, adding support for further variations should be straightforward.
For those who want to try out this stuff, grab your copy at my github.