CK5
Register an account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members.

Truckputer? - Initial Schematic and PCB design - Post 28

As far as pressure goes, you could always use something like this....

http://www.omega.com/ppt/pptsc.asp?ref=PX4200

As for the strain gauges, are you going with "bare" glue-on, or load cells?

Here is the first type.
Click on a category, and hover over a picture for quick details and usually price, or click for more detailed info.

Note: most of those prices are for 5 units.
http://www.omega.com/toc_asp/sectionSC.asp?section=E&book=pressure

I'm a little jealous.
When I was mounting my winch, I so wanted to put a couple of load cells between the winch housing and the front mount.
Or just one and a button. But, hunting season was fast approaching, and I needed to get it finished.
Never got a chance to go back and make a place for one.

Not only would it be handy to know when I am approaching the breaking point of my cable, but it would be so neat to tell someone that it took 4.685 tons to pull him out......
 
Actually made some decent progress.

The bus master controller will probably be at atmega168 or 328 mcu. I'm very familiar with that family, and it will provide a lot of local functionality to the 'brains' of the system.

For communication between master and slave units I will use the Phillips I2C interface. It's a serial half-duplex interface using two wires. A bus master decides which bus slave may use the bus at any given time. Everything connects to the bus in parallel. To provide failsafe isolation, I will use NXP P82B96 optoisolators designed for the I2C interface.

These optoisolators allow for 1kV of isolation, so if one of the slave units get destroyed/shorted/submerged it shouldn't fry the master. Additionally the bus communications will be fused with some quick-blow fuses. The schematic shows all the pullup resistors drawing from the same fused Vcc. I still haven't decided whether each 'slave channel' should have it's own fused supply or not. Right now I'm leaning toward each slave connection having it's own fused bus system. This would allow for isolation of failures. As it sits right now, a short on any master->slave bus will bring down the whole bus system. While it won't fry anything thanks to the optoisolators, the bus will no longer have the pullup signal available because of the blown fuse. So, for maximum survivability, each bus link should be it's own fused circuit.

Additional circuit protection can be achieved through conformal coating after the PCB is finalized. Conformal coating is essentially an expoy coating over all the components to make everything more water-resistant.

The physical layer will be shielded twisted pair. To minimize noise, I'll try to structure this similar to EMP/EMI shielded systems. This means all the electronics (except for the sensors) will be enclosed in metallic connectors, with the shield of the STP connected to the enclosure. This effectively forms a faraday cage around the critical components reducing the effective noise on the system (important because in additon to spark and alternator noise, I have 55 watts of RF to deal with).

At the slave end, I'll use some attyiny25 or attiny45 (depending on how large the program is) microcontrollers to handle the analog to digital conversions (or serial interface for serial-enabled sensors). It will also be responsible for slave I2C functionality, communicating it's data stream when probed from the master.

Additionally, the slave unit will have 2-4 address select pins, which will allow up to 16 of the same sensor on the I2C bus without any conflict. The address select will actually be an active low circuit, with jumpers going to pullup resistors (I don't know why I drew it backwards... made sense at the time? :D ) The I2C bus can support a maximum of 255 devices at bitrates in excess of 115 kilobaud. I'll be running the bus at a much lower speed of about 4800 or 9600 baud.

Attached is a block diagram representing the general idea behind the interconnects.

10311001.JPG
 
I am feeling so very old.
I used to do stuff like that.
Of course, not at that level, since the hardware did not exist yet.

Most of my stuff was 4000 series CMOS.
But lately I find I no longer want to fight that hard. If that was all that was out there, that would be one thing.
But there are so many higher level solutions available now, that I find myself willing to pay for the other fellows work. My last board level stuff was a BASIC Stamp.

You are doing microprocessors, I stop at PLCs now unless I have to dig out the breadboard.
As long as http://www.automationdirect.com/adc/Home/Home
can sell me solutions that I can program and configure the way I want for low bucks, I go that way.

BTW, if you don't have their catalog, its another freebie. It has good info on their stuff, but its not a training manual like the Omega ones.

Also, BTW, I see you are going Recommended Standard 232.
I had a guy tell me that he needed a connector for a Radio Shack 232 one time.......

Why not go USB instead? Granted, its not 3.0 or even 2.0, but its easier to hook up...
http://www.obdev.at/products/vusb/index.html
 
USB requires implementing the USB stack. I would have to communicate to a USB host controller what type of device I am connecting to the bus. RS-232 on the other hand... I just specify that I am producing 9600n1 data, and any serial device can connect to it without additional overhead. I'm mainly using RS-232 because I can leave the connector unterminated while still transmitting data over it. I2C requires acknowledgement from slave devices (similar to a TCP/IP syn-ack), and SPI is just an old clunky interface that I'd rather not mess with (essentialy a parallel-in serial-out and serial-in parallel-out shift register on two channels connected to each other). There are microcontrollers with built in USB hardware, such as the AT90USB or the Microchip PIC 18F4550. I've got a development board for the AT90USB128 microcontroller, but I've never got around to playing with the USB stack.

Microcontrollers are cake nowadays. Essentially a 20 MHz RISC (reduced instruction set computer) in a tiny PDIP (or SMT of your flavor) package. The big selling point on microcontrollers is all the 'peripherals' that come integrated with them. The Atmega168 I'm going to use as the bran has 16kB of program flash, several analog-to-digital input channels, I2C, SPI, two UARTs, PWM output, comparators, dual timers, watchdog circuitry, pin-based interrupts, and if you look close enough at the silicon there's a kitchen sink in there somewhere :)

