Tack till alla våra trogna sponsorer som stöttar och håller Rejsa rullande
RejsaRubberTrac
RejsaRubberTrac - Build thread, RX7 FD3S
738 besök totalt
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Hello all, thought I'd share my build with you all.

As I write this I've already done quite some work/research.
But first, my goals:

- I don't want to think about batteries. ever. so I'm wiring it in.
- I do want to be able to replace lens covers.
- For ideal sensor location on an RX7, it needs to be under the front guard. That means I need a way to have replaceable/cleanable sensor covers.

I wish it was as easy as the BMW M2, but nope .
The sensor I think should be placed over the top of the tyre; minimizing distortion from steering travel or "aiming". By "aiming" I mean pointing the sensor at the tyre from a location that isn't direcly above said tyre..

So I've *tried* to get it above.
Mine isn't perfect. And *after* I got 55/60 deg sensors I realized I probably want 120deg. But ohwell. *something* is better than nothing.

So for now I'll run sensors almost directly above the tyres; in a custom mount.
These feed to the adafruit nrf52's on the passenger side (fronts only for now).

I'm driving it all with a simple buck converter. 12-14.4(-ish) v down to 4,127v into the adafruits.

Pics, or it didn't happen right?





I used magic unicorns (photogrametery) to help me build the sensor model. It looks like this: https://www.dropbox.com/s/tvzu999n3kj58ql/RPReplay_Final1656216297.mp4 . . . .

[/img]

_________________
Neil Clayton
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
The in-car case holds 2 x nrf52.

Input is 12-15v, regulated by the buck conveter.



_________________
Neil Clayton
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Here's 2 x nrf52s and a buck converter.

I run wires from the sensors; through the firewall, to somewhere in the cabin.
done!



You can't see it, but the writing on the case says "in case of emegency, pull!"

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

Nice! Really great to see the stuff being built. I've seen Pcbway have sold a lot of the daughter pcb I uploaded there, but I normally never get to see where they went or how the build went. So thanks!! thumbs up

Why the "in case of emergency, pull"


And where is it

_________________
Magnus Thomé
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

Wow, the photogrametery worked amazingly well!

_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
The "emergency pull" was just me having some fun. 0% purpose *whatsoever*

Did a test today; and it worked until I went through 2nd/3rd gear at boost.
Units still have power lights, so not sure what's happened yet. Unfortunately; the sensors are mounted under the fender so they are a pain to get to. So some testing to do.

I would have *thought* the buck converter would handle any variations in power. Will post more when I've found out more...

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

"emergency pull"


_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
I note on the 3d enclosure page: "If you use very long cables between the cpu board and this daughter board and have problems getting readings you might need to mount two pull up resistors on the I2C bus on the daughter board. But this would probably only be needed in extreme cases."

I'm experiencing dropouts and prob have ~2m cable between the nrf52 and the sensors.
What value pull ups are required please? and are they put on SDA/SDC I presume?

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

scornflake skrev:
I note on the 3d enclosure page: "If you use very long cables between the cpu board and this daughter board and have problems getting readings you might need to mount two pull up resistors on the I2C bus on the daughter board. But this would probably only be needed in extreme cases."

I'm experiencing dropouts and prob have ~2m cable between the nrf52 and the sensors.
What value pull ups are required please? and are they put on SDA/SDC I presume?


Yes on SDA and SCL. So far I've not heard of anyone else having problems due too long cables, actually I'm a bit surprised since I know some have run pretty long cables without problems AFAIK. So I don't have any experience or any really good advice more than the old trial and error. I'd start with 10k or 1k. You could also try decoupling the power with an extra capacitor, say a ceramic 1-10 uF or thereabouts. Googling I2C and long cables might give some ideas too.

Also, what kind of cable do you use? Keeping cable capacitance low is thumbs up

PS:
If all else fails get back and we can look if fiddling with the bus frequency could help (setClock())

_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Thanks. I did some more reading on I2C/length and yep, something between 1k-10k. I've a bunch coming in the mail, so I'll try when they arrive. Got some caps around here someplace too.

I used some random unshielded wire I had around the place direct to the sensor (about 22gauge if I recall), then a modified piece of USB cable for the main run (~1.5m). While the cable itself has a shield, I didn't connect any end of that to ground.

I'll try the resistors and cap first and see what happens.

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

Try grounding the shield and see what happens? But could definitely be worth trying a cable without shield also.

_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
So. I tried 2.2k resistors from SDA/L -> 3.3v at the Adafruit boards. I have two boards installed, but only one sensor. I didn't try the second board at this time (didn't think of it while I was on the road)

fyi: I *don't* have caps in place on power -> sensors.

It's better, but still stops after some time (2-4m now). While the car was still running I restarted Harrys LT just in case it was something to do with the app.

I might yet attach a scope and try to log both SDA(L) and volts. I can only do this at the board side of course; not at the sensor "end".

Grounding the shield would be easier than above. So I will try that first.

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

Question is if the problem is in the sensor end or the MCU end.

I'd guess there are pullups on the sensor board but what values? My first try with adding pullups would actually have been at the sensor.

Since the real issue is capacitance in the cable, swapping it to another cable would also be high on my list. I don't have knowledge of how an unconnected shield affects capacitance compared to when grounded but connecting it to ground is a quick test of course thumbs up

Scope sounds like a great idea thumbs up

_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Magnus Thomé skrev:
Question is if the problem is in the sensor end or the MCU end.

I'd guess there are pullups on the sensor board but what values? My first try with adding pullups would actually have been at the sensor.

Since the real issue is capacitance in the cable, swapping it to another cable would also be high on my list. I don't have knowledge of how an unconnected shield affects capacitance compared to when grounded but connecting it to ground is a quick test of course thumbs up

Scope sounds like a great idea thumbs up



from what I can find online, the pimoroni.com MLX90640 doesn't appear to have pull ups. But I could be wrong; I couldn't find a schematic for the board. I know it's got a 5.6v->3.3v converter (so I presume some caps too), but I could find nothing concrete re pull ups.

https://shop.pimoroni.com/products/mlx90640-thermal-camera-breakout?va . . . .

_________________
Neil Clayton
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Went for a bit more of a drive today...

turns out it dies specifically when I boost/rev the car hard.
Makes me think related to EMI. Not done anything else yet. Just posting my ponderings!

Earth the signal cable, or perhaps entirely replace + earth it.
Got some more cable, and I might run a full length to the sensor *without* the intermediate connector. That makes it more "hardwired" in the car, but ... *meh*!

Might also consider wrapping the 3d printer sensor enclosure in foil and connecting that to ground as well. If I have to pull off the fender (which I do to get to sensor) then I might as well do the lot!

_________________
Neil Clayton
Citera
Magnus Thomé
Stockholm
Här sen Nov 2002
Inlägg: 41416

Forumägare
Forumägare

scornflake skrev:
...
turns out it dies specifically when I boost/rev the car hard.
....


That is a bit odd. Even when revving stationary?

_________________
Magnus Thomé
Citera
scornflake

Här sen Jun 2022
Inlägg: 10


Trådstartare
Magnus Thomé skrev:
scornflake skrev:
...
turns out it dies specifically when I boost/rev the car hard.
....


That is a bit odd. Even when revving stationary?


Nope, it doesn't die if I rev stationary.
Havn't tried grounded wire yet. Too busy procrastinating on it all

_________________
Neil Clayton
Citera
RejsaRubberTrac
RejsaRubberTrac - Build thread, RX7 FD3S
738 besök totalt
Tack till alla våra trogna sponsorer som stöttar och håller Rejsa rullande