View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12795 Members
Join this group to post and comment.
aidvllasaliu
aidvllasaliu • Nov 1, 2007

A future project: Help with microcontrollers

Hello everybody!

I am really new to microcontrollers, really really new, I have ZERO experience on this area. But I want to learn and need everydbodys help.

So a question: I need a microcontroller that communicates with my computer in realtime, it will not be disconnected from the computer at any time to run independent. I will be using this microcontroller in my car and alot of inputs/outputs is a must. I am going to create a whole new interior for my car and the microcontroller is going to controll all kinds of stuff like for example a mechanical solution to make a LCD screen come out a thin slot from the center console, so that will mean that I have to controll a stepping motor.

Thats one example, other examples are hydraulic pumps for each wheel, special made seats that will change position, softness, neck support position, side support (for the ribs), tilt of the seat and so on. A ashtray that will come out from the center panel if smoke is detected.
This last one can be made by using a normal smoke detector that you can find in almost any store, and have the speaker/sirene connected directly to an input of the microcontroller which then will send info to the PC, which then will do something.

So it's alot of mechanics and alot of input/output ports.

I really feel that I can do this and I really really want to do this since computers, design and creation of any kind is my hobby and my passion. I want to make something unique and I will put down alot of energy and time on my free time for this.
So, ANYBODY's welcome to help me out. So if you want to help me you just contact me.

By the way, my car is a SAAB 9-5 2.3T

Regards Aid Vllasaliu
crook
crook • Nov 3, 2007
hey!

You've got a nice idea! Yes, your project will need lot of programming and mechanics. I can help you with that. Are you going to do all by yourself? 😀

To begin with, you will need to be familiar with C/C++ programming to code to control your stepper motors & the micro controllers. Keep us updated about your progress & let us know if you face problems.

...Nice car, friend!! 😀
aidvllasaliu
aidvllasaliu • Nov 3, 2007
Ok Crook.

I am currently familiar to the Pascal language, I use Delphi 7.
But I will probably learn C/C++ pretty fast by looking at examples an by reading tutorials.

Yes I am going to do everything on my own, but with your and other peoples help it will be easier.

What microcontroller should I use? How many I/O ports can a microcontroller have? How do I assemble this controller?

At the start of my project (probably when I have made a stable version of the microcontroller and the softwares for the car) I'm going to launch a webpage in a form of a blog so I can write what the project is about and what I've been doing on it, who've been helping me with what and so on. And when the project is reaching it's end I will write down every person's name that have helped me with it.

So, who can make me a me a microcontroller? At least the schematics. 😀
It would be great if we all could work together, then everybody will have a part of this project.

In the end this will be a HighTech Car with crazy technology. I will not reveal my plans right now until I have launched the blog.

Lets do some Crazy Engineering!

I got the ideas, you got the experience, together whe create. Perfect harmony.

Regards Aid Vllasaliu
reachrkata
reachrkata • Nov 3, 2007
Woah there !!!

From what you have written, it looks to me that you want to develop the main control unit of the car. Ambitious plan there. I work in the Automotive domain and so I have a different suggestion vis-a-vis Crook. If you can find a nice and legal way to do it, then I would say it is simpler that a full fledged solution with motors and other things.

You said that the solution you need is for your SAAB car. I can safely presume that this would be good mid-range to high end automobile. Normally such cars would be having Electronic control units (ECUs henceforth) to control various aspects of the car. Eg: there would be once ECU for the AC system, one ECU for the Air bags, and so on. Additionally, there would also be ECUs which can detect the driver inputs like button presses and joystick movements for the Indicators, windscreen wipers, etc.

All these ECUs would normally be connected to each other via a communication network like CAN or LIN. The communication between the various ECUs would follow a strict and well defined protocol. To explain it using a example - Say the driver presses the right indicator button, which is detected by ECU-A. This ECU-A would send a standard message to ECU-B which controls all the lights within the car.

That being the case, it would be a pretty redundant thing to redesign the whole thing using motors when everything is altready available. Additionally, you would pretty much need to rip open your sooper looking car to fit in the motors and other equipment.

What I suggest is to develop a system that uses this already available communication interface to send commands to the ECUs within the car which you wish to control. Then all you need is a micro controller that supports the same interface available in your car and additionally also has a USB/RS232 interface to your Laptop.

But there are a lot of catches here :
1) The communication protocol (meaning the messages used) are proprietory to the car manufacturer and hence near impossible to get off hand.
2) Even if you manage to get it, such a network within the car, would, like any other network, be secure. Your system will be like a new node in the network and would hence require a predefined address and probable authentication.
3) To get over this problem, you can develop your system like a diagnostic module. Normally car manufacturers do have diagnostic setups which can plug in into the car network and control any ECU in the network. These diagnostic setups are usually used in service stations to detect any problems in the car and even update softwares of the various ECU's used.
4) Also there is the protocol itself to consider, which could be pretty complex like 802.11, involving addressing, CRC, etc. So developing the protocol stack could be quite a task.

