DIY Electric Car Forums banner
81 - 100 of 136 Posts

· Registered
Joined
·
746 Posts
Discussion Starter · #81 · (Edited)
Simulations results of a tuned Bessel filter:
- characteristic frequency close to 48 kHz
- app. 12x higher Rin/Zin >> higher accuracy
- voltage shifting at the input 5 > 3.33 V
- high dampening factor ζ ~= 0.8 >> no overshoot
- step response ~ 6 usec (0 to 90%)

For higher accuracy I'm going to add a MAX6071BAUT41 at the VREF input of the ATMEGA64M1 and SN74LVC1G125 buffers at the inputs of the current filter.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #84 · (Edited)
No connector issues here. The controller only needs 5 external wires, because it is a CAN system: GROUND, CANL, CANH, +12V and I have added BRAKE IN.

Bosch introduced the CANBUS system to reduce the number of wires in the wiring loom. And it works.

I have picked the 5pin EDAC E-seal 560 series connectors. http://www.edac.net/dat/files/135.pdf
EDAC is a Canadian company, headquarters in Markham, Ontario.

The image shows the ATMEGA64M1 P85D front motor controller board design in one of the early stages.
 

Attachments

· Registered
Joined
·
2,229 Posts
Your miles ahead of me Tony:) I'll sort out a board outline and hole locations for you over the weekend. The logic board uses a 24 pin 2.54mm pitch dual row connector to the igbt driver stage.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #87 ·
Thanks. Yeah, probably 4 layers.

@Damien: OK, bit of a surprise but I can wait a few days.:)

In the mean time I'll try to sort out the CAN I/O satellite (instrument cluster, throttle, warning lights etc.)
and an information display / control unit for the auxiliary systems like A/C, vacuum pump, audible warning etc.
I've seen a very nice blue/white 40x2 Arduino compatible display (parallel HD44.. LCD lib).
 

