cancel
Showing results for 
Search instead for 
Did you mean: 

Validating wiring for temperate control unit

losduos
Associate II

Hello,

This is my first post here, and just putting it out there from the start, I am no expert in electronics. I am looking for some guidance on putting together a small temperature controller for an EV vehicle conversion. What I am missing is a simple controller that will measure temperatures of two cooling loops and use PWM signals to control two pumps, a heater, and switch on a fan. Below is a more detailed description. BTW if this is not the right place to post this, by all means let me know. 

  • I am using a LM7805 along with the recommended two capacitors to power a Nucleo-L432KC
  • I am reading out 2 automotive temp sensor, supplying a 5V reference signal and reading out the resistance through a voltage divider setup (R1 & R2). I am not sure yet the total resistance required to ensure not to exceed 3.3V at A0 and A1 as I have to get the sensor and measure their resistance/voltage over the temperature range
  • I use 3 2N2222 transistors with 2 resistors each to level shift the PWM signal to 12V. I need to generate between 9 and 300Hz with a max 50mA signal to be fed to PWM-controlled water pumps and a water heater (Q2, Q3, Q4 - https://octopart.com/2n2222a-diotec-31147100)
  • I have one switch, pulling to ground, to activate a relay for a FAN (Q1 - https://octopart.com/2n2222a-diotec-31147100) Lastly, I am using a MCP2551 chip to enable CAN communication. This is not essential at the moment, but all the other controllers have CAN, so it would be a helpful feature.
  • It all connects to a Deutsch connector and is meant to fit into a small enclosure
  • All resistors are 0.25W

Capture.JPG

I basically put this together from online research but am at a point where some expert input might be good. So the simple question is, they way the circuits are drawn up, will they perform as described above? 
 
Any comments welcome. 
5 REPLIES 5
raptorhal2
Lead

is meant to fit into a small enclosure

The Nucleo is OK for a prototype, but production smallness is better achieved with a custom STM32L432 daughterboard, or mounting the micro on the main board. The programming pins would then have to be brought to a connector.

The STM micros have built-in pull up and pull down resistors for the programming pins that are adequate for a benign electromagnetic environment. Consult with an EV EMI expert to determine if your board will need additional programming pull up and pull down resisters to prevent EMI from reprogramming the micro.

losduos
Associate II

Thanks for the input. Agree in the long run I would definitely go for micro on board but to try it our I figured this is a good start. And I am not that versed in this stuff yet to build a whole board I think. 

I am just looking at some charts for the temperature sensors in terms of resistance but I am finding some conflicting information regarding the I/O input voltage, I was under the impression they only take 3.3V max but I also read that 5V is acceptable. Any clarification on that? 

Thanks 

Ozone
Lead III

While you don't state it explicitely, I think you don't talk about a commercial project here, but a private/hobby one.

In this case, the Nucleo board and the "industrial" MCU variant are fine. Commercial projects would require extended temperature range variants.

Assuming a supply from 12V, the 7805 will still create quite a bit of heat. I would have used a switching converter, probably an off the shelf module.

For the outputs, I think at least for inductive loads (the water pump probably is), protective (flyback) diodes are required. Automotive environments are not known to be very clean and stable, I would recommend protective circuitry on all inputs and outputs - including the power supply.

And I would consider a debug adapter connector and a serial (UART) interface/ connector as options for debugging and testing purposes.

By I/O input voltage, I presume you mean the Nucleo pins, not the temperature sensor pins.

Read the MCU data sheet. 5V tolerance applies to some digital pins. All pins in analog mode are limited to the MCU reference.

losduos
Associate II

Thanks for the input, much appreciated. I have spent a bit of time on this now and concluded it makes just more sense to build something from scratch. Looking at generic open-source ECUs, the F103CB6 seems to be sufficient for what I need to do...

What still gives me some trouble is the PWM output. I believe the following should work as far as the water pumps should go (I also have very limited information on those TBH).

PWM.JPG

But one of the PWMs connects to a heater, and the manual is asking for an open collector circuit with a minimum 20 mA signal current. Below is the internal signal processing on the heater side. 

Opencollector.JPG

Would that mean that I should remove one of the resistors (e.g. R21) and connect the collector directly? Like so:

PWM2.JPG