DAVEga: Battery monitor, odometer, speedometer

Thank you! I ended up just getting from Aliexpress as I would also have to wait for the the parts from janpom and he said the time will more or less align. Good link to have in the thread for people in the US tho.

1 Like

Quit teasing… :rofl::rofl: i should have mine in a few days

I’m actually surprised we’re not seeing more Dave pics. I went over my records yesterday and I already shipped close to 100 kits. I should think of a bonus to ship with the 100th. :slight_smile:

6 Likes

V1.0 FW and I’ll have it working today :grin:

I’ve successfully :smile: changed screen layout, so it would show what’s important for me on my ebike :blush: Thanks again for clear explanation :+1: I’ve made temporary housing, visible scratches are on polycarbonate piece on top of the screen. 20190410_191528

3 Likes

Looks good! I’m glad I didn’t write the DAVEga coding crash course in vain.

5 Likes

That’s amazing! Looks like a successful family business! You already took your children out of school to work 24/7 in the home production? :stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye::stuck_out_tongue_winking_eye:

1 Like

School? What do you mean? I merely shortened their shifts in the mines.

15 Likes

But seriously. Good to see that this is going so well. Really a cool project and i‘m sure you made a lot of people happy with it. Me included :+1:

6 Likes

My first one apparently was too easy to make, after all… This is much better. Now the biggest mystery to me is how to program another option, which is power output in Watts… 20190411_113535

1 Like

You’re getting good at this! :slight_smile: If you’re after the power drawn from the battery, that would simply be the amps * volts. I don’t think you can currently get the watts for the motors from the VESC, only amps.

1 Like

Thank you :slightly_smiling_face: Well, I’m confused with this… Rpm were not too difficult, as there’s “get” message, which returns erpm (I think so). I’ve added “divide by 7” ( / 7) in two places to get rpm from erpm: in simple vertical screen, dtostrf(data->rpm / 7 and in text screen, added SCR_RPM _write_numeric_line(data->rpm / 7 But I have no idea what function should I use for power, float power = voltage * battery_amps; ? And what to write in SCR_ line in text screen? And should I add float power in other files too? Like in the list in data.davega? Time to learn… Lol

data->voltage * data->battery_amps

1 Like

Is it simple as that? :sweat_smile: So in davega_simple_vertical_screen.cpp should I create label: _tft->drawText(x, y, "WATTS", COLOR_WHITE); and dtostrf(data->voltage * data->battery_amps, 4, 0, fmt); tft_util_draw_number(_tft, fmt, x, y, COLOR_WHITE, COLOR_BLACK, 2, 6);

But how to make it shown in text screen? Like that? case SCR_WATTS: _write_numeric_line(data->voltage * data->battery_amps, "W", "power", i); break;

And in davega.screen.h? typedef enum { SCR_WATTS,

In davega.data.h? typedef struct { float watts;

In davega.config.h? #define TEXT_SCREEN_ITEMS { \ SCR_WATTS, \

I apologise @janpom, I won’t bother you again with my noob questions :sweat_smile::exploding_head::flushed::zipper_mouth_face:

That’s all correct, except the davega_data.h edit would be redundant since you don’t set or use the data->watts anywhere.

It would make sense if you set:

data.watts = data.voltage * data.battery_amps;

somewhere in the loop() function in davega.ino (before calling scr->update() but after setting both data.voltage and data.battery_amps).

Then you would be able to use data->watts instead of data->voltage * data->battery_amps. It doesn’t really have any advantage over using data->voltage * data->battery_amps, though. It’s just an alternative way for achieving the same goal.

1 Like

DAVEga v1.0 is out!

7 Likes

Thank you!

2 Likes

Got mine today ! Gonna try and set everything up for unity tonight

image

4 Likes

Perfect timing!

I was planning to update my settings today as I have changed gear ratio and wheel size. My speed has been wrong for 3 days.

Thanks @janpom

1 Like

I’m definitely not a code wiz… hopefully I got these settings right lol. Gonna flash mine in a bit. Wish me luck !!

1 Like