Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 07-08-2012, 01:41 AM   #131 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Video Game, simulator, and testing

Back at posting 80 I started to describe my test bench, and how I was planning to pre-test my PLC code, some wiring, and fake some inputs to have a rack of equipment and a few analog meters work like I hope the dash on SalvageS10 eventually will work. That description continued in postings 87, 90, 91 and 99.

I explained the datalogging format that I am using, and that the Arduino is logging to a CSV file. But I never explained HOW the simulator works. I'm quite proud of it, so I don't know why I have not explained that up til now.

I'll start the next post with the details. Here's the overview:

The simulation needs to set many inputs (safety stops, brake pedal, throttle, battery voltage) and outputs (speed to VFD, brake lights, gauges) to establish or initialize the scenario that you want to test

The simulation must sequence through steps, changing inputs or outputs as required

The simulation must be flexible enough to test problems, like a brake failure

The simulation information needs to be entered by a human (me) so it needs to be readable and fairly simple to set up. I do not consider this interface 'user friendly' ... in fact, it's more like 'user hostile' ... but it works for me and it was pretty quick to write up

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 07-08-2012, 01:14 PM   #132 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
The Simulator

There are several 'files' in the PLC that are dedicated to the simulator as well as some variables like a counter, a timer, etc

The first file, N50, is a number. I call this the 'command'.

Command values:

1 - 9. Move the number in N51 to the input card or output card. 1 - 5 are input cards, 6 - 9 are output cards.

10 - 29. These are analog inputs 0, 1, ... 19. Again, move the value in N51 to the proper input. There are no decimals. N51 is a signed integer, so values are - 32768 to 32767

30. Set distance trigger. This loads the value in N51 into a counter that 'waits' in this step and counts down until it reaches 0. It then steps to the next simulator step. This command has a maximum timeout, measured in hundredths of a second, stored in N52. That gives me a range of 10 ms to 655.35 seconds. The distance is in meters.

31. Set speed trigger. This loads the value in N51 to a compare and 'waits' until the speed has reached this value (or higher) then steps to the next simulator step. This command has a maximum timeout, in hundredths of a second, stored in N52. Scale is 1000 for 10 kph or 10.00 kph with an implied decimal.

32. Copy accelerator to present speed setpoint. This allows for speeds that are not coded into the simulator program. There is no timeout. It is executed, then the next simulator step is activated. This is approximately 'maintain speed' when the speed setpoint has been reached. Since there is a 'greater than' involved, it introduces some variability into the speeds and distances in the simulation.

33. Copy the present brake setting to the brake setpoint. That allows for brake settings that are not coded into the simualator. There is not timeout. It is executed, then the next simulator step is activated. As you cross the speed setpoint, you take the brake setpoint and hold it there.

So far, that's all I have for a simulator. I list below what I have for starting the truck and backing out of the driveway. That will (hopefully) give you an idea of what the simulator can and cannot do for testing.

The spreadsheet shows the columns Step, Command (N50), Value (N51) and Timeout (N52) along with a description of what the step is doing

I attached the spreadsheet - the info below is a bit hard to read. In the spreadsheet, the second tab - Binary - shows which bit is turned on for which input. That is the user hostile part.

Step Command Value Timer Description
1 1 30 1 Initial conditions Park, Estop OK, Ebrake set
2 2 30 1 Initial conditions, redundant inputs Park, Estop OK, Ebrake set

3 10 3FF 1 Accelerator 0% Acc pedal is not active
4 11 7FF 1 Brake pedal 0% Brake pedal is not active
5 1 38 100 Start Start truck
6 1 34 500 Run, delay for POST
7 1 36 1 Press Brake Seq to reverse out of garage. NOT to be used as a template for moving from stopped to stopped

