PC104 on a mini race car

Hey guys, first time posting here. I'm new to PC104. At uni we are building a mini electric race car and the team decided to use a PC104 to run everything including data acquisition (don't know why they opted for a ground up system when there were packages available for noobs)

We are using two brush less DC motors integrated with 2 inverters (DC to 3 phase AC) and IGBT switch. The controller is: Advantech PC/104 Model: PCM-3380F-M0A2E Processor: Celeron M 600MHz

Lots of sensors such as wheel speed, motor speed/torque, temperature, current, voltage.

My question here is that can we install a windows operating system such as XP in the PC/104 and and use that as our interface?

Also, what software is needed for programming the board once the OS is installed? So far we've a stack of about 6 boards for motors, DAQ, inverters etc.

The DAQ board has a 1GB card, is it possible to save data from sensors on the car to the 1GB card and transmit it simultaneiusly to a remote pc using Xbee?

Appreciate any advice/suggestions as we are running short of time and have very limited knowledge of electronics. All parts have been purchased, its just that we have to make it work!

Cheers

--------------------------------------- Posted through

formatting link

Reply to
Darth
Loading thread data ...

e

I would argue that until you know what you are actually doing, it doesn't matter HOW much crap you have bought; you can't say you have "all parts" until you know "of what?". I do agree that catalogs are very exciting, but that's no excuse.

You can run XP on the machine, of course. Whether you want to or not depends on the realtime requirements and how much work the acquisition card offloads. You should benchmark it, since you won't get a useful answer out of the vendors.

Reply to
larwe

Um. They may know it is "all parts" because (1) they are running short of time and cannot buy anything more without running completely out of time, and (2) they have no more money to buy anything else. Which may define "all parts" for all solutions in the set -- possibly a null set. ;)

Jon

Reply to
Jon Kirwan

Using Windows for a control OS. You are nuts here. You need to put excess consideration to safety and reliability. Windows is not that OS. Windows also does not offer a predictable latency and schedulling model that you need for real time control like motor control and safety monitoring.

You should really consider designing your own round robbin main executive dispatch loop to run something like this.

--
--

Michael Karas
Carousel Design Solutions
http://www.carousel-design.com
Reply to
Michael Karas

I know you are still learning, but it is time to get real here. At the present time it is sounding like the other members of your "team" have the made the hardware choices and you are the software guy who will carry the can for failure if it doesn't work. Weren't you in on the organisation and selection of the hardware? Did the team do a proper evaluation prior to selection of the hardware or did they just browse from a catalogue for bits that could just plug together. Were the "noob" kits adequate or did they have short-comings? If I were the tutor marking your efforts, I would want to see some evidence that the choices you made had reasonable grounding logic behind them.

Forget running Windows (of any flavour) as that will most definitely be so non-real time. Then sit down and really have a think and sketch out (in a mind-mapping sort of way) what you really do need in the system (function- wise). This diagram should include the user interactions with the system. Until you have done this you cannot be sure you have all the assets required. The system structure will start to show itself to you and you can assign the resources properly to each part. Test the adequacy of the design at all the steps to getting the best design structure.

Then answer the safety questions. Like, if the processor is controlling the motor speed, what have you in place preventing the vehicle running away at an uncontrollable speed? I am sure you will start seeing more such questions too. Re-arrange your structure to accommodate the ansers to the safety questions and test adequacy of the design again.

Consider that you may need to put in more than one processor (personally I usually configure a minimum of one processor per actuator). The processing load and safety aspects may be too much for one processor.

Up-front design organisation is a more valuable commodity than even the most expensive super-fast processor. Quite often my designs are achieved with a collection of small, inexpensive, processors and peripherals. Those projects that have a GUI interface will tend to be done such that the GUI is on a Thin Client and has no way of impacting the normal safe operation of the rest of the system.

--
********************************************************************
Paul E. Bennett...............
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

to

a
3

as

on

have

its

bits

(function-

can

design

the

questions

most

projects

of the car and have finished so thought I should lend a hand to the electrical side as they are struggling. I should also point out that we are all mechanical and automotive students and apart from me, everyone else in the team are working in this project as their final year thesis, i.e. suspension, steering, chassis etc. The parts were ordered at the start of the year by the person in charge of the electrical stuff and we are over the budget atm as batteries were over $12,000. Honestly, not sure how/why they decided to take this route. This is most of the parts:

*40Ah, 3.7V Battery Cell (lots) *PC104 Board *PC104 PWM *Voltage Transducer *Current Transducer *Power Supply PC104 *IGBT *Resister *High Power Wire *Copper cable lug *Hall Effect Throttle Box

So far, we've managed to get one motor spinning using matlab on a pc (simulink I think). Ideally, we would want both motors spinning while applying throttle (using a potentiometer).

Can someone kindly tell me in the simplest form how we could achieve this? What I mean is how to make use of the PC104. Do we program it, or install a OS and put the program in there? What programming software to use? How to integrate the sensors? what is real-time?

I hope I'm making sense. Please correct me if something is out of context.

Once again, really appreciate any help.

--------------------------------------- Posted through

formatting link

Reply to
Darth

Also, would this particular motor controller make things any easier:

formatting link

Model 1230

--------------------------------------- Posted through

formatting link

Reply to
Darth

Do you have a proper charger and battery management in place for these cells?

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)

Hummingbirds never remember the words to songs.
Reply to
Stef

cells?

mail)

Charging the batteries has been taken care of but I'm not sure about the battery management you are referring to? Is that when its operating in the car? The electrical system summary shows the power supply connected to the controller unit.

--------------------------------------- Posted through

formatting link

Reply to
Darth

forget win if you want to control the car using the PC/104, ou need something real-time. If you don't want to reinvent the wheel and have an "easy" dev environmnet try Linux RTAI (for example).

If you use Linux RTAI you can interface with Matlab/Simulink (and I think Scilab/Scicos too) and do all the programming there.

Bye Jack

Reply to
Jack

Is there anyone there who is actually an experienced programmer, at all? Or only mechanical and electrical folks who can install software, perhaps, but no other experience?

I'm not clear on these points, especially now that you've written as you have, above.

What programming skills exist there?

Jon

Reply to
Jon Kirwan

The Advantech web site specifically mentions (and sells, I gather) Wins XP, Wins XPe, Wins CE 5.0 / 6.0. I don't know anything about "wins" unless it just means Windows via Microsoft Corp. I'd guess XPe is a customized, embedded XP.

You should directly contact Advantech and ask your question, though. You should contact them and simply ask your questions about setting up a development environment. That's assuming, of course, that any of your team _can_ program.

A compiler and linker comes to mind. This can be done on a host PC with the results tranferred over -- suggesting the need for some method of transferring files -- or else developed by editing with a video card temporarily installed on your system, if you also have a monitor hooked up and a way to keyboard text into it.

But I'm not convinced, especially after your latest posts, that there is anyone there who can actually do the needed programming.

No idea. That's something you should attempt to figure out, though. The required data bit rates will be a big help in figuring it out.

The real problem, it seems, is that while you may have the bits and pieces needed to get going, you may not have any of the experience required to do what needs doing.

You need more than advice, I think. Serious on-site help, I now suspect.

First thing is to set up a simple test system without ALL of the boards jammed into it -- select one or two to start -- and get your operating system and compiler tool chain details worked out. You need to get up to the point where you can load and test software, right away.

Advantech, I hope, can help you figure out what is needed... hopefully, it has already been purchased since you said you have all you need. But if you don't have any software yet and don't have a lot of money to send their way, they may not be too helpful and you may have to do a lot of your own footwork in working out a very low cost approach. Which, without experience, is even more difficult.

You've got me worried, though. Another post seemed to suggest there is no one there who actually understands what is involved in programming and real-time event processing. Which, if accurate, doesn't sound encouraging.

Can you identify someone there who has the needed background and is willing to help out for the interim?

Jon

Reply to
Jon Kirwan

The PC104 what? PC104 is a standard for a board stack!

Who is the "person in charge of the electrical stuff" and why isn't he sorting this out?

As Jon Kirwan says you need a serious amount of on site help from someone with a lot of experience in this area.

If you have an electronic engineering department or computer science department you need to find someone who is experienced in embedded development and beg them for their help. Someone with robotics experience might be a good start.

Ask your tutor to help you find the right person/people.

Good luck!

Nial.

Reply to
Nial Stewart

I am not sure that would be anywhere near the complete list.

Matlab is quite a thirsty package does not have an easy way to manage the concurrency you will require in this package. Something much simpler is what is required. It is essentially a PC board so there are a few options for operating systems if you feel you need one. However, there are options that don't use an operating system which might be achievable but only if you have someone who is truly an embedded software person in the team. As I said previously, I would have made different choices and distributed the processing, connecting all the processors over a communications network. As you have the one Celleron based board for organising the whole sheebang, I guess you will want the fastest and most stripped down software that can handle a multitude of streams.

There are Forth's that would work as native compilers on such hardware. Multi-tasking would not be too much of a problem as it is quite easy to initiate a round-robin scheduler and handle several independent tasks. One task for drive motors output, one task to manage speed and steering control one task dealing with managing the data gathering, one for managing communications.

A newsgroup is not the place to run a complete tutorial on this approach. I am not sure you have teh time for this either.

Others may tell you more about things like uCOS or RT-Linux.

The biggest question would be, do you have access to an embedded systems programmer for the team? You are, I think, going to need one there and on the spot.

--
********************************************************************
Paul E. Bennett...............
Forth based HIDECS Consultancy
Mob: +44 (0)7811-639972
Tel: +44 (0)1235-510979
Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..
********************************************************************
Reply to
Paul E. Bennett

Hey guys, just to clear up a bit. No one in the team has the slightest knowledge of programming. I've done some visual basic work but that seems nothing compared to the magnitude of this task. We only have one electrical engineering student who is currently helping out, but his assistance is very limited as well. I'll have to drop by the computer science building tomorrow to find someone who may be willing to help.

I've been looking into Linux RTAI as it was suggested by Jack and one software that keeps on popping up is "Linux RATI Graphical User Interface". Is that downloadable and would it be suitable for us to use?

In Layman's terms, how would you guys go about doing something like this?

Here is a link to a summary of the electrical system:

formatting link

I'll follow up tomorrow.

Thanks

--------------------------------------- Posted through

formatting link

Reply to
Darth

It sounds like you are totally out of your depth here. Forget RTAI Linux - while it is correct that it is a powerful real-time version of Linux that is suitable for applications like this, I don't think you have any realistic chance of getting it in place in time. Ordinary Linux distributions are probably good enough as long as you are careful about what you run on them, and certainly much better than any flavour of windows.

You need to minimise the amount of programming you do - since none of your team are programmers, you won't be able to learn enough to do a good implementation of motor control in the time scope of your project. Thus you need to buy in a ready-made motor controller.

Look at this device:

If you can figure out a way to use this to control your motor(s), you can use the PC/104 system to provide the control signals to this chip, and to sample and record data if you want. That way you might be able to salvage something out of your badly planned project.

Reply to
David Brown

In layman's terms? I'd call for backup. Y'all are badly out of your depth, and if you've got to get it done this year, with no electronics guys and no programmers, then you're hosed.

--
Rob Gaddi, Highland Technology
Email address is currently out of order
Reply to
Rob Gaddi

Well, that's nailed down now.

That's the polite way to say it.

Do NOT entertain programmers who do web pages, PHP, and the like. I didn't notice (or check now) whether you are at a

2-yr or 4-yr, but I really hope it is 4-yr. You are looking for programmers at the 4th year level and even at that level, the better ones. If your school includes EE and CE, as well as CS, you definitely should look around those departments. You want experience with c and assembly languages, decent math skills, and some understanding of electronics and physics. And you want to find that person, fast.

I want to make something clear. Most CS students, undergrad, aren't quite as skilled as you probably need -- even near the time of graduation. However, EE students (and certainly CE students) will likely have programming experience (micros are everywhere) that is close to what you are looking for. And they often take some of the CS classes. They will have the physics, electronics, and math backgrounds that will really help shorten the time and remove barriers as you get this project moving along. The CS department students... maybe. Very maybe. If you can find one, get a CE or an EE student.

You mention the existing EE student, whose limited time you have access. Can that individual recommend someone they know who might be willing to provide more time, right now?

Find the person, first. Let them guide you. Doing _anything_ else right now is likely to divert your attention away from the single most important task. If you do hook a good one, they will have experiences which will inform them about what is the more profitable approach given their own background and talents.

It depends on your starting point. If you are given a bucket of bolts, so to speak, and merely told to "do something interesting" with it... there is one approach. If you are instead given a set of primary goals to achieve and are allowed to design something to fit that, then another. But you are past this point, I gather, and have what you have. I still don't know what the project is about beyond the fact that it is a "mini race car." What must you demonstrate?

There may be a number of subsystems that are supposed to operate relatively independently from each other, as well as functioning as part of a whole. It's important to make sure that the necessary functions to be performed by the whole system are fully documented and appreciated and then broken down into what each subsystem must be capable of... or, as another approach if you are still in the process of deciding what the larger picture is, examine each subsystem itself and see if they can provide some boundaries on what can be expected at the top level.

Some of those systems are "open loop," in that there is no closed feedback loop to be used. An open-loop system might be nothing more than your mini car's headlights. You program (software controlling it) an electronic 'switch' to turn them on or off, but you have no sensor that can detect that fact. You just flip the switch with some software routine and hope it works. This isn't bad, at all. But it is an example of an open loop.

Some of the systems are "closed loop," in that you have sensor inputs which inform software about some parameter under control. For example, you mentioned that there are wheel speed sensors. These may be used, obviously, to provide a 'reading' of the vehicle's speed and if that is all they did, that would be open loop information and nothing more. However, it is very likely that these wheel speed sensors will be used for more. They will likely be involved in a closed loop that causes the vehicle to operate the motors driving the wheels so that the speed is maintained, when desired. That would 'close the loop.' Also, they may be used (by finite differences) to generate 'acceleration' information or used (by finite integrals) to generate 'distance traveled' information. And those may themelves be used as part of other closed loops for controlling to some desired outcome, either in orders of tenths of seconds or orders of minutes, depending. These can be much more complex to deal with and may, at times, heavily depend upon math skills.

Beyond closed loop vs open loop, you may have sensor integration as well. (Kalman or Kalman-Bucy [discrete or smooth] filters and their error covariance matrices are important players here.) This means taking in information from a variety of very different sensors and integrating them into an overall picture. When you walk, you use your eyes but also you use nerve sensors in your limbs and you use your sense of balance (vestibular system near the cochlea) and all this plays into your proprioceptive sense which both helps tell you if "things are right" but also itself feeds into further muscle control actions. Information from a variety of senses, each with their own resolution and speed and so on characterizing them, need to be fused into a single "sense" that is more accurate and faster and generally "better" than any one of them by itself may be. This information may also be combined with things known, a priori, as well. (For example, you already know you cannot be running at 100MPH and if your sensory system seems to tell you such a crazy speed then you know to be looking to see if you are in a car or a plane, etc.)

There is math involved. There is sensor physics involved. Etc. And so far, embedded programming is barely mentioned. You also need someone who is familiar with how to get all this working in a system where program function A doesn't get in the way of program function B and where all the parts interact productively. Sometimes, your system is consistent with off-the-shelf operating systems that may offload some of what is ahead of you. Sometimes, it isn't. And if not, you also need someone able to cobble up the necessary features that may be either missing or else figure out how to cope with an off-the-shelf O/S where parts of it are simply inconsistent with your needs and need remediation of some kind.

You need lots of skills, and fast.

I don't see the wheel speed sensors and, I suspect, a lot more is also missing from that.

You've got PI loop controllers showing there. Does anyone there know what P, PI, or PID is, what limitations it has, or how to configure it to work reasonably well?

Egads.

Jon

Reply to
Jon Kirwan

or

to

h

he

e

nd

nt

so

a
.

at

I

ng

a

re

n
?
a
.

You might need to rethink your strategy. You are attempting to control the electric car with a single processor in real time? 20 years old gasoline car has more than one processor. 10 years old gasoline car has more than ten processors. Don't know how many processors are in current electric cars.

You can keep the PC104 as master communication unit, but you need more real control processors.

Reply to
linnix

al

Oh my. I think someone has severely underestimated the amount of work left to do.

A couple of questions to narrow down some of the pieces you need.

What is your battery voltage? You mentioned the cell voltage and it appears from that you are using Li-Ion but you did not mention the battery voltage. This will narrow the possible choices of controllers. I don't think you have any hope building the electronics and SW to make a motor controller, cetainly not in a short time.

What is your motor type? Obvious choices would be induction AC, brushless DC (AKA synchronous AC, PM AC), permanent magnet DC, separately excited DC (AKA shunt wound), or other.

What are your motor ratings, power, current, voltage etc...

Do you have fuses? Emergency Disconnect etc...?

Robert

Reply to
Robert Adsett

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.