Hope all this information helped. I wouldn't say - "These are my two cents", because I think I have given a veritable lecture here.

😁
aidvllasaliu
aidvllasaliu • Nov 3, 2007
Thank you Rechrkata.

I already know pretty much all of that you just told me since my father is a pro-car repairer, he got his own company and so.

I forgot to tell ya'll that my car is a SAAB 9-5 year 1998 so there are alot of things missing in it.

And I have been thinking of using CAN for the microcontroller but don't really know yet. I mean, my microcontroller would need at least 40 inputs and maybe over a hundred outputs for lights, buttons, motors etc but CAN only need one input and one output since it uses a special protocol (people who knows about CAN know what I am talking about).

But my main point about the projects electrical part is to have the main PC (not the ECU) controlling every "extra" thing like those special seats, the hydraulics and everything else on-top and side-by-side with the car's ECU, so if anything goes wrong (which might happen with Windows 😛) the car will still work with it's basic system.

And as you might know, a home PC can handle a lot more than any microcontroller can like multiple screens, multiple sounds sources and so on.
And now when those new Intel QuadCore CPU's are out, hehe I don't even have to get into that. I have actually managed to assamble a PC online with a QuadCore 2.4GHz, 8GB RAM, double GeForce 8600 SLI GPU's, 260GB SATA and so on for a little under 10 000 SEK (Swedish Krona), 6,4 SEK = 1 US $. So a super PC might be the right thing.

But a microcontroller will still be needed to controll the "outside world".
So I need anybodys help to know what kind of microcontroller would be the best.

The idea is simple, PC>MC>Out and In>MC>PC
The PC will send information to the MC which will send information to an output, and when the MC gets an input it will send it to the PC.
So I want to be able to choose inside of my software what I want to send to which output port on the MC, and when the MC gets an input the software will read from which input it came from.
You understand me?

But I know it's not that simple, thats why I need your help.

I am allready working on an graphical user interface which will be in the car and which I will use for other softwares.

So what do ya'll recommend?

Regards Aid Vllasaliu

reachrkata
reachrkata • Nov 4, 2007
As you rightly projected, getting hold of a 40 input and a 100 output controller does not make sense, just because the controller would be too big and costly and the design would require too many wires running all over the place.

So I suggest we decentralise the architecture. That is have one main controller that communicates with your PC only, and other auxiliary controlers that receive and send messages to this main controller whilst also controlling separate aspects of the car. This way you can simplify the design because it wouldn't need big complex controllers. A controller which supports some common communication (like CAN for instance) with 20-25 I/Os should suffice.

This means my suggestion is :
PC---RS232/usb--> Main MC ----CAN or similar ---> Auxiliary MC --> Out
and viceversa.

I am familiar to some extent with NEC microcontrollers. PIC is also a good choice. The choice of a specific controller (in the family) would depend on the architecture and system complexity.

As a first step (even before the microcontroller choice) I would suggest that a list be made of what all you want to control in your car (this would have to be a list with no etceteras).

Once you have this list, next step would be to have a list of things that are already present in the car to support your design (eg: if you wish to control the head rest of your seat, does it already have a hydraulic system you can control or is it currently completely manual because of which you may need to have hydraulics as part of your design).

Once we have these details, it would be fairly possible to come with with an architecture. Consequently that archirtecture would decide which MCs needs to be chosen.

I think the PC user Interface is not a very complex thing to do, so I would prefer to concentrate on the Main MC<---> Aux MC architecture part as also the communication between the MCs.

Cheers
Karthik Raman
aidvllasaliu
aidvllasaliu • Nov 5, 2007
That sounds great. Then one aux controller could be for out ports, and the other one for in ports.

Well I figured that it would be best to make a aux controller with as many out or in ports as possible, as I will add features to the car like all the time.

Here's how many I/O ports I have planned for now:

1. One hydraulic cylinder for each wheel, 4 O ports

2. I was thinking about the seats, since I can use seats from some newer
Saab model I might as well buy a couple of seats from a junkyard. So
then I save time, energy and money on trying to build a mechanical
seat. The only thing I need to mod is the headreast. I dont know how
many motors/hydralic cylinders I need for it like tilt Fwd/Bwd,
higher/lower and moving it Fwd/Bwd. So 3 motors or HC's for each
headrest? That would be 6 O ports for one seat.

3. I was thinking about a smoke detecting device, so when it detects
smoke a ashtray will come out from the top of the center console.
One O port for a stepping motor and one I port for the smokedetecting
device.