· Registered
Joined
·
746 Posts
Discussion Starter · #88 · (Edited)
Yes, finally, the Raspbery Pi A+ is here and it supports CAN boards with a MCP2515!
Just add a TFT touchscreen (at least 10") and the result is a nice, low cost Tesla look-alike.

However, the Pi has not been designed for use in a car to be part of the drive system.

So here it is: the PCB design of the mini version with the bare drive system essentials for arguably the best compromise of cost, size, reliability etc. Based on the AVR 8 bit automotive CAN/SPI controller ATMEGA64C1.

The board is the human interface for the ATMEGA64M1 controller board that will find its place in the Tesla drive unit.
Possible inputs: micro SD card with preset controller settings, 2.8" touch screen for information, configuration and modification, and the usual pedal and gearshifter inputs: throttle pots (2 max), gearshifter and switches.

Touchscreen: ADAFRUIT 1651 https://www.adafruit.com/product/1651

On/off inputs: PARK-REVERSE-NEUTRAL-DRIVE-ECOGEAR-LOWGEAR-WINTER-SPORT-CRUISE
(Throttle) Pots: 2
Ouputs: TFT 320x240, 4 analog (PWM) outputs for speedo etc., relay drivers for precharge and main contactor.
Safety input, potential free (up to +/- 50V): BMS/CHARGER

SMPS 6V preregulator with EN50022 EMI filter
5V 1% LDO postregulator
Short circuit multifuse protection on 12V input and switch input circuits
Resistive current limiter on potmeter circuits
Smartmos protection and diagnostics in relay drivers: EMI, overtemperature, overcurrent, overvoltage, reverse polarity, and detection of open/short circuit in relays.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #89 · (Edited)
The board design is almost ready to be sent to the foundry.

Bare essentials with regard to functionality.
Example: (regen) brake signaling to traffic relies entirely on the brake pedal switch turning on the brake lights.
Activating the brake lights via CAN will be implemented in the rear lighting CAN controller.
The schematics for the front lighting CAN module are done, PCB is next.

Switching on the reversing light via CAN is essential for a single gear transmission.
It has to be done when the inverter signals actual driving in reverse. So the board in the images supports it.
Another last minute addition: input for the kickdown switch.

Images are in 3D. Not all parts have 3D models (yet). And the male header strip should be female.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #90 · (Edited)
Final additions to integrate a CANBUS based TESLA drive unit in another non-TESLA car.

1. BRAKE LIGHT outputs. All essential CAN functionality is now on one board.
Two drivers, LHS/RHS, each with 4 channels, 3A per channel, two or four channels can be connected in parallel on one driver.
Should provide enough flexibility for almost every imaginable combination of brake lights.

2. On board seperate 150mA 5V LDO for the (throttle) pots. Those hall pots are 5V, aren't they?. Yeah, I'm pretty sure they are.

3. Two auxiliary relay drivers. For a FAN, coolant pump or whatever is needed.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #91 ·
Now a protocol for sending messages across the CAN bus is needed.
I'm not going to implement CANopen or anything similar.
CANopen is great for a large (industrial) network with a lot of different types of nodes with its directory service, network management messages, dynamic adrresses and so on.
On a uC about 40K code, 2K data is the minimum requirement for CANopen.

No, it's bare essential functionality again with a custom protocol.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #93 ·
The complexity of CANopen reminds me somewhat of network operating systems I worked with in IT in the 90s.
I think it is less of an effort to compose a set of custom messages than to dig into the CANopen source.
Only a very small set of messages is needed for the drivetrain.
 

· Registered
Joined
·
971 Posts
No its simple if you limit it to the basics.
For example splitting the 11-bit ID into function code and nodeid:





Function code Node ID
Length 4 bits 7 bits

Getting and setting parameters via SDO (Function code 0x600)

Byte 1 Byte 2-3 Byte 4 Byte 5-8
3 bits 1 bit 2 bits 1 bit 1 bit 2 bytes 1 byte 4 bytes
ccs=1 reserved(=0) n e s index subindex data
Byte 1 looks complex but for getting/setting 32-bit values it's trivial. 0x40: write, 0x22 read. You can use index or subindex for addressing the parameter.

And PDO does not even define a fixed data structure, only the function codes.

There are standardized device profiles that exactly describe where to find data. And other good stuff. It's just an encouragement to not reinvent the wheel.

EDIT: formatting did not survive... Found here: https://en.wikipedia.org/wiki/CANopen
 

· Registered
Joined
·
746 Posts
Discussion Starter · #95 · (Edited)
CANBUS is really simple. Takes care of almost everything. Like a wheel. If you spin, it stays upright.

So no need for for a complex HLP like CANopen. Adds a lot of unnecessary overhead.
CANopen is a layer on top of CANBUS to accomodate large industrial networks.
Has nothing to do with the roots of CANBUS in automotive.

In fact it is like designing a controller with a lot of external wiring. Not done (uncommon practice) since the 90s.

I'm sticking with a custom set of messages. Done in a few hours.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #96 ·
Allright, let's design and build an inverter. And we'll start with some inexpensive short circuit rated ISOPLUS247 soft punch through IGBTs: IXYS IXA37I1200HJ.
Yes, IGBTs for now. They are not very expensive to blow up. Less than US$10 a piece.
And of course, I'll protect them against dI/dt breakdown at turn-off with mosfets in parallel.:)

I'm going to need an inverter for the motor that drives the mechanically driven auxiliary systems like the pumps for the airconditioning and power steering.
Air cooled, probably a car fan for the AC radiator on top.
I already have the coolers. Size 10x20 cm, 10mm bas plate, 30mm fins, one for the hi side and one for the lo side.
Not with those thin fins since Semikron and others indicate that they are dust collectors.:D
 

· Registered
Joined
·
746 Posts
Discussion Starter · #97 · (Edited)
EXCELLENT NEWS. AFAIK TESLA IS THE FIRST WITH SIC IN A SERIES PRODUCED CAR, MODEL III.

One of the motors in an AWD model is an ACIM.
Now it's a waiting game for the first autopilot totals to hit the scrapyard.

https://insideevs.com/tesla-model-3-dual-motor-and-performance-versions-revealed/

Looks like I can use the two coolers in the previous post for my senior EV build. One for the mosfet and the other for the freewheel diode.

More great news: Johannes is adding CAN IO to his homebrew controller. Thumbs up!
 

· Registered
Joined
·
746 Posts
Discussion Starter · #98 ·
GREAT! More than 50K model III delivered in the last quarter.

I'm sure quite a few of them are the dual motor version with the SiC hardware and an ACIM.
So it's time to blow away the dust from the MEGA64 diagram and modify it so it can be used with the latest pre- and discharge circuits in https://www.diyelectriccar.com/foru...ic-precharge-controller-discretes-198359.html

I'll implement slip control since it is the most efficient way to drive an ACIM and I certainly don't want a huge battery pack.
 

· Registered
Joined
·
746 Posts
Discussion Starter · #100 ·
No, seriously. This has been clear since day one: the usual CANBUS topology for cars will be used. Lots of dedicated, inexpensive uC on the bus.
We need a controller in the (duino) DIY zone. So no changes here: ATMEGA32/64M1.

Just giving a little kick to this thread. So y'all know it is still alive.

It's a waiting game. Model III SiC drivetrain and next gen battery tech: solid state.
You know, solid state: safe, less expensive, wide operating temp range. And on top of all that: it only needs a basic BMS setup.
Looks like this one (Prologium, Taiwan) is going to be the first in a production car. Maybe next year (NIO ES3?).
NEWS: Several EU car makers and Chinese startup NIO are testing these battery packs. Right now! Great!

https://tech-papyrus.blogspot.com/2018/12/prologiums-solid-state-battery-won-ces.html
https://www.youtube.com/watch?v=plTeGaP3a04
https://insideevs.com/news/367082/prologium-nio-solid-state-batteries/


I'll send the design of the ATMEGAxxM1 board to the foundry for PCBA service (includes assembly) as soon as I have some spare time. Maybe early next year.

Then the software bit can start. It's all out there. Just has to glued together.
 
81 - 100 of 136 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top