Page 1 of 1

microcontroller/microprocessor

Posted: Fri Dec 04, 2009 4:13 am
by haik4096
Hi,

I'm wanting to design an embedded system which will control a vehicle. I'm struggling as to where to start, i bought a book called "designing embedded hardware" however it was of limited use in answering some simple questions as to where to start from;

I'm looking to design a vehicle which will receive input from approx 50 sensors, the processing unit will then perform routine operations on this information to give output to two motors and several servo's. For the vehicle to drive around a predetermined route which is marked out on the ground, like automated vehicles in airports. The processing unit also needs to communicate with a host computer over a wireless network to recieve basic instructions as to where to go next. Storing this information as it goes along. THe unit will be battery powered, so power consumption is an issue however not imperatice as the vehicle will have a facility for recharging overnight and a large onboard battery pack sufficient for the vehicle do drive 2 miles.

I have a basic electronics education, and have done some basic PIC programming in the past for recieving input from sensors and outputting that to two electric motors to drive an unmanned vehicle. However PIC's have no where near the complexity i need.

My basic question is where do i start, i've researched microcontrollers/microprocessors however i haven't been able to find anything suitable or a microntroller complicated to run anything more than a digital watch. I've seen entire units with the processor sat in the middle and various memory modules pre soldered to the board around it, with serial interfaces etc. Does anyone know anything about these.

I don't know whether i need to design my processing unit from scratch, i.e buy a CPU and go from there attaching memory/serial ports as and when needed etc....or to simply buy a unit which i can program from my PC using C or C++ to get the unit to do what i want. And attach all the relevant inputs/ outputs to it.

I've looked into basic microcontrollers such as Atmel, PIC, 8041, Motorola etc...i'm not really sure which way to go and don't really want to spend the money on any more textbooks before i know whihc direction i need to start off from.

I have a lot of inputs/outputs, however i could reduce these using PIC's and logic gates before the signal is fed into the processing unit as i have noticed that most microcontrollers seem to max out at about 32 I/O pins.

If someone could give me a direction from which to go or a microprocessor family which would be most suitable that would be amazing.

The embedded system part of my design is not the most important so i'm not so fussed about buying a pre made processing unit if it makes life easier. I'm not interested in programming in any assembley languages or adressing memory allocations etc. I'd much prefer to simply work with a pre debugged unit and only have to work in the high level language. However i am prepared to start from absolute scratch if necessary working with a processing unit which it is easy to add extra modules to such as memory.

I have come accross all sorts of development tools such as compilers, programmers etc and the need to program a device in circuit. i.e i can't simply breadboard up a device i need to do development work on PCB which wold cost money.

I envisage needing to buy a suitable oscilloscope, etc however my budget can't stretch much more than �1000 for a fully working circuit doing exactly what i need it to do including all the tools i need etc. Not including the vehicle itself.

I do have some programming knowledge in languages other than C or C++ however i think i could work with them quite well.

Heres a breakdown of my system if it helps;

Inputs; a range of sensors decting almost everything in the immediate environment.

Outputs; Motors, servo's, possibly speech and audio alarms.

Interfaces; Wirless over a range of 2 miles to communicate with the host computer. Possibly a GPS module to send the the vehciles location to the host computer over wireless. Some sort of serial output port to directly connect to a laptop for diagnostic checking/downloading the vehicles route history/diagnostics etc.

Memory, onboard ROM or equivelant memory for storing the program size of about 512k. Some sort of flash memory for storing information about the vehicles journey of about 2Mb total.

I've got experience with all the other circuit functions such as sensors, power supplies, motor & servo control its just the building block of the processing unit i need to start with. Something with the grunt and versatility would be great, that is adaptable to a range of inputs and outputs. And also has the capability for expansion at a later date if i start running out of memory for program storage or something like that.

Something that would drain a car battery in 10 minutes would be useless for me, at least two days of operation before it finishes one.

Speed is not essential, however i don't want the vehicle stopping for 2 minutes while it catches up with it's processes. Real time is essential.

I've come accross 8-bit, 16-bit, 32 - bit processors, it seems like the bit size is the amount of memory allocations it can adress or something.

If anyone can give me any help or a direction to find the information i need i would be really grateful. Please post only constructive information. I can fully appreciate i'm well over my head in this. However the embedded system part of my project is only a means to an end, it doesn't need to be a work of art. THe rest of the vehicle is what is where my expertise comes in. I'm fully prepared to do everything that needs to be done to get this to work even if it means hundreds of hours of research.

I'll check this later, any questions i'll reply straight away, i know this reads a bit of a mess so i'm happy to clarify anything in more detail.

regards,
Haik

Re: microcontroller/microprocessor

Posted: Sun Dec 06, 2009 1:05 pm
by CCH Concepts
have you checked on microchips website http://www.microchip.com. there are some really powerful and complex microcontrollers on there.

the idea of using a microcontroller over a microprocessor is that a microcontroller includes all the I/Os and memory you need, where as a micro processor you would have to custom this yourself and this is very complicated.

50 sensors is alot of sensors are you sure you need this many? plus are they digital or analogue sensors?

one problem i can see is even if you do find a micro controller that does have 50 ADC or 50 digital I/O pins this will mean there result will only be taken when called for. this means if something happens and the program isn't looking for it, it wont register it.

i.e.

IR sensor judging distance to an object.

sensor judges the distance, moves onto the motor control routine. but then the object moves closer, as the program isn't looking for this now it wont know it moved and you robot crashes.

what you would need to do is have major sensors such as moment using interrupts.

so IR sensors judges distance

motor controls start

object moves, triggers an interrupt and the new position of the object is taken.

motor controls start again.

now what i would suggest is you group your sensors together.

i.e.

all motion sensors are grouped together.

there outputs are put on a shift register that converts the parallel signal into UART. this would then mean you could limit your sensor inputs the the micro controller.

movement bus
gps bus
temperature bus
and so on one bus for each group of sensors.

the micro controller will know what sensors does what, but this will limit the pin count of the microcontroller and complexity of the circuit as only a few busses will be needed.

now when something changes on that bus some logic can trigger the interrupt pin making the microcontroller check that bus again and change its response accordingly.


this is just off the top of my head, i can help more but there would probably be a charge.

Re: microcontroller/microprocessor

Posted: Thu Sep 30, 2010 12:13 pm
by Weazel
also on wat he says u can do a fast reading on all sensors ie how tv picture motion works idea read all the inputs fraster then nesasury to do its caculations also make it esaier dont have the main program in the pic run it in laptop and use pics as a interface between it old p2 p3 do this may need to make a seiral adptor to read mainy pic on 1 port and u can use small pics to read groups of sensors to cut down cost etc and look at multiplexing inputs adding sensors info into a single word count and yea fast sensor reading beound needed level to prosses info and react etc i would look at smart drive and ecs fisher pikel washers controlers if can find some that are being bined and look at a car ecu fo ideas owe and a simple 7 seg led clock bed clock these use fast switching pricple it displays sum of the numbers then deplays the other in fast pace to give elosotion of the display makes pin count reduced on both chip and display the leds are hooked in both direction on dif segments

Re: microcontroller/microprocessor

Posted: Wed Oct 13, 2010 3:49 am
by fabelizer
That amount of inputs is the challenge. There are I2c port expanders. The bus supports 127 different devices, with each port 1 bit wide, 8 to an expander??

Read and control through a micro computer board based on an atom processor. You can get small micro MB for $50-60 USD. Ports are available to bit bash I2c and could support wireless through a variety of standard devices.

Where to start is defining each and every subsystem, then sensor, then determining what you need to communicate with them all.

-fab

Re: microcontroller/microprocessor

Posted: Thu Nov 04, 2010 9:36 am
by tubmanaxton
Some microcontrollers allow higher priority interrupts to interrupt lower priority ones. This allows software to manage latency by giving time-critical interrupts higher priority (and thus lower and more predictable latency) than less-critical ones.
Since the emergence of microcontrollers, many different memory technologies have been used. Almost all microcontrollers have at least two different kinds of memory, a non-volatile memory for storing firmware and a read-write memory for temporary data.

Re: microcontroller/microprocessor

Posted: Sun Feb 13, 2011 1:43 pm
by haji
In my opinion - the best platform for your project is the Silabs series of processors. If you look on their website you'll find loads of different target boards with loads of I/O and they're a lot faster than PICs. They are 8051 based and there are loads of examples. Theres a free C compiler available and a limited keil C compiler with some of the Dev kits (Mouser, RS, Farnell etc)
Good Luck!

Re: microcontroller/microprocessor

Posted: Mon Feb 21, 2011 6:11 am
by mileytipton
hi
as you told you will going to use different sensing devices than I Like to suggest microprocessor instead of micro controller actually It just wht I thought because I guess while using micro controller generally get more confused with its stack pointers and with other such register while this is not the case while coding with microprocessor