8 11 07ff 100 Brake > 50% Push the brake to the floor
9 1 37 100 remove ebrake
10 2 37 100 and from redundant input
11 1 57 100 Park to Reverse
12 11 03FF 1 Brake to 0% Begin reverse of 30 m
13 1 55 100 Brake pedal released
14 1 155 1 Accel pedal pressed
15 10 6FF 100 accel to 25%
16 30 25 1 set distance to travel 25 m
17 31 1000 1000 set max speed 10 kph in 10 s
18 32 0 2000 set speed sp to present when speed is reached from last step transition Stay in this step until distance done triggers next step

19 30 5 1 set distance to brake
20 31 03FF 1 accel to 0%
21 1 57 1 remove acc, press brake
22 11 07FF 500 brake 50% Stay in this step until distance done triggers next step

At this point, you would press the brake further and switch from Reverse to Drive
Attached Files
File Type: xls Simulator_Reverse_out_of_garage.xls (104.5 KB, 24 views)
  Reply With Quote
Old 07-16-2012, 02:11 AM   #133 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Automatic transmission again

From posting 130

Quote:
Originally Posted by thingstodo View Post
This brings me back to the requirement for a manual gearbox. If the transmission supports the transfer case, then I need the transmission anyway. If it's going to be there taking up space and weighing so much, I guess it makes sense to have the electric motor couple to the transmission and use the selection of gearing that is provided.
I am having difficulty finding a manual transmission to purchase for SalvageS10. They are not easy to find, apparently. More delays ...

To get on with some testing during our short summer months, I am thinking of putting the automatic transmission back into SalvageS10, along with the gear selector jammed into neutral, and of course some new transmission oil. The heavy and mostly useless automatic transmission will support the transfer case properly and I can try my crazy electric motor-to-front differential yoke-to-transfer case idea.

I can't find a wrecker who wants to sell me just the small bracket and bolts to connect the drive shaft to the yoke, either. They want to sell the whole transfer case and drive shaft at once. And that is much more expensive .. of course ..

I may be improvising a bit for my initial testing. I'll see if I can get something to fit. It may be embarrassing ... but I'll make it as safe as I can. I've checked my brakes, without driving the hydraulic assist pump and the brakes are VERY stiff, but they DO work. Its just a bit more of a workout to get the truck to stop.

I still have not completed my PLC programming for the truck ... heck, it's barely been started. And I have a bunch of safety equipment to mount on the truck - slap switches, inertia switches ... none of which I am keen on mounting before I have a motor mechanically connected so that it can turn the wheels somehow. I seem to be good at mounting things, seemingly so OUT OF THE WAY, and yet I end up taking them out because they are somehow in the way for installing something else.

I seem to be going around in circles, from one task to another, not really getting anything done. Do you ever feel that way?
  Reply With Quote
Old 08-09-2012, 12:56 AM   #134 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Automatic transmission

I got the transmission moved off my utility trailer, set up on blocks upside down so I can get to the bolts at the 'bottom' and took some pictures. This one tells you pretty much all you need to know .... YES, this is DEFINITELY FAR above my mechanical skill. I likely won't be getting this automatic transmission working, re-installing a bunch of hydraulic hoses, faking vacuum signals from the engine, etc.

I will concentrate on getting the oil back into the transmission, and getting the transmission back into the truck so that the transfer case will work properly.

I measured today and it looks like the transmission will JUST FIT under the front supports of the front end if I can get the truck up onto my car ramps. But that's a topic for the next post.
Attached Thumbnails
Click image for larger version

Name:	100_0236a.jpg
Views:	18
Size:	138.4 KB
ID:	11292  
  Reply With Quote
Old 08-09-2012, 01:00 AM   #135 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Rolling uphill

How do I get a truck with no motor or transmission to roll uphill? I brainstormed for a while and came up with a few ideas:

- pipewrench on the rear differential, turn 1/4 turn at a time and move truck forward. It will mark up the rear differential and it will be awkward - I need to sit on the frame to reach. And I don't have a way to keep the truck from rolling back when I have moved it forward and need to reposition the pipewrench.

- wrap the cable from a hand winch around the circular part of the rear differential and clip the hook where one bolt goes. Sit the winch on the frame and crank it to turn the rear differential. I don't need to reposition the winch, and it won't turn backward with the brake on the winch.