4. 4 O ports for turn signal lights to make them fade in/out.


...and there are alot of other things I want to do. Like for example, I am going to have a touch screen covering the center console as much as possible, so instead of having the Air Condition controller I controll everything with the software that I will develop.
But is it possible to have an out port connected to a button and just send a short signal to where the button is connected, to controll it externally? Do you understand what I mean?

And I know it's to much to do at the same time, but thats why I need a microcontroller that can be modified with I/O ports as I need when I need it.

Thank You!

Regards Aid Vllasaliu
xheavenlyx
xheavenlyx • Nov 6, 2007
Dude, great you are taking up this project, but first read read read and see what others have done. I was thinking of building a portable DVD player with 2 7'' LCD's in my car and later maybe my PS2 too.

Now, for looking at other people's design there is a whole group of car freaks+electro geeks out there who done some amazing things! Now, I gotta read this huge forum to actually coment something, but here is the link to that bloody awesome forum!!

www.mp3car.com
======================

New to Car Computing? [​IMG]
[FONT=tahoma,arial,helvetica,sans-serif] Don't know where to start?[/FONT] ​

[FONT=tahoma,arial,helvetica,sans-serif]The Car Computing 101 will help you find an answer to some of the questions you may have. Please spend some time reading our Forums, with over 1 million posts you are sure to find something of interest. Try searching for your vehicle model and reading about how other people installed their car computers. If you still have a question you can start a thread and one of our 70 thousand users can help you find the answer you are looking for. Feel free to contact us for any reason and someone from the Mp3Car team can help you out. If you have more general questions you can post them in the "newbie" section of the forums.[/FONT] ​

============================================

tell me what you think.

and yea before you jump on anything, think of the power requirements and cost. These 2 are the only things that can make or break a project! and from your idea it would be better to use a device with multiple I/O connected to your central processor (computer) instead of a microcontroller 😀 maybe a smaller- affordable PLC might work.

but again, you would have to have a system permanently inside the car. Check the fourms and the things they have made, and the problems they had, you can get really good idea from there too.
ReachR gave some good ideas too.
aidvllasaliu
aidvllasaliu • Nov 7, 2007
Ok thank you for the good information xheavenlyx.
I will check that site out later when I have time.

I have been thinking of PLC to, and I think there is CAN support for some PLC controllers, right? And I have been thinking of all the hydraulics that I want to use, they will consume aloooot of power. But I will still plan and try to make it better.

Regards Aid Vllasaliu
pankaj.sharma
pankaj.sharma • Nov 11, 2007
When your project is over plz let me know
aidvllasaliu
aidvllasaliu • Nov 12, 2007
No problem 😉
Kaustubh Katdare
Kaustubh Katdare • Nov 13, 2007
Oh, how about posting Before & after pictures of your car interiors? 😉

-The Big K-
aidvllasaliu
aidvllasaliu • Nov 13, 2007
good idea... will write that down
aidvllasaliu
aidvllasaliu • Nov 25, 2007
Hi guys!

I have found the microcontroller I am looking for.
https://www.electronics123.com/s.nl/it.A/id.2133/.f?sc=8&category=35

But I need more outputs.

I have decided to make the mediabox for the car first. That is, a 10.4" touchscreen in the centerconsole that will come out and move up so I can use some controlls at the bottom of the screen behind it and a built in slimline DVD drive on top of the screen.


The thing is that about 80% of the centerconsole will be used and there is a saab controlling unit for the car information (time, temp etc etc) and a controlling unit for the climate in th car.

Now, what I want to do is to make a box so I can put theese two controlling units inside, and a webcam that is directed to those controllers.

I will use the microcontroller (the one I linked to) and connect reelays to each and every button of the Controller 2 by soldering to the button connection, and the webcam will record everything that is happening on the screen of it. I will then make a software that analyzes the webcam image so I know what the temperature is set to, what the fan speed is set to and so on. This way I know whats going on with the ACC and then I can controll it from my own software.

This is the best thing I can come up with, since the ACC is needed (duhh) and I have no idea to of how to control it through OBD II.

1. Analyze ACC screen
2. Control ACC unit with MC and reelays
3. Control MC with PC

So my question is, does anyone know where I can buy a cheap MC with at least 14 outputs?
Or, how do I build my own?

Thank you

Regards Aid Vllasaliu
aidvllasaliu
aidvllasaliu • Apr 25, 2017
Hi younger-self!
It's been almost 10 years since you created this thread and I just came across it as I was googling for some other stuff.

First I wanna say that I'm sorry that your beautiful Saab 9-5 broke as you were driving down the highway one day not long after you wrote these posts.

It's great to see you ambitious. Keep it up and never stop dreaming, you will achieve great things in life.

Cheers, from older-self.

Share this content on your social channels -