Alan numitron clock
SNES Pi Webserver
USB Volume/USB toys
SNES Arcade cabinet
Game boy projects
Home Presence Detector
Rand Nerd Tut
Carnet du maker (fr)
ATmel blog (defunct)
FOREWORD : this is all based and cloned to a few details to the excellent solution you can find here. All credits for the author, I'm just making small variation based on his work : http://www.obdev.at/products/vusb/powerswitch.html
ardPowerSwitch, except without an Arduino!
Have a windows interface to controll on/off different things plugged around your pc. Ie, turn on/off that DVD reader that you use once a while and that has that annoying switch behind the case under the pc itself under the tv (see what I mean ?). It's a smart version of Auto USB power box, using 5Amp relays to drive power-hog DVD reader, sound system, ...
This project is a good pretext for:
M.Ishikawa's library ) to discover that on Windows 7 64bits Japanese (which happen to be my pc) you can't have this work without you windows running in some test mode for drivers, launching some weird applications, rebooting many times,... and finally having still not work that much. Big deception... So let's forget that and move to the HID solution that should work without a driver.
Ok, USB VCC/GND is a nice 5v BUT the Data wires (D%20/D-) are 3.3volters. How to solve this ? It's explained here, don't try to be the smart-a$$ : http://vusb.wikidot.com/hardware
For the records, I used the solution A, 2nd variation : meaning diode in serial to artificially create a approximative 3.3v VCC. I use 2 diodes in serial and get the predictable 3.6v which I hearsay is "acceptable". Cheap and easy, hope it will work. Btw, ATmega runs fine in 1.8-5.5v range, so no worries. That VCC will trigger the transistor that will drive the relay, but those will use the original USB 5v Vcc to be turned on (transistor C-E).
16 12 MHz crystal, you have to set the fuses accordingly (this is not the default settings, that is internal RC Oscillator with scale of 8 => you run at 1 Mhz)
You should use this site for calculating the fuse or blindingly type the following http://www.engbedded.com/fusecalc/
#SET fuses to use a external crystal (sends an error in the end but just worked fine ... mystery) avrdude -v -v -p m328p -c avrispv2 -P COM1 -U lfuse:w:0xf7:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
This time I can't use the trick "code in Arduino IDE, compile and upload the .hex to the chip", since the libraries used will mostly not work. I will try with Programmers Notepad delivered with WinAVR (a must have!)
All content on this site is shared under the MIT licence (do what u want, don't sue me, hat tip appreciated)
electrogeek.cc ~ Formerly known as Kalshagar.wikispaces.com (AlanFromJapan [2009 - 2019])