This was better, but mounting the winch to the frame did not turn out to be easy.

- can I find something, with maybe a bolt and a pivot in the middle, to fit where the drive shaft meets the rear differential? This is what I found

The 'T' bar from my socket set fits into the clip where the drive shaft meets the rear differential. So, with a few shims (small lengths of pipe split to fit over the T shaft) I can get the T bar to sit in approximately the middle of the clip. Then I should be able to connect my socket wrench with a short extension bar and a 1/2 inch socket to the T bar ... and then add a 3 foot pipe to the socket wrench so that I can use it while standing beside the truck. If I'm beside the truck, I can use my foot to move the wedge that keeps the truck from rolling backward, and I can move the wedge forward with every quarter turn of the rear differential, so the socket wrench can 'click' back the quarter turn and I can move the truck the next quarter turn.

That's the idea, anyway. Here are the pictures of the T bar and the T bar connected to the rear differential without the spacers.
Attached Thumbnails
Click image for larger version

Name:	100_0255a.jpg
Views:	16
Size:	47.2 KB
ID:	11293   Click image for larger version

Name:	100_0258a.jpg
Views:	17
Size:	73.5 KB
ID:	11294  
  Reply With Quote
Old 08-09-2012, 11:00 PM   #136 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Posting and who is lulcm

If you read the thread regularly, you likely noticed that the last couple of posts were from lulcm, not thingstodo, and that they changed yesterday. For some reason, I tried to log in to ecomodder with the wrong username a couple of weeks ago. When the site asked if I wanted to create a new account, I just filled things in and posted ...

Then yesterday I noticed a typo and could not edit the postings - because I was logged in as thingstodo, not the lulcm that had posted ...

So I have things straightened out now. Sorry about any confusion.
  Reply With Quote
Old 08-09-2012, 11:12 PM   #137 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Rolling uphill - update 1

The T needs some spacers to have it held correctly and aligned at the middle of the bracket on the rear end. After searching through my scrap pile, I came up with 3/4 inch pex pipe. It turns out that 3 short lengths of pipe split lengthwise will add enough bulk to the T bar so that the clamps on the rear differential will hold. See picture 1.

This was the most flexible thing that I found. Other things that do work - hose adapters from 1/2 inch to 1 inch, brass compressor hose fittings (reamed out) threaded into black iron 1.25 inch nipples ... all were less attractive than the pex. The hose adapters are ABS plastic and are pretty tough to deform. They end up being longer. The brass took a lot of work and does not 'press down' on the T bar handle so there is still some movement of the bar back and forth - not good for centering the T bar.

The next thing is to find a socket (or something else) that will fit onto the ratchet of the socket set and also fit onto the 1/2 inch square drive on the T bar. That was much more interesting than it should have been. See picture 2 - all of these parts - the ratchet, the T bar, the 2 different extensions and the flexible extension ... they are all a slightly different size. (!!) I could not find a socket that would fit the 1/2 inch ratchet drive. It was just that little bit too large for the 1/2 inch socket but a 13 mm socket slipped. When I found out that all of the different extensions were different sizes, I went through a collection of old 6 and 12 point sockets and tried combinations until I found one that fit. It's a good thing that I was not thinking about it, since the one that fits best is a 5/8 socket in the 6 point style that SHOULD NOT fit well onto a square (4 point) drive.

In any case, it does fit. I ended up using the 12 inch extension bar on the ratchet, to a 1/2 to 3/8 adapter to the 5/8 socket (3/8 drive) to the 1/2 inch T bar. See picture 3.

The 3 foot chunk of 1 inch square tubing (see picture 4) fits OK on the end of the ratchet and makes it a lot easier to turn the rear differential.
Attached Thumbnails
Click image for larger version

Name:	IMG_0386a.jpg
Views:	16
Size:	79.8 KB
ID:	11297   Click image for larger version

Name:	IMG_0387a.jpg
Views:	18
Size:	63.2 KB
ID:	11298   Click image for larger version

