Download presentation
Presentation is loading. Please wait.
Published byMartin Neal Modified over 9 years ago
1
CAN to Analog Converter SD0707 Shefali Dhaka Josh Schroeder Dan Williams
2
Introduction Client: Sauer-Danfoss Client Representative: Lincoln Davidson Faculty Advisor: Dr. Nelson
3
Introduction Device reads CAN messages Uses the CAN data to generate an analog output The arbitration ID of the CAN component will determine how the message is interpreted User configures Output Range (between -5 and 5 volts) Data Type of message Bit Order (Intel, Motorola)
4
Digital Hardware Requirements We are to use components that Sauer-Danfoss uses in their own designs whenever possible A microcontroller will be used to accept and interpret CAN messages The micro must be able to communicate over RS232 for debugging The micro must have access to a large amount of memory DAC must have 16 bits of resolution
5
Software Requirements Labview will be used to create a configuration program capable of changing how the CAN message is to be interpreted. The user should be able to save new configurations of how the message is interpreted The software on the microcontroller will be programmed through CAN New user configurations will be retained after a power cycle
6
Generating a Variable Range Output Two methods emerged Method 1: Use a DAC with constant output range, and vary the offset and gain Method 2: Vary the output range of the DAC and use a constant offset and gain.
7
Generating a Variable Range Output Method 1 Two digital potentiometers could be used in a differential op-amp circuit One to adjust the offset The other to adjust the gain Method 2 An extra 16 bit DAC could be used to adjust V REFH & V REFL creating a variable output range
8
Generating a Variable Range Output Method 1: Advantages Cost: Dual digital potentiometers prices range from about 1 to 5 dollars Reduce the number of components Method 1: Disadvantages Low number of distinct stages (usually 256) Not a component Sauer-Danfoss uses
9
Generating a Variable Range Output Method 2: Advantages Has high resolution (16 bits) Can use parts Sauer-Danfoss typically uses Reduces software complexity Method 2: Disadvantages Cost: $12 per chip
10
Generating a Variable Range Output We chose Method 2 The higher resolution allows us to better match the users specifications Reduces the complexity of the analog circuitry Can use Sauer-Danfoss parts We were advised that digital potentiometers can be unreliable
11
Generating a Variable Range Output Use the DAC8554 with SPI Output equation V OUT = (Din/65535)*(V REFH - V REFL ) + 2V REFL The output range is anywhere between 0 and 2.5 volts Minimum output is 2V REFL => Max V REFL = 1.25 V Maximum output is V REFH + V REFL => Max V REFH = 2.5 V
12
Generating a Variable Range Output Design uses 5V and 0V as our V REFH & V REFL for our first DAC Problem: only a small amount of the 1 st DAC’s resolution is used DAC V REFH V REFL V OUTA V OUTB DAC V REFH V REFL V OUTA 5V (0…2.5V) (0…1.25V)
13
Generating a Variable Range Output
14
Solution: use voltage dividers to the reduce the output voltage DAC V REFH V REFL V OUTA V OUTB DAC V REFH V REFL V OUTA 5V (0…2.5V) (0…1.25V) R R R 3R (0…5V)
15
Digital Components PIC24 was chosen as our microprocessor Bootloader and other code from Sauer-Danfoss can be used EEPROM with I 2 C interface stores user configuration data RS232 transceiver allows for debugging CAN transceiver Programming PIC Receiving user configurations Receiving digital messages to convert to analog
16
Digital Components
18
Software
19
User Configuration Data File Each CAN component must have a configuration file stored in the EEPROM User Configuration Data File Value# of bits Component ID29 Max Analog Out16 Min Analog Out16 Max Digital In64 Min Digital In64 Data Type (signed/unsigned int, float)2 Message Bit Order384 Total575
20
Once the input CAN signal that was digital has been converted to analog, it has to be amplified and converted back to a differential signal. The circuit can be divided into 2 parts: Part 1 to amplify the DAC output. Part 2 to provide protection from undesired supply.
21
Requirements: For part 1: An Inverting operational amplifier. resistors. For part 2: 2 Inverting operational amplifiers. resistors. PTC (Positive Temperature Coefficient) Diodes Transistors PTC (Positive Temperature Coefficient)
22
Low noise op-amps were required for obvious reasons. Quad op-amps so there are easy and clean connections on the PCB. High Gain bandwidth product. Low input offset voltage: It is a direct DC error. Low equivalent input noise voltage : Noise = (input noise voltage)* (bandwidth)^1/2; So, it is very important to keep this low. Slew rate: to stabilize our output from the op-amp, a low slew rate was desired(somewhere around a 50V/ms) Low offset voltage High temperature range: -40 to 85 degree Celsius for use in any environment. High common mode rejection ratio: about 90-100 dB High open loop gain: It ensures higher DC accuracy.
23
Part 1: So this op amp will be used to amplify the signal coming in from the D2A (V D2A ) to a 5V as per the following equation: Vout= 4 * (V D2A -1.25) This op amp1 is only used to generate the desired output and supply it to the next two circuits that provide the protection (Part 2 ).
24
We decided on using an Inverting amplifier. Why? Because it has a negative feedback which is good as positive feedback tends to increase oscillation effects. Input the DAC output at the negative of the op amp to stabilize the inputs. Resistor values R5 : R7 = 1 : 4 Thus, we get the negative output which is further fed into part 2.
26
Having some sort of safety provided between the op amp and the point where any voltage can be applied by the user is extremely important as then we have a secure device which is not prone to failures pertaining to accidental mistakes made by the user.
27
Put in a fuse: Problem: Fuse would blow off and the user will have to take the pain of changing the fuse.
29
High load Large resistance used. Will affect the current.
30
Use a PTC: PTC stands for Positive Temperature Coefficient. Materials whose resistance increases when their temperature increases which happens when a high voltage difference is applied across them. The greater the coefficient, greater the increase in the resistance offered.
31
We use a 27 ohm PTC as that is what is used by Sauer Danfoss. Problem: This is good and can be used but its increase in resistance might not keep up if the applied voltage is extremely high. So, we put a PTC instead of the normal resistance that was shown in the previous schematic, this reduces the current flowing through it to an extent and now we can have something else added so the remaining current is drained to someplace instead of going into the op amp.
33
Diodes All the current into+/- 12V might not take such high current
35
Match not only the ratio of resistances at both the positive and the negative pins of the op-amp but try matching their values also; sometimes under high voltages this induces some oscillations in the output of the op-amp. Equations used: Op-amp equation: Vout = Gain (Vd2a - Voffset) Voltage divider: Vout = (R1/R2)*gain
37
Power Distribution Power Requirements Power Protection Switching Regulators Switching Inverters Voltage References
38
Power Requirements 9 to 40 Volt Input Protection against Battery Reversal Protection from Voltage Spikes Voltages Needed 1. 12 Volts 2. -12 Volts 3. 5 Volts 4. 5 Volt Reference with 0.1% Accuracy 5. 3.3 Volts
39
RBO40-40G Protects against Voltage Spikes Prevents Damage from Battery Reversal Clamps off voltages over 40 Volts Small Size for what it does
41
LM2596 Input voltages between 9 and 40 Volts 3 Amp Load Current 3.3 Volt Version Over Temperature Shutdown Requires only 4 External Components
43
LM2731 Fully Adjustable Version Can Boast 3.3 Volts up to 20 Volts Uses small Capacitors and Inductors Small SOT-23 Package 8 External Components
47
LM2611 Can change 2.7-14 Volts down to -36 Volts Uses input and output inductors to reduce output ripple Uses two Resistors to control Output Voltage Small SOT-23 Package 9 External Components
50
LM4041 Can supply a Reference voltage up to 15V with better than 0.1% Accuracy Small SOT-23 Package Uses only three external resistors
52
Future Tasks Continue troubleshooting design Design and build PCB Write software C code for PIC Labview user configuration
53
Timeline Task DesriptionDurationStart DateEnd Date Functional Block Diagram5 days1/29/20072/2/2007 Gather Componants Lists (ALL)18 days2/3/20072/27/2007 Design Ideas (All)44 days?2/27/20074/26/2007 Rough Schematic (All)20 days4/1/20074/26/2007 Gather Components (All)8 days4/27/20075/8/2007 Test Components (Josh and Dan)23 days5/9/20076/8/2007 Break77 days5/14/20078/28/2007 Design and order Board (Josh and Shefali)31 days9/28/200711/9/2007 Test Prototype Board (Josh and Shefali)18 days9/17/200710/10/2007 Software for PIC (Dan and Shefali)18 days9/17/200710/10/2007 Begin Labview Configuration Program (Dan)21 days10/5/200711/2/2007 Test Software (Dan)14 days11/5/200711/22/2007 Test Hardware (Josh and Shefali)14 days11/23/200712/12/2007 Revisions/Modifications (ALL)18 days11/28/200712/21/2007
54
Local Expenses Part DescriptionPart #Retail CostAcquired CostNotesUnits/BoardPrice/Board CAN TransceiverMCP2551 $ 1.45 1 16bit D2ADAC8554 $ 12.00 $ - 2 $ 24.00 EEPROMAT24C512 $ 5.00 1 MicrocontrollerPIC24 $ 18.70 1 RS 232MAX 3223 $ 2.00 1 OP AMPSLM741 $ 3.00 Subject to change4 $ 12.00 Switching RegulatorLM2596 $ 4.70 $ - 1 $ 4.70 Switching RegulatorLM2731 $ 3.00 $ - 2 $ 6.00 Power ProtectionRBO4040-G $ 2.70 $ - 1 $ 2.70 Inverting SwitcherLM2611 $ 2.73 1 Reference VoltageLM4041 $ 0.62 1 Capacitors $ 1.30 Subject to change15 $ 19.50 InductorsL38 $ 2.75 Subject to change5 $ 13.75 DiodesMBR0520LT1GOSCT $ 0.25 3 $ 0.75 Diodes1N5825 $ 7.50 Subject to change3 $ 22.50 Resistors $ 0.25 Subject to change22 $ 5.50 CAN card $ 500.00 $ -Client Expense1 $ 500.00 Enclosure $ 15.00 1 PCB Board $ 100 $ -Client Expense1 $ 100.00 Total Price/Board: $ 141.90 # of Boards:2 Total Price: $ 283.80 Budget
55
Total Budget Granted by NDSU $ 200.00 Money Spent Money Remaining ComponentTotal Resistors $ 15.35 $ 184.65 Almost every component we have dealt with we have acquired as free samples It is hard to project what we will get for free and what we will have to pay for
56
Summary We are well on our way to completing the project by the end of next semester. We have completed a schematic We have run simulations and tested physical circuits We feel our design is complete and we are ready to move onto implementation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.