3.3v to 5v inverter by bc547

Mind that for fast signals (ie sdcard's one) you need to drive the CMOS inputs (ie sdcard's inputs) with low impedance output drivers (ie push-pull as it is with atmega). The transistor level shifter might work with TTL logic, but with high impedance CMOS inputs (ie 10Meg || 10pF) it will not maintain the fast edges (because ie low->high transition will be done by 10k push only)..
Better you use low value resistors dividers or a none-inverting driver..