I've got a bunch of 7400-series cmos in my IC-arsenal here. I normally use them for logic mockup before moving to PLA/PLDs. I have the PLA/PLD chips, just not the $400 programmer yet. I have to make a special trip to the University to use their programmer whenever I want to program PLA/PLDs. Microcontrollers, on the other hand... use a neat thing called ICSP (In Circuit Serial Programming). You use a fancy interface that connects to an RS-232 port. Local software on the computer sends the appropriate bits down the pipe and they get burned in the flash memory.
 
Selected some more parts for the experimental rendition of this project:

For manifold pressure I'm going to use a differential pressure sensor:

Freescale Semiconductor MPX2100DP. Temperature compensated 0-100 kPa vacuum sensor (nearly 1 atmosphere of vaccuum).

http://www.mouser.com/ProductDetail/Freescale-Semiconductor/MPX2100DP/?qs=N2XN0KY4UWXrOcvLydhrcQ==

For ambient pressure, I'm using a similar Freescale sensor. Except this one is good for 0-200 kPa.

http://www.mouser.com/ProductDetail...=sGAEpiMZZMvhQj7WZhFIALpLlyV3lh9LP1iPYEDJJWE=
 
So this system will be just for reading information, with a PC as a user interface? That seems like a lot of investment for a glorified scan tool. When it's all done you still won't be able to tune with it? If you're going to add a bunch of sensors, why not run a different ECU that can read them and take advantage of that data to make the engine run better? Then use pre-made user-interface software with a touchscreen computer. You can read everything and change things.
 
So this system will be just for reading information, with a PC as a user interface? That seems like a lot of investment for a glorified scan tool. When it's all done you still won't be able to tune with it? If you're going to add a bunch of sensors, why not run a different ECU that can read them and take advantage of that data to make the engine run better? Then use pre-made user-interface software with a touchscreen computer. You can read everything and change things.

I don't have fuel injection, nor do I want it.

And no, this system doesn't require a PC interface. I'm modularizing it such that I can have whatever type of output I want.

And you're right, this is essentially a glorified scan tool; for a vehicle that has no computer system.
 
For your viewing pleasure, I submit the following:

A schematic of the bus master controller and a PCB layout.

This board doesn't have any of the I2C optoisolators on it. I'm planning on making a second board that stacks on top of this one with the optoisolators (to support different numbers of sensors).

There's an RS-232 DB-9 output, a 6-pin in-circuit programming header, and a 10-pin auxiliary I/O.

The aux I/O includes:

4 analog-to-digital converter inputs (with jumper-selectable AREF: +5V, 3.3V, 2.5V, and external ref through the aux connector)
2 digital interrupt pins
Serial-Peripheral-Interface
4 PWM output (or input) channels

There's more real-estate available on the board, but it's going to be used for an SD card or a Compact-Flash card slot.

bus-master-schematic.jpg

bus-master-pcb.jpg
 
Changed my mind on the SPI inteface on the aux connector. Instead, I'm adding 3 GPIO ports.

I need the SPI to handle my SD Card interface.

I found some BSD-licensed libraries that will allow me to actually use FAT16 or FAT32 on an SD-card. This means I can write data to a text file that a computer could easily read. My other alternative is writing raw data to the SD card (essentially use my own filesystem), and building a card reader interface.

Also figured out my power-on-reset circuit was a bit too complicated, all I needed was a pullup resistor and a cap to ground. Also, R7 should be 680K
 
Last edited:
Jagged, what the heck software is that that produced the printable circuit board?

About 3 computers ago, I had what looks like the exact same software.
Plus, I had some of the sheets that let you print the schematic out with a laser printer, transfer it to a board and etch it.

I pretty much got out of making boards from scratch, and somewhere along the line I lost the software.

Over the years, I downloaded some try-before-you-buy stuff, buts its never the same thing.

Yours looks exactly like the one I had. Same colors and shapes.

I'm not sure why I am asking, I don't see any need for it in the immediate future, but I would like to find it again.
 
Also figured out my power-on-reset circuit was a bit too complicated, all I needed was a pullup resistor and a cap to ground.

Also, the diode was going to hold the reset line to .7 volts during reset.
Should not have been a problem, but just something to think about.

