0
\$\begingroup\$

For my project I have to connect a IMU sensor via SPI with a Cortex M4 microcontroller (Teensy 3.6). The sensor has to be about 0.5m apart so I will probably have to add some extras to deal with the longer than normal wires.

Ideally I would like to calculate/simulate my bus before soldering everything. I made a LTSpice model to simulate the behaviour of a 1MHz square wave (see bellow). What I'm not sure is if I have modeled the input of uC and Sensor correctly (as it is now the uC would just float high). From the datasheets I could only gather that the uC has a capacitance of 7pF on it's digital pins and the IMU (MPU9250) 10pF. So I added two capacitors as shown in the schematic bellow. Additionally the IMU breakout board has a 10k pull up. What I could not find is if there is a second internally pull-up that I'm missing.

enter image description here

I want to use the simulation to get a sense to where I can adjust my components to stay within rise time margins and avoid transmission line effects by adding a low-pass filter if necessary.

I'd appreciate any feedback on this.

\$\endgroup\$
  • \$\begingroup\$ In your title do you mean "model" or is Modell (capital M) a trademark? (The other words following probably should not be capitalised either. See also in your post "Sensor", "Pull-up".) It's not clear from your profile if English is your first language. Welcome to EE.SE. \$\endgroup\$ – Transistor Jul 20 '17 at 12:29
1
\$\begingroup\$

I want to use the simulation to get a sense to where I can adjust my components to stay within rise time margins and avoid transmission line effects by adding a low-pass filter if necessary

Adding a low pass filter is probably not going to help your situation at all because it will slow down your signal and create loss. And you cannot avoid transmission line effects. But the good news its, you don't have to worry about transmission line effects and matching until you get into the 10's of MHz range. But the source is not a 50Ω source so there will be low reflection.

What you will have to worry about is the inductance on the cable and mutual coupling.

So your circuit should look more like this: (I know this isn't exactly your circuit but pay attention to the way the ground is drawn, there are no 'true grounds' there is always parasitic inductance and resistance, this is a problem with sensors on cables)

schematic

simulate this circuit – Schematic created using CircuitLab

The current return path cannot be ignored, one problem you will will find is there is a mutual coupling between both wires. How much is this? There is no way to know without experimentation. So the better path to take would be to ask yourself if running at 1MHz really would be a problem with all these effects, from my experience the answer is 'no' especially if this is a digital signal. Its probably better to put a pull down switch next to the sensor.

If you really insist on modeling you can come up with a model, and include as many effects as you like, but realize that the real world is always going to be different, if you can model more than 75% of the effects then you're good.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks a lot. I just wanted to use the model to get a feeling for the general behaviour of the circuit and effect of the different components/dimensions. Regarding the cable choice. I was planing to use use ribbon cable I read that alternating signal1/gnd/signal2/gnd/.../3.3V would be an option. For the traces on the perfboard keep em short and perhaps use some enamelled wire? \$\endgroup\$ – Skaveelicious Jul 21 '17 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.