Name:	IMG_0388a.jpg
Views:	15
Size:	19.9 KB
ID:	11299   Click image for larger version

Name:	IMG_0390a.jpg
Views:	18
Size:	114.6 KB
ID:	11300  
  Reply With Quote
Old 08-09-2012, 11:58 PM   #138 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Rolling uphill - update 2

I began to use the procedure above. The truck is in position to run up the ramps in picture 1. I rolled the truck up to the ramps, made sure that both tires were hitting the ramp at the same time. The truck was trying to go up the ramp when I had my first failure. The 5/8 socket slipped on the 1/2 inch square drive of the T bar. It took a while to pry the socket off of the T bar. But it would slip every time I put a bit of pressure on the ratchet.

So I backed off and re-grouped. How about using a longer bolt, and using a socket of the correct size on the ratchet and the same size socket on the T bar? That should work. I located a 3/8 to 3/8 ready rod coupler that is 2 inches long and has a 6 point 1/2 inch wrench size. I used the half inch socket from my set, and a half inch 3/8 drive, with the 1/2 to 3/8 adapter - see picture 2.

Picture 3 shows the same parts put together and taped with tuck tape so that they don't all fall apart when I connect them to the T bar.

And it did work - until that failed as well. The 1/2 to 3/8 adapter twisted off. See picture 4.
Attached Thumbnails
Click image for larger version

Name:	IMG_0391a.jpg
Views:	16
Size:	93.6 KB
ID:	11303   Click image for larger version

Name:	IMG_0394a.jpg
Views:	15
Size:	119.0 KB
ID:	11304   Click image for larger version

Name:	IMG_0395a.jpg
Views:	21
Size:	106.2 KB
ID:	11305   Click image for larger version

Name:	IMG_0399a.jpg
Views:	16
Size:	64.8 KB
ID:	11306  
  Reply With Quote
Old 08-10-2012, 12:01 AM   #139 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Rolling uphill - update 3

Fine. I can find a larger socket that will not fail, and will use the 1/2 drive directly. After a short search I found a 1/2 inch impact socket ... that should not fail. The impact ratchet puts out over 150 foot-lb of torque. Picture 1 shows the new socket, and the ratchet etc without the 3/8 to 1/2 adapter.

Picture 2 shows them assembled with tuck tape again.

As I put some pressure on the ratchet (via the 1 inch square tubing) the truck began to roll up the ramp, then stopped but the ratchet kept turning ... the 3/8 to 3/8 ready rod coupler started to twist - see picture 3. This is just getting ANNOYING!
Attached Thumbnails
Click image for larger version

Name:	IMG_0400a.jpg
Views:	13
Size:	87.9 KB
ID:	11307   Click image for larger version

Name:	IMG_0401a.jpg
Views:	15
Size:	48.1 KB
ID:	11308   Click image for larger version

Name:	IMG_0403a.jpg
Views:	15
Size:	43.6 KB
ID:	11309  
  Reply With Quote
Old 08-10-2012, 12:12 AM   #140 (permalink)
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 749
Thanked 565 Times in 447 Posts
Rolling Uphill - update 4

The plan for next time (tomorrow?) is to use the largest bolt that I have in the garage (1 1/4 inch head if I can find some nuts to fit), with two nuts to couple the ratchet to the T bar. I don't think that I am putting a large amount of torque on the ratchet, but I AM putting some effort into it.

I am trying to get the truck moving up a vehicle ramp that has a rise of 9 inches and a run of 21 inches. I think that when I get the truck to roll up this small ramp, I should make an effort to measure, at least roughly, the torque that is required to hold the truck from rolling back down the ramp.

I think I can come up with a way to do that - back to the bathroom scale, shimmed to level and as close to horizontal on the measured lever attached to the ratchet ... some small weights to zero out the scale and check for repeatability .. that sort of thing. I think I'm not going to like the answer.

Measuring how much torque it takes to MOVE (instead of hold from moving) the truck up the ramp has me scratching my head ... at least for now.

  Reply With Quote
Reply  Post New Thread


Thread Tools




Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com