Plus, you might want to add a reset switch just in case.....
 
Hard reset switching is available through the ICSP header.

The software is EagleCAD, and yeah it's been around a while.

I've got the full gamut of components to fit on the board, but I'm having a hell of a time getting the routing to work. I turned off the via's because I'll be etching the prototypes myself, and don't want to deal with them. Still have a couple 'rock and a hard place' things with the traces.
 
It wasn't EagleCAD, but CADSoft rings a bell.
I think it was the same program, just predates Eagle.

The version I had was not integrated. You generated Gerber and SPICE files and entered them into the other modules.

I downloaded the freeware just to fool around with.

In my old version, the autorouter could be set to ask permission before creating VIAs.
And then, you could limit the number it created.
I used to love wide DIP chips. Lots of room to run traces underneath.

Most of my boards were like yours with no VIAs, but every so often one or two were necessary.

I didn't bother with attempting any through-hole plating. I just ran a bare "jumper" through the board and soldered each end.
 
Allright, I think I'm willing to call this Rev1.0 of the bus master controller board.

Here's the final capabilities of the Rev1.0 design:

Atmega328 microcontroller running at 20 MHz
6-pin ICSP header for updating firmware
SD card with FAT32 filesystem
Continuous output via RS-232 port (DB-9 connector)
I2C Bus Interface (2-pin 0.1" header, for use with I2C daughtercard)
Configurable Analog-to-Digital converter reference (external via aux, 5V, 3.3V, and 2.5V)
14-Pin auxiliary I/O header:
* 4 ADC Input
* 4 PWM Input/Output
* 3 GPIO
* 2 Digital Interrupts (configurable active high or low)
* 1 ADC reference input

9-20V fused input (500 mA fast-acting)
Fused I2C bus power supply (250 mA fast-acting)

All this on a PCB that's roughly 4x3.25"

bus-master-pcb.jpg

bus-master-schematic.jpg
 
Looks like building up one of these is gonna cost me about $36 or so (not including shipping =( ). That includes spare parts (such as three circuit boards for when my etching goes wrong), but doesn't include the parts I have on hand (resistors, capacitors, regulators, max232 ic's, and jumper headers).

I'll have to re-examine my datasheets, but I think the 7800-series 3.3v regulator uses a different pinout. If that's the case then my board routing is off =(

Once I get the funds and time to get a proof-of-concept working, I'm going to redesign this with some SMT components and have a pcb-shop etch me some nice epoxy-coated boards.

I plan on keeping this whole design publicly available, and source code will be released under the GPL (haven't decided v2 or v3 yet).
 
Last edited:
You're not going to believe this, but good luck finding a 7803 voltage regulator.

I'm sure that there are still a few out there, but they seem to be getting scarce.

A lot of them have been replace with things like this.
http://www.murata-ps.com/data/meters/dms-78xxsr.pdf

I don't particularly like this. Its much more efficient of course, but may cause noise problems, and the current is too low.

If you want to stay with three terminal linears, it looks like this is your best bet.

http://www.alliedelec.com/search/productdetail.aspx?SKU=9356390#tab=Specs

Still gonna mess up your board though.

Still plenty of '05s and above.
I don't know when they started doing away with the 3.3s. But Allied and Digikey don't seem to carry them anymore.
 
You're not going to believe this, but good luck finding a 7803 voltage regulator.

I'm sure that there are still a few out there, but they seem to be getting scarce.

A lot of them have been replace with things like this.
http://www.murata-ps.com/data/meters/dms-78xxsr.pdf

I don't particularly like this. Its much more efficient of course, but may cause noise problems, and the current is too low.

If you want to stay with three terminal linears, it looks like this is your best bet.

http://www.alliedelec.com/search/productdetail.aspx?SKU=9356390#tab=Specs

Still gonna mess up your board though.

Still plenty of '05s and above.
I don't know when they started doing away with the 3.3s. But Allied and Digikey don't seem to carry them anymore.

Hmm actually looked at the part number I have: 1117V33 (same TO-220 form factor as the 7805). And its pins are different. Ah well, I'll tackle that problem some other time. Hopefully they still make 7808's, I need those for my instrument amplifier design (for the pressure sensors).
 
The 8s are still available. Parts Express shows them for $1.00.

Might want to look at the NTE956 for it also though. If you have use one for the 3.3, you might be able to use it for all the voltages you need.
It only takes two resistors to program it to whatever voltage you want.
1.2 up to a design max of 37.

Might make board design easier. Just one design for every regulator.
 
I should be able to use an adjustable for the 3.3V

For the 5V and 8V lines, I need something a little more temperature-stable than an adjustable regulator and some resistors (with the resistors being the most thermally unstable most likely). The 5V also supplies the reference voltages to the ADC converter, and the 8V line is needed for the instrument amp. I'm boosting a 0-37 mV signal to a 0.3V-4.2V swing.
 
Top Bottom