DAVEga: Battery monitor, odometer, speedometer

@SeanHacker Nice progress! Can you update the firmware on the MCU using the USB adapter now that it’s correctly programmed?

1 Like

I wasn’t able to test last night, but I plugged it in this morning before work and it uploads just fine. :slight_smile:

I have one question though. How should I input my gearing correctly? I use #define GEAR_RATIO 2.5.1 and I get an error “too many decimal points in number”

@SeanHacker The GEAR_RATIO is the ratio between the wheel pulley teeth and motor pulley teeth count. For example, if it’s 40:15, you would:

#define GEAR_RATIO 2.66667

or

#define GEAR_RATIO (40.0 / 15.0)

should also work – the parentheses are mandatory in this case.

I realize this is somewhat confusing. I’ll change this setting to two constants instead called:

  • WHEEL_PULLEY_TEETH
  • MOTOR_PULLEY_TEETH
3 Likes

done: https://github.com/janpom/davega/commit/9746e9ecccba519264c0825a736f08d8c0429c5b

3 Likes

Added a new feature to the FW. If you press and hold the button 2, the remaining mAh is estimated from current voltage and the Coulomb counter state is set accordingly. This will be handy for those of you who don’t charge to 100%. Also good to have anytime mAh is showing the wrong value for whatever reason.

I’ll do some more testing tomorrow and if all works, I’ll go ahead and release v0.2, so that you guys that will be receiving your Dave kits shortly can grab it.

2 Likes

I think the only reason you say that is because you’re just use to imperial. The main problem here is that switching over to metric would be difficult and tedious but in the long run it would be so so much easier.

As someone who grew up using imperial (because that is what is used in United States unfortunately) and then had to use metric for school. Metric is my preferred way to use measurement, even at the detriment of myself because everyone and everything around me is using imperial. I say this even when I can’t always envision the size of something in cm/m or the speed of something in kp/h or the temperature of something in Celsius. I still can accurately estimate something in imperial but I suppose I’ll only get better with time.

Didn’t have much time today. But I have everything in its place and going to drill through my x-things and board to go for a first ride. Hoping for this weekend. First time doing anything like this. I loved everything about it so far. :slight_smile:

IMG_20181113_193641 IMG_20181113_193006 IMG_20181113_194035 IMG_20181113_193235 IMG_20181113_164813

5 Likes

Confirmed the case fits now. Well the top half anyhow, just need to update the bottom half of the case then will upload to thiniverse. I have used a SLA printer so if your using FDM your tolerance will have to be on point or fitment will be tight.

I got 4 wires for the Vesc and 4 wires for the buttons as they share ground. @janpom I wonder if you can have just 3 wires for the buttons and share the vesc ground from the other 4 vesc wires? I am having the buttons external for now as I can more easily water proof that way, I don’t have a specific button on hand yet and my case is so damn small any button will be a challenge to include.

Photo%20Nov%2014%2C%201%2008%2006%20PM

Photo%20Nov%2014%2C%201%2007%2038%20PM

Photo%20Nov%2014%2C%201%2008%2055%20PM

Photo%20Nov%2014%2C%201%2009%2049%20PM

11 Likes

Quick question: Whats the maximum length of the canbus cable? Because I want my display in the front but my vesc is in the back of my board :smile:

@lrdesigns Awesome work!

Yes, that works. It’s the same net.

Do you have a plan as to where the buttons will go? On the battery enclosure?

Maybe the buttons could go on the right side of the case? The small tactile buttons could potentially fit between the two PCBs, facing right.

1 Like

We’ll have to find out. I ran it with ~40cm of a shitty cable with tiny conductor wires (must be like 30 AWG) and it worked just fine.

2 Likes

image

IMG_1313

I added a DTR wire for programing externally over the vesc wires. Un-plug vesc first

6 Likes

I’ve got 6 PCB’s courtesy of @janpom for anyone interested.

IMG_20181114_103745_1542213519986

Make a donation of $1 or more to Donate to Doctors Without Borders, this is @janpom’s charity of choice, and send me $1 for shipping.

image

This is ONLY the PCB, not the kit. I do NOT have the other components you will need to complete the DaVeGa.

6 Likes

Got mine loaded up. Thanks again @janpom, this is an incredible thing your giving to the community.

IMG_20181114_125048

10 Likes

does anyone know if I can use a 4 pin momentary switch instead of a 2 pin, using soldered leads on 2 legs? I have a million of them :slight_smile: .

https://www.amazon.com/GZFY-6x6x4-5mm-Momentary-Tactile-Button/dp/B01N6GU7TA/ref=sr_1_1?ie=UTF8&qid=1542225752&sr=8-1&keywords=6x6x4.5mm+Panel+PCB+Momentary

2 Likes

Both sides are same :slight_smile: 2 -> 2 Just use multimeter to check which ones are together

4 Likes

Probably another dumb question @janpom or anyone who knows. Not sure what happened but I’m not able to get and data to DAVega. The first time I tried it worked fine. Hooked up to one of my boards tonight and nothing. Do we just wire this up to the vesc just like a Bluetooth module? Or is something else needed for it to communicate?

You have to set the vesc to communicate through UART

1 Like

Yep. First thing I did before I hooked it up. I run Bluetooth modules in all my boards so it’s already set.

TX to RX and RX to TX right? You didnt connected RX to RX and TX to TX? :smiley:

1 Like