DAVEga: Battery monitor, odometer, speedometer

@janpom I found a potential bug in 1.0. On the motor or battery amp screen when I go from full speed to hard break I get some random graphical errors. It does not happen on the speed screen or the text screen. Also if I cycle through the screens it goes away. The error is very repeatable on the bench but less so on the ground. I need more road testing to see if it really is a big issue or not. Will let you know.

IMG_3204

2 Likes

I noticed something similar when testing. It happens very randomly and I haven’t been able to consistently reproduce it. Also, I have only seen it happen when using all four screens. The only reason I can think of is that the MCU is low on memory. There’s only 2 kB of RAM on the ATMEGA-328. Could you please try disabling at least one of the screens? That should free up some memory. Please let me know if that helps. Thank you.

1 Like

image

Got it working ! So awesome

3 Likes

Dual Vescs? for the 2 uart sources?

4 Likes

Nah , I’m Unity all the way

2 Likes

Edit: After writing it all down and taking all the pictures I realized that the 4P connectors are different from the batch I ordered earlier. The guidelines below assume the 4P connector looks as follows

IMG_1834

which is apparently not the case for some of the kits I distributed. So as a preparation step you will want to unpin the wires from the housing and plug them back so that it looks as on the picture above. Then on the pictures below, let’s pretend this has already been done. :sweat_smile:

At the end of the day, the Dave has to be connected to the VESC as follows (5V-5V, GND-GND, RX-RX, TX-TX):

IMG_1835

Sorry for the confusion! I will update the guidelines later.

I realized that maybe it’s not completely obvious how to get from here:

IMG_1824

to here:

IMG_1829

so here’s how to make the DAVEga-VESC cable. If you have crimping pliers and JST-PH crimps, that’s ideal. I guess that most people don’t though. No worries. You can do it just with a soldering iron as well.

First, you will want to unpin the wires from one of the 4P housings. I do it with a very small screwdriver. A needle should also work. You will want to lift the piece of the plastic that holds the crimp. Then you can unplug the wire.

IMG_1825

You can be rough with the housing since you won’t need it. Be careful not to damage the crimps though.

You will get four crimped wires.

IMG_1826

Now, depending on your VESC type, you will want to take either the 7 pin or the 8 pin JST-PH housing (both come with the kit) and plug in the wires correctly. Check your VESC UART connector. The color mapping is as follows:

  • red - 5V
  • black - GND
  • white - TX
  • yellow - RX

Here’s what it looks like for FOCBOX (and Unity). I believe this is the most common pinout.

IMG_1827

If you happen to have @stewii’s ESCapes, you will want to have the wires plugged into the housing as follows (completely different from FOCBOX):

IMG_1828

Then you simply solder the 4P and 7P (or 8P) parts together (I didn’t have white heatshrink :slightly_smiling_face: ):

IMG_1829

Depending on where you want to install your Dave, this will likely be too short, so you will want to use an extension.

You can either use a 4 conductor cable:

IMG_1830

or 4 individual wires. 26 AWG is ideal but anything in the 20-28 AWG range is usable. Here’s what the end result should look like.

IMG_1831

Also, you don’t have to use the 4P connector but instead solder to the Dave PCB directly.

IMG_1832

It doesn’t matter whether you solder on the VESC port or on the USB-UART port. These are the same rails. You can actually easily see on the PCB how the pins are connected (RX=RXD, TX=TXD, etc).

IMG_1833

So feel free to solder on the USB-UART if that’s easier for you. It all comes down to what kind of enclosure you use and how you route your wires.

See also here for how to make a more advanced harness that can also be used for updating the FW.

14 Likes

This post :arrow_up: should be linked directly from the github readme so you don’t have to read 1295 posts to find it :slight_smile:

7 Likes

33

12 Likes

I had to revert back from 1.0 to 0.6. i was gaining 1269 km at each startup of the Arduino.

Can I have more details please? When you say “gaining”, do you mean the odometer was at 1269 km after the first startup; at 2538 km after the second startup, etc? Is it the “total km” or the “trip km” or both?

Is anyone else seeing something similar with v1.0? It works fine for me and there haven’t been any code changes since v0.6 that should affects this. Weird.

I hope it’s not spamming… :stuck_out_tongue_winking_eye: My final version :grin: 20190414_202040

3 Likes

“MAH” is mega-amp-henries

“mAh” is milli-amp-hours

4 Likes

Sent you a video of the issue

Yes, you’re right :laughing: Actually I’m perfectly aware of it. Because the screen is so small and I squeezed 6 different values showing on this display, I decided to go full capital letters. Just my personal choice, I don’t encourage anyone to do the same…

As long as you understand you own version lol Looks great!

2 Likes

Science doesn’t work that way. It’s either correct, or it’s incorrect.

3 Likes

If you look at original layout on “default” screen, you’ll see displayed capacity with capital MAH too :smile: Looks like no one complained about it earlier? :wink:

Actually, he did. :smile:

4 Likes

Haha, anyway I’m not bothered, if it’s about calculations, then indeed it is important. But on the display, when we all know what it shows anyway… :stuck_out_tongue_winking_eye:

1 Like

The people who lost billion dollar spacecraft weren’t worried either about the “silly shit”. Science doesn’t give a flying fuck what anyone thinks. What’s correct is correct, and what isn’t, isn’t. Feelings are not taken into consideration.

Building an electric skateboard is being an engineer on the side. Engineers use science.

2 Likes