PDA

View Full Version : Custom Build 1: RC Semi-Automation - Break-in process



derrick_chi
04-14-2008, 11:10 AM
Hello

Well I guess now is as good a time as any to start, nearly all of the hardware is complete, and almost all of it has passed the initial verification phase of the process, now its time to have some fun.

Project Background: OK here is some info for the people who may not be aware of the purpose of this project. Several months ago I began the design of my own personal processor, with some very unique characteristics and capabilities. Its a full 32bit processor, complete with its own interface bus and several IO peripheral modules to communicate with the outside world. These modules include a couple of pulse width modulation controllers, and encoders, an I2C master controller, an SPI master controller, and a RS232 unit. OK so I wanted to come up with a cool way of testing this small SOC (System on a Chip), and I thought, hey why not add some autonomous functions and capabilities to my RCs, this way I get to test the processor and the IOs and have some fun while doing so.

Equipment
1. Spartan 3 Xilinx FPGA
2. 3 Sonic Range sensors (To detect obstacles in the path of the vehicle)
3. Max6675 Thermocouple to Digital Converter
4. RedCat Avalanche 1/8 Scale Monster Truck ( Cool Truck !)

Custom designed ASICs (Application Specific Integrated Circuit)
1. Quik Silva (32bit custom processor)
2. Quik Silva Bus
3. I2C Master Controller
4. SPI Master Controller
5. Pulse Width Modulators
6. Pulse Width Modulators Encoders
7. RS232 UART


Build Purpose: Program the system to aid in the break in process of the truck, in every stage of the process.

Stage1: Run a full tank at idle, monitoring the heat to ensure it does not rise above 220 F
Stage2: Run a full tank at 1/4 throttle, monitoring the heat to ensure it does not rise above 220F
Stage3: Run a full tank at 1/2 throttle, monitoring the heat to ensure it does not rise above 220F
Stage4: Run a full tank at 3/4 throttle, monitoring the heat to ensure it does not rise above 220F

Stage1: OK this is probably a hard stage to make exciting so I'll probably I write a short program to run the car at idle, and to monitor the temperature and to set off an alarm, and cut the power if it reaches above 285 F.

I'll try to upload a little file of each stage of the build. Feel free to ask questions and or make suggestions.

dale_gribble
04-14-2008, 11:43 AM
How much memory does the system have and how much input from the sensors can you store (minutes, hours)?

Let's see a block diagram of the system and how this is interfacing with the car. I am wondering how you are monitoring servo position and commanding the servo to a given location (e.g. 1/4 throttle). You almost need feedback from the servo to know where it is? I guess you just know the PWM output of the receiver to the servo for 1/4 throttle and just emulate that.

How is your system getting power? What is it's current consumption at full operation at what voltage?

Also, would be cool to use one of the I/O's to drive an LED driver and have working brake and headlights.

derrick_chi
04-14-2008, 12:17 PM
Hi Dale

You have some good questions, I believe I can answer most of them now, others I'll get to later.

1. The system has about 32Mega Bytes of free memory that I can use for whatever purpose I chose, like storing sensor data.

1a. Now the amount of time that amounts to depends on how fast I record the data. Lets say I record readings from the sensors over a period of one recording per nanosecond, well if I did that operating at a frequency of 50MHz I would probably run out of memory in just over a second, but lets say I record sensor data in intervals of miliseconds then my time limit grows exponiently. There are 1000 miliseconds in a second so I would be recording something like 1000 bytes per second, the total memory is about 64 Mega bytes so I would have enough for something like 64000 seconds which is about 1066 mins, or 17 hours. I could make it last longer but the longer it lasts the less recordings I can take from the sensors in a given space of time.

2. I'll work on the block diagram.

3. The servos will be controlled by the Pulse Width Modulators inside the SOC, and the control will be based on the fact that the servos are controlled with pulses which range from ~1ms to 2ms in width with 1.5ms being the center. Now there is about 0.5 ms between idle and full throttle, 1/4 of that should be 1/4 throttle, and 1/2 of that should be 1/2 throttle.

And yes you are correct I could use the encoders to emulate the output from the receiver and just record the values I enter with the cotrol and just record my estimation of 1/4 throttle through full throttle, I could do that to I if wanted to.

4. The entire system will be powered from the receiver and the fpga and sensors pull micro amps of power, and I've designed the SOC with low power consumption in mind so... I have not calculated it fully but I'd expect it to be very, small, it should not effect drive time by that much, I suspect I won't even notice it.

Headlights and brake lights hmmmmm, good idea :)

derrick_chi
04-22-2008, 12:17 AM
Update on progress.


OK I wrote a short program to monitor the temp during phase 1 of the break in process, while monitoring the temperature it also displays the current temperature of the engine on the board 7 segment display(as you will see in the video). In the video I also try to demonstrate the part of the program which triggers an alarm if the temperature rises above the user controlled input. You'll see in the video that when I change the temperature cutoff settng to a value below the current temp of the engine the alarm will kick in and the led lights will start flashing and the 7 segement display will show the last temp recorded.

Everything seems to be working just fine. I made a little quick video of a check I ran on the system and it seems to be reporting the temperature correctly, so sometime later this week I'll start stage1 of the break in and record a little of that and update you guys.

I apologize in advance about the quality of the video I used my phone to record it.

Checkout the clip and tell me what you think.


http://www.rcuvideos.com/item/4KMM3Z89F675X39C

tearemupanfixem
04-22-2008, 10:56 PM
Uh, ooook, I'm not sure I'm even smart enough to even look at the video but it looks friggin awsome!

derrick_chi
06-11-2008, 01:04 PM
OK

I've been away from this project for a while working on some real-life projects for my employer. Anyway I'm back at it and here is a status update.

Phase 1 Status: This phase of the process went well as from as the custom hardware is concerned, it did what it was suspposed to do. I
believe I have footage if anyone is interested. There are however some issues, inital factory setting on the truck are a
little off I think. I believe I have a clue of what needs to be done so I plan on trying some things out. The problem is
that the engine will stall if I remove the glow plug ignitor from the glow plug, and it will stall if I even give it a little gas.
The latter has to be fixed right away before I go on to stage2 of the process. Any help on these issues would be apprieciated!

Phase 2 Status: OK here is the phase were I get to use some of the more interesting hardware features of the truck. This is the phase
where I can actually give the car some throttle inputs. Majority opinion suggest that I not take the car above 1/4 throttle
during this phase, well thats no fun so what I have done is written a program which trains itself outlined below.

1. Programs Quik Silva to remember the encoded throttle settings for idle full, throttle, and full brake
2. Based on the information gained in part one, determine the ~ PWM setting for 1/4 throttle
3. Apply the throttle to the truck starting from idle to the calculated 1/4 throttle in increments of 5.
4. Monitor the engine temperature, stall the engine, turn on light indicators if the temp exceeds preset high threshold, or drops below preset low threshold
5. Go back to step 4.

Once I get it up and running I'll probably provide some footage.

Been 2780
06-11-2008, 03:14 PM
the issue u have when u take the glow ignitor off of the glow plug and it stalls, is probably because the glow plug is bad, change the glow plug, and u should be fine

derrick_chi
06-12-2008, 01:27 AM
OK I ran the program today and the custom circuitry seems to be operating great. I do have some footage, the link is shown below. Be warned its loud and not the best footage I had to use the camera on my phone again. You should be able to see in the footage that the remote is turned off during this phase of the break-in process.

http://www.rcuvideos.com/item/R8PB9SX9J6X5KCZH