Just a quick note, this might have been obvious to other more experienced users, but I thought I had bought some dead ATTiny85 chips on ebay. The first two had worked fine, and then the next three wouldn't respond. Then I got some brand new ATTiny84 chips and couldn't get any of them to work, so I knew there must be a trick.
The short answer it turns out, is that you need to short J3 on the USBasp. Mine didn't even have headers on it, so I had to solder on some pins. This makes it work for 1MHz chips, which takes 8x longer to write. Once the reprogrammable fuses are set for 8MHz you can remove this jumper and write much faster. This is most easily done by writing a program with the Arduino IDE or even just using "Burn Bootloader" which just writes an empty bootloader script and sets the fuses.
The chips should come from the factory preset to 1MHz and all the other defaults, but I guess the first two chips I tried had already been used, as I didn't need the jumper? I worried that the other chips might be dead, or had their fuses set so you couldn't write to them, and looked into devices for fixing them. I decided it was cheaper to just get more chips than such a device. So now I have a surplus!
There was no description of J3 on the USBasp silkscreen and there had been no instructions with the device. I had wondered what it did but assumed it was for special cases or to do with reflashing the device itself (as is J2).
I found this trick buried as a small note in an instructable, http://www.instructables.com/id/The-Idiots-Guide-to-Programming-AVRs-on-the-Chea/step4/Setting-up-your-not-so-micro-computer/
Hope this helps someone like me!
Sunday, August 3, 2014
Monday, September 24, 2012
Migrating to SSD: a faster and more reliable method
I recently bought an SSD and discovered there are several posts about specifically migrating a Windows 7 install from HDD to SSD, which it turns out is a little more tricky than just one HDD to a larger one. The drive has to be "aligned" to sector boundaries like a HDD is, for maximum speed, TRIM needs to be enabled, the system needs to know it's an SSD, the boot sector needs to be restored, etc. These are things that Windows 7 will set up automatically when fresh installing, but when migrating, they have to be set up manually. So they go through a number of steps to make this happen.
I found that most of those options were already set correctly, but unfortunately it didn't seem to help, I couldn't get booting. The Windows installer couldn't find the drive to repair. So I came up with a simpler method which is sure to set up your SSD correctly and therefore get you up and running faster.
This is the short answer, if you're already familiar with this process:
* install Windows 7 on the SSD, letting the installer partition it
* clone your old system partition over the new SSD system partition
* done. (disconnect your old hard drive before booting from SSD the first time)
The longer version, with more general migration advice, follows.
For reference, these are the articles I used:
http://arga.wordpress.com/2010/04/24/how-to-properly-clone-a-windows-7-system-partition-with-clonezilla/
http://www.howtogeek.com/97242/how-to-migrate-windows-7-to-a-solid-state-drive/
Prepare:
* your favourite cloning utility on USB or CD (I used clonezilla on a live USB stick, but it isn't the most user-friendly if you're not familiar with hard drive partitioning)
* install the SSD in your computer, ensure you can access it - try formatting it and throwing some files on it. If a laptop, you'll have to use an external USB connector and swap drives after cloning.
* get your Windows 7 Install media ready
Method:
So if all goes well, that should only take about an hour, including prepping a usb stick to boot clonezilla. 15 minutes to install fresh, 15-20 minutes to clone, plus a bit of time for rebooting, disconnecting and reconnecting hard drives, tweaking BIOS etc.
Let me know if you try this and if it works, or if not why not.
I found that most of those options were already set correctly, but unfortunately it didn't seem to help, I couldn't get booting. The Windows installer couldn't find the drive to repair. So I came up with a simpler method which is sure to set up your SSD correctly and therefore get you up and running faster.
This is the short answer, if you're already familiar with this process:
* install Windows 7 on the SSD, letting the installer partition it
* clone your old system partition over the new SSD system partition
* done. (disconnect your old hard drive before booting from SSD the first time)
The longer version, with more general migration advice, follows.
For reference, these are the articles I used:
http://arga.wordpress.com/2010/04/24/how-to-properly-clone-a-windows-7-system-partition-with-clonezilla/
http://www.howtogeek.com/97242/how-to-migrate-windows-7-to-a-solid-state-drive/
Prepare:
* your favourite cloning utility on USB or CD (I used clonezilla on a live USB stick, but it isn't the most user-friendly if you're not familiar with hard drive partitioning)
* install the SSD in your computer, ensure you can access it - try formatting it and throwing some files on it. If a laptop, you'll have to use an external USB connector and swap drives after cloning.
* get your Windows 7 Install media ready
Method:
- Make a fresh windows 7 install onto the SSD - it takes about 15 minutes. Delete the partitions on it and let Windows take over the partitioning, unless you have a particular scheme in mind. Ensure that you can boot to the desktop.
- Optionally clone the fresh install to an image in case you want it back some time later - but cloning probably takes as long as a fresh install anyway.
- Clone your old partition onto the SSD's partition, overwriting the install you just did. Don't touch the boot sector or partition table.
- Shut down, disconnect the old hard drive, so you don't boot the old one, and also so windows doesn't get confused about drive letters. You can reconnect it later, after booting the cloned partition once, if you have other partitions or whatever that you want to recover, or to wipe it, etc.
- Ensure BIOS is booting from SSD
- Boot into windows on your SSD!
- Ensure the system drive letter is C (if you boot with your old hard drive connected, it will keep that as C and the one you just booted off will get assigned another letter - which gets very confusing, and breaks some programs)
- Optionally shut down and reconnect the old hard drive, in case you want more partitions, or to format and re-use it.
So if all goes well, that should only take about an hour, including prepping a usb stick to boot clonezilla. 15 minutes to install fresh, 15-20 minutes to clone, plus a bit of time for rebooting, disconnecting and reconnecting hard drives, tweaking BIOS etc.
Let me know if you try this and if it works, or if not why not.
Monday, June 27, 2011
Electric placemats
My fiancee suggested a project for me - make placemats that would keep plates warm throughout dinner, and therefore keep the meal palatable (she really doesn't like cold food).
I see two ways to do this - induction heating, and a ceramic thermal mass with heating. Leaving aside the issues common to both, ie how much power would be needed, how to control the temperature, and running power to them on the kitchen table (or whether batteries are even feasible), let's examine the options.
Induction heating
There are some fancy stoves that do this. From memory, it basically electromagnetically induces a current in a metal body with AC, which heats up from all the eddy currents. This requires pots and pans which are suitable for induction, but on the other hand, it can be more safe because you can put a plastic container or your hand on the stove and nothing gets hot, as long as it isn't already hot from heating something before.
However, there are some downsides. Few plates are made of metal, so you'd need special plates, or rather a plate and platemat set, for every person eating. Cutlery is also metal, so it would probably heat up too - you wouldn't want to leave your cutlery on the plate for a few minutes, then pick it up again burning hot! Finally, you have to run AC to your placemats, which means thinner cables than DC, but more dangerous current to have around drinks and knives.
Heated ceramic
I imagine a ceramic insulator/thermal mass around nichrome wire, or tungsten heating element such as used in electric frypans. The base would need to be a good thermal insulator, possibly wood, to stop it from burning the table, which might make it rather thick. You could use AC or DC power. You can use any plates that can stand being warmed.
Let's summarise:
Induction heating - pros:
Safer heating mechanism
Heats faster
Thinner cables
Thinner placemat?
Induction heating - cons:
Requires plate + placemat set
Cutlery is heated too
More dangerous AC
Heated ceramic - pros:
Can use any suitable plates
Choice of AC or DC (DC would have thicker cables, but is safer)
Heated ceramic - cons:
Probably thicker placemats due to insulation
Takes more time to cool off
Heavier?
I'm not sure which of these approaches would use more power, or be more costly to produce. Then there is heating control, but if I solve my electric frypan heating problem first, I can use that solution.
I'm going to ask Hackerspace Brisbane for their thoughts.
I see two ways to do this - induction heating, and a ceramic thermal mass with heating. Leaving aside the issues common to both, ie how much power would be needed, how to control the temperature, and running power to them on the kitchen table (or whether batteries are even feasible), let's examine the options.
Induction heating
There are some fancy stoves that do this. From memory, it basically electromagnetically induces a current in a metal body with AC, which heats up from all the eddy currents. This requires pots and pans which are suitable for induction, but on the other hand, it can be more safe because you can put a plastic container or your hand on the stove and nothing gets hot, as long as it isn't already hot from heating something before.
However, there are some downsides. Few plates are made of metal, so you'd need special plates, or rather a plate and platemat set, for every person eating. Cutlery is also metal, so it would probably heat up too - you wouldn't want to leave your cutlery on the plate for a few minutes, then pick it up again burning hot! Finally, you have to run AC to your placemats, which means thinner cables than DC, but more dangerous current to have around drinks and knives.
Heated ceramic
I imagine a ceramic insulator/thermal mass around nichrome wire, or tungsten heating element such as used in electric frypans. The base would need to be a good thermal insulator, possibly wood, to stop it from burning the table, which might make it rather thick. You could use AC or DC power. You can use any plates that can stand being warmed.
Let's summarise:
Induction heating - pros:
Safer heating mechanism
Heats faster
Thinner cables
Thinner placemat?
Induction heating - cons:
Requires plate + placemat set
Cutlery is heated too
More dangerous AC
Heated ceramic - pros:
Can use any suitable plates
Choice of AC or DC (DC would have thicker cables, but is safer)
Heated ceramic - cons:
Probably thicker placemats due to insulation
Takes more time to cool off
Heavier?
I'm not sure which of these approaches would use more power, or be more costly to produce. Then there is heating control, but if I solve my electric frypan heating problem first, I can use that solution.
I'm going to ask Hackerspace Brisbane for their thoughts.
A better electric frypan heater control
Cooking is based on applying heat to food, ideally in a consistent, controlled way. Electric frypans suck at consistent heating. This is because they use a cheap thermistor, and dump all their power into the element until it reaches the set temperature, and then *turn off* completely, so your steak stops sizzling, until the temp drops enough and it turns the element back on again.
For that matter, some electric stoves also suffer the same problem, but because of their thermal mass the temperature doesn't drop so much.
Gas stoves are highly regarded by cooks, because you can finely control the amount of heating, and it doesn't turn itself on and off randomly at inconvenient times! But gas stoves are more complicated, expensive, require maintenance (replacing gas bottles), and some people are scared of using gas.
Why should electric heating work so badly?? Don't we control electricity? Isn't it supposed to make things more flexible?
Well there is a simple, well-known way to control electric power for motors, heating, etc: Pulse Width Modulation. I don't know why frypan makers don't use it, except that it's a bit more complicated and maybe more expensive. But you vary the % of time you are heating, and you can do it very fast. It changes the control mechanism from desired temperature to % of power to output. And you can do this pretty easily with a 555 timer IC, make the dial control the pulse width, and pass the AC current with a bigass MOSFET, SCR, or relay - solid state if possible, or there will be lots of clicking.
My friend Dylan points out that changing the dial to increase the power just means the % is increased, which is different from the existing functionality where it will dump all power until it reaches that temperature. In short, this means it will take a lot longer to reach the desired increase in temp (or a drop). I'm not sure how to approach this problem. Perhaps a hybrid thermistor and PWM solution, where some fuzzy logic figures out what PWM value to use to maintain the temperature, and nudges it up and down if the temp changes. That immediately brings to mind the idea of using a microcontroller like AVR (eg Arduino), instead of 555 Timer and so on, but I'd like to avoid that, at least in the final product. Still, it could be an interesting project!
For that matter, some electric stoves also suffer the same problem, but because of their thermal mass the temperature doesn't drop so much.
Gas stoves are highly regarded by cooks, because you can finely control the amount of heating, and it doesn't turn itself on and off randomly at inconvenient times! But gas stoves are more complicated, expensive, require maintenance (replacing gas bottles), and some people are scared of using gas.
Why should electric heating work so badly?? Don't we control electricity? Isn't it supposed to make things more flexible?
Well there is a simple, well-known way to control electric power for motors, heating, etc: Pulse Width Modulation. I don't know why frypan makers don't use it, except that it's a bit more complicated and maybe more expensive. But you vary the % of time you are heating, and you can do it very fast. It changes the control mechanism from desired temperature to % of power to output. And you can do this pretty easily with a 555 timer IC, make the dial control the pulse width, and pass the AC current with a bigass MOSFET, SCR, or relay - solid state if possible, or there will be lots of clicking.
My friend Dylan points out that changing the dial to increase the power just means the % is increased, which is different from the existing functionality where it will dump all power until it reaches that temperature. In short, this means it will take a lot longer to reach the desired increase in temp (or a drop). I'm not sure how to approach this problem. Perhaps a hybrid thermistor and PWM solution, where some fuzzy logic figures out what PWM value to use to maintain the temperature, and nudges it up and down if the temp changes. That immediately brings to mind the idea of using a microcontroller like AVR (eg Arduino), instead of 555 Timer and so on, but I'd like to avoid that, at least in the final product. Still, it could be an interesting project!
Monday, April 25, 2011
Find MechWarrior: Living Legends servers
Unfortunately, not a lot of people regularly play this fantastic total conversion for Crysis and Crysis Wars. Whenever they release an update, a bunch of people flood to the servers to try it out, then drop off. This is especially bothersome in Australia, because you can't get a decent number of people (> 5) going on a local server. Thankfully the lag compensation is quite good because I am able to play on US and EU servers with ~230ms ping.
That said, you usually have to drop into the game just to see if anyone, anywhere, is playing. I found a simple way to find out how many people were playing: GameTracker. That might seem obvious, but it doesn't allow searching by mod. But it turns out that all the maps in MWLL start with TC_ or TSA_, and you can search by that.
2011-06-27 Update: As of the 0.5 release, there are now also Arena maps, which all start with SA_. So in GameTracker, you can find them *and* the TSA maps with the same search string. URLs below are updated.
This results in the following two URLs to find all the servers in Crysis Wars:
http://www.gametracker.com/search/warhead/?search_by=map&query=TC_&sort=c_numplayers&order=DESC
http://www.gametracker.com/search/warhead/?search_by=map&query=SA_&sort=c_numplayers&order=DESC
There are almost no hits for Crysis, but here they are anyway:
http://www.gametracker.com/search/crysis/?search_by=map&query=TC_
http://www.gametracker.com/search/crysis/?search_by=map&query=SA_
Next step: extract this data from the website and re-present it. Or do a Javascript hack over the results. Write a script to monitor favourite servers for players and notify. Or any number of things. But this will allow me to poll the servers and jump in when I have a moment :)
That said, you usually have to drop into the game just to see if anyone, anywhere, is playing. I found a simple way to find out how many people were playing: GameTracker. That might seem obvious, but it doesn't allow searching by mod. But it turns out that all the maps in MWLL start with TC_ or TSA_, and you can search by that.
2011-06-27 Update: As of the 0.5 release, there are now also Arena maps, which all start with SA_. So in GameTracker, you can find them *and* the TSA maps with the same search string. URLs below are updated.
This results in the following two URLs to find all the servers in Crysis Wars:
http://www.gametracker.com/search/warhead/?search_by=map&query=TC_&sort=c_numplayers&order=DESC
http://www.gametracker.com/search/warhead/?search_by=map&query=SA_&sort=c_numplayers&order=DESC
There are almost no hits for Crysis, but here they are anyway:
http://www.gametracker.com/search/crysis/?search_by=map&query=TC_
http://www.gametracker.com/search/crysis/?search_by=map&query=SA_
Next step: extract this data from the website and re-present it. Or do a Javascript hack over the results. Write a script to monitor favourite servers for players and notify. Or any number of things. But this will allow me to poll the servers and jump in when I have a moment :)
Subscribe to:
Posts (Atom)