alitalf: Skiing in the 3 Valleys, France, 2008 (Default)

It all works apart from the software!


I just need to program an Atmel ATtiny44 to measure a couple of analogue quantities and control a fast lithium battery charger, switching between off, trickle charge, and full charge, with detection of battery present, dead battery, and indication of being almost charged. There might be a use for a timeout in one section - or maybe not. Simples!

The charger even (optionally) adds negative incremental resistance to compensate for most of the resistance of the unreasonably thin battery cables. It can charge at 10A in a well controlled manner, and without getting unreasonably hot.

The software control I need is fairly simple - only a bit more complex than could have been done with something completely stateless (eg comparators and logic gates), but, in engineering of any sort, before a job can be done another must be done first, and that is indefinitely recursive. I need it finished by about mid Monday or trouble will result.

First of all I thought that the necessary software was already installed on my laptop, because I thought I had used it for something in living memory. No, the laptop failed and had everything I needed at the time re-installed, so I had to find out what things I need - which turns out to be AVR Studio and Winavr. I have an AVRISP 2 to program with which should be fine.

I have just reached the point of having upgraded its firmware to play nicely with the latest AVR Studio.


I do remember that there need to be some include files to make life easy, and I also remember needing to interpolate and extend the instructions in order to make that aspect of it work.

If When eventually I reach the stage that the header files are where the program expects to find them, so that the port addresses are defined and it is possible to address them by name, there will be some chance I can do the rest of it in a plausible number of hours. After all, the code needed should be simple enough that even someone out of practice like me, should be able to make it work. There is plenty of code memory, so it doesn't need to be optimised to the last instruction.

This is getting too close for comfort - I thought that both the computer and my memory were better prepared for this task. Maybe the missing bits will make sense tomorrow. As soon as I can even make the processor as much as toggle an output, I should be on the home straight.

alitalf: Skiing in the 3 Valleys, France, 2008 (Default)

I am learning to use KiCad with increasing speed, and it is certainly good to have a FOSS cad system that is available for Windows and Linux.

So far so good. However, the mapping of schematic to layout has problems.

Taking the example of a diode, the schematic (drawing) symbol looks like an arrow with a bar across the sharp end, with a connection at each end. One of the possible physical shapes for this can be SOT23, a shape used by several different components, including transistors, mosfets, and double diodes. The standard numbering of the three connections on a SOT23 goes, unsurprisingly, 1 2 3. A normal single diode connects to numbers 1 and 3, while 2 is unused.

Mapping the connections from the symbol to the physical shape requires that the pin numbers match, so if a diode is to use a standard SOT23 shape, its connections would have to be numbered 1 and 3. However, if the diode is to have another physical shape, then pin numbers 1 and 2 might be needed, or maybe even 2 and 3. A single schematic symbol would not work for this approach – but one of the intended strong points of KiCad is that one can concentrate on the schematic until that level of theoretical design is dealt with, and only then consider the detailed physical shape of the parts used. If a different (but similar looking) schematic symbol had to be used for different shaped parts, that level of simplicity doesn’t exist.

The alternative is to have separate layout shapes called, for example, SOT23-diode, SOT23-mosfet, and so on. If there is ever a need to change the dimensions slightly, for example to accommodate a change in soldering process, then all these separate footprints will need to be edited. Meanwhile, back at the diode, with a system like that, the diode connections would be labelled A for anode and K for cathode (don’t ask), and the diode footprint library would have pads labelled A and K.

Most electronics CAD systems have a third type of element, often called a device. That is a file that maps which connections on a schematic symbol match with which connections on the layout footprint, so that for any type of component there is just one schematic symbol, and for any layout footprint shape, there is only one of them regardless of how many different types of part use it.

I am still trying to decide whether there is a logical way to use KiCad, or whether it is (very reluctantly) necessary to purchase an upgrade to my existing EDWIN software in the foreseeable future. Edwin is good, but CAD software is usually very costly, so I am using a version from 1999 which will only work on Windows 7 using the virtual machine, and which I have so far failed to make work under WINE.

alitalf: Skiing in the 3 Valleys, France, 2008 (Default)
My large laptop computer has been unco-operative in some ways. Minus one point for the hardware, for Linux, and for Windows.

The ethernet connection failed a while back, and because the only way to have a hope of repairing it would have required complete disassembly, I decided to use the wireless networking instead.

I now find that the Ubuntu 8.x installation won't work with the wireless card, though it is supposed to have drivers that support it. The card is an intel 3945ABG.

Ubuntu probably does not enable the card, because it never reports finding any wireless networks, and when I set it up manually, it reports zero signal strength.

Under windows, there is the expected signal strength, but accessing the workgroup on windows networking does not work reliably. I have discovered that the problem is with the computer browser service. If any other computer on the network is elected master browser, all is well. If this one is elected master, then it can't access the workgroup at all.

If no other computer is switched on, it is the master and cannot access its own network shares via the workgroup icon, though it can do via the network neighbourhood links that it stores.

It accesses the internet OK, though.

I also notice that an extra protocol has been installed, presumably by an update I failed to switch off in advance: Microsoft tcp-ip version 6, in addition to the generic tcp-ip protocol. Disabling the version 6 does not solve the problem. The properties button is greyed out when tcp-ip V6 is highlighted, and the normal tcp-ip properties are accessible for the generic tcp-ip protocol.

DHCP is provided by the wireless internet router.

A temporary solution has been to disable the computer browser service. In principle I could set up a domain controller, but I don't want to be obliged to have one particular computer running at all times. It is a waste of electricity if I am not using it specifically, and in summer I could sometimes do without the extra heat.

Has anyone any idea how to address either of these software problems? I am not keen to dismantle the computer just to try to fix the network port because: 1) There is a small but real chance that it will cause further damage. 2) The repair may not be possible anyway. 3) It will take the best part of a day to do sufficiently carefully, with no repair manual.
alitalf: Skiing in the 3 Valleys, France, 2008 (Default)

The cause of the very slow "save as" dialogue box is clear at last. It appears that, when you click on the pulldown box on the "save as" box, Microsoft Office insists on making a connection with every network drive that is mapped. That doesn't waste too much time if the only mapped drives are on a server that is never switched off, but in a network where shared directories are mapped on a peer-to-peer basis, and not all computers are switched on all the time, this is not viable.

The solutions proposed by Microsoft are not to map the network drives, or, on the assumption that they are on servers that might have a slow WAN connection, mirror WAN servers locally. Then there are workarounds like running a script on startup to map only those drives that are present at the time - which won't help much here because machines get switched on and off at need.

Open Office does not seem to suffer from this problem, so Hibernia has three obvious choices:

  1. Live with it, now she knows what the problem is.
  2. Unmap all shares, and go through "My Network Places" to get at any share she wants.
  3. Use Open Office.

I would use the last solution if it was my computer this was happening on. It does happen on mine, but I rarely use the "Save As" dialogue, preferring instead to right click and create a new empty document with the correct name in the directory where I want it, then open the new document so that it will always save where I expect it. However, because I am insufficiently rich not to care, the laptop I bought earlier in the year is set up with Open Office - saving an extra cost of over half the price of the computer. Because Open Office can open and save to MS office file formats (though I doubt it translates any macros that may be present) and can also save to pdf, I my decide to change to that on this computer. The only macro that runs on startup is one to add a button to save in PDF form, and that hits me with a series of dialogue boxes when Word opens because it has not been signed by an authority that MS trusts, so switching to OO as the default might be best, assuming there is not too much consumer resistance from Hibernia.

She was very iffy about Firefox for a short time, but now would not wish to go back to Internet Exploder.

alitalf: Skiing in the 3 Valleys, France, 2008 (Default)
I am trying to change to using Thunderbird for email, and much of it seems to be able to be configured as I want. I have not yet found out how NOT to add every email address I ever reply to to the address book, though. Does anyone know where this option is hidden?

Also, have any Thunderbird users got suggestions for the best addons to install?


alitalf: Skiing in the 3 Valleys, France, 2008 (Default)

May 2017

1415 1617181920


RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 22nd, 2017 10:45 pm
Powered by Dreamwidth Studios