I wanted to thank everyone who contributed to my earlier posting as follows:
Microcontroller newbie needs some advice re. PICs and AVRs.
https://www.eevblog.com/forum/microcontrollers/microcontroller-newbie-needs-some-advice-re-pics-and-avrs/Building on from this I have decided that a good place to start developing my AVR, PIC, ARM expertise would be to 'enhance' my very average car which is a Holden Commodore 1995 VS Wagon 'Executive' 5-speed manual.
For the benefit of the international audience....this is what I drive.
http://en.wikipedia.org/wiki/Holden_VS_CommodoreMy car is the 'budget version'. No airbags, no power windows, no car alarm, no fancy suspension or brakes. It's the best damn car that I have ever owned. It is so reliable and very good value for money.
Now being a 'tech head' with a ham radio licence (ok...I'm not registered, but I have the certificate, so I can register a call sign any time). There's some nice HF, VHF, UHF gear that own I would like to install, not to mention a swag of other enhancements, such as power windows, a power aerial (sorry Yankees, I know I should say 'antenna', but you'll never force me to say 'soddering'. I refuse to stoop so low. Dyslexia should be treated and not encouraged.) better interior lighting, a GSM signalling alarm system, a GPS module, temp sensors and so on.
With the 'enhancements' comes a lot of 'electronics' infrastructure to control all of this. The idea is to create
NODES around places of interest such as a NODE inside the front right door, the left front door, the rear right door, the rear left door, the tail gate (I have a wagon), under the bonnet, behind the dash board and so on.
The idea would be to use an appropriate heavy gauge single power supply that goes to each NODE and an automotive data network that connects all the NODES together.
Now before you get excited and start suggesting that I should use CAN (
http://en.wikipedia.org/wiki/Controller_area_network) because CAN is used by the automotive industry in today's modern motor vehicle there is the following to consider.
1. The vehicle already has an existing ECM that looks after the running of the engine. In no way am I interested in interfering with this side of the car. My enhancements will simply monitor what is going on. So I might 'sniff' the 8192 baud ALDL OBD-I interface to monitor what the engine is doing.
2. The CAN standard is a 'full on' synchronous data communication protocol with very close similarities to IEEE-802 (Ethernet). A research of the internet reveals that a relatively significant investment (compared to an ATMEL ATTINY13) in hardware (such as AT90CAN32, AT90CAN64, AT90CAN128) or quite a bit of clever programming (if no CAN H/W support) if we are going to attempt to 'bit bash' a synchronous data communications protocol such as CAN.
My concept is to use an ATMEL ATTINY13 if the NODE (see defn. above) has only one 'parameter' (a parameter is 'is there water in the radiator' or 'is it dark' or 'did my microphone register a BANG' to register at what time someone crashed into my car). As you know there are all these wonderful modules (aimed at the art of Mechatronics) that you can buy on eBay or Aliexpress. I don't want to have a mix of I2C, 1-Wire, SPI, etc signals running around the car, so I am looking to standardise the data communications interface that I use.
While the CAN implementation appears to be impossible with an ATTINY13 it would appear RS485 is quite doable or perhaps RS422 with my own in house protocol. The idea is to use the ATTINY13 as a 'gateway device' that provides a unified standard where there is variance in transducer interfaces.
Therefore I would develop the following gateway devices based around a ATTINY13.
RS485 <------> I2C
RS485 <------> SPI
RS485 <------> 1-Wire
RS485 <------> DIO
As some NODES might be more complex than simple RS485 gateways than I describe above consideration would be given to more capable AVR devices, but using the same RS485 interface.
One RS485 network supports 32 devices, so this will need to be taken into consideration.
This would mean that all I need to do is distribute a 'power rail' (a heavy duty cable) and a simple twisted pair for the RS485 data comms around the car. This would allow for expandability, so that if I later wanted to add a feature such as 'monitor if the petrol cap is open' (sorry Yanks...I mean gas....What logic is there to calling a liquid fuel 'gas'? If it was propane I could understand. I don't get it.), I would simply add a node to the RS485 lines and the power for the NODE device from the distributed power rail.
This idea is to remove the complexity of automotive wiring. To avoid things such as complex wiring looms.
What do you think about my idea of running RS485 in an automotive environment? I know that for automotive applications CAN is the 'bees knees', but because I want to distribute (deploy) lots of various distributed simple inputs and outputs (such as power relays inside the door that control the power windows).
Has anyone ever dabbled with this kind of automotive after market application?
-----------------------------------------------------------------------------------------------------------
On a similar subject....not that I would try and connect the following to the above system.
Does anyone know of any after market airbag crash safety equipment that could be installed into a vehicle that does not have this feature? Granted that there is probably government regulation in most civilized countries that prohibits the installation of aftermarket airbags.
It is physically so easy to install a steering wheel (acquired from a motor vehicle wrecker) fitted with an airbag into a car that doesn't have one. Building a controller based on a ADXL345 accelerometer (see attached ADXL345 datasheet for details) or similar it should be possible. Given the importance of the controllers responibility and the consequences of a system failure I would envisage that a design having an enormous amount of fault tolerance and system redundancy to avoid 'system failure'.
A very unacceptable (if not fatal) mode of failure would be that of a 'false trigger' caused by hitting a pot hole. My survival instincts tell me to not even attempt something as idiotic as installing an airbag in my car and designing a controller for the airbag, but perhaps someone out there has some experience with and might be able to shine more light.
To my American friends please don't take my jovial banter too seriously. As I was writing this several times it occurred to me that I could write words one way or another. So I added some light humor and there was no intention to offend anyone. If anyone took offense I apologise (damn Yankie spelling checker is trying to force me to spell the word as 'apologize'. ) unreservedly in advance if anyone took any offence to what was written.