DAVEga: Battery monitor, odometer, speedometer

@ROFEN13 What do you select as “Port” in the Arduino IDE? Please share the console output (the last ~10 lines) from when the FW upload gets stuck. Detailed pictures of the board (without the display) would be helpful. Ideally both sides.

1 Like

Hopefully I’ve done something dumb and just overlooked something! The only port available is “Com 7” (windows)

20190210_135405 20190210_135325

C:\Users\Trevo_000\Downloads\davega-v0.1\davega-v0.1.ino:192:20: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

         return "unexpected fault code";

                ^

C:\Users\Trevo_000\Downloads\davega-v0.1\davega-v0.1.ino: In function ‘void setup()’:

C:\Users\Trevo_000\Downloads\davega-v0.1\davega-v0.1.ino:215:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

 display_set_fw_version(FW_VERSION);

                                  ^

C:\Users\Trevo_000\Downloads\davega-v0.1\davega-v0.1.ino: In function ‘void loop()’:

C:\Users\Trevo_000\Downloads\davega-v0.1\davega-v0.1.ino:276:42: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

     display_set_fw_version(FW_VERSION);

                                      ^

sketch\vesc_comm.cpp: In function ‘vesc_comm_fault_code vesc_comm_get_fault_code(uint8_t*)’:

sketch\vesc_comm.cpp:179:26: warning: invalid conversion from ‘uint8_t {aka unsigned char}’ to ‘vesc_comm_fault_code’ [-fpermissive]

 return vesc_packet[55];
1 Like

I you unplug the USB-UART adapter, does that port disappear from the options?

The diode is reversed on the board with no display headers. The black end must be on the left hand side. I suppose this is not the one you have tested though, right?

When you power it on, the display is rendered correctly? Have you tried connecting it to a VESC?

The console output that you provided are only warnings. That shouldn’t be the last thing you see before the FW starts uploading. There should be something like:

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/Users/xpomikal/Library/Arduino15/packages/arduino/tools/avrdude/6.3.0-arduino14/etc/avrdude.conf"
         User configuration file is "/Users/xpomikal/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.SLAB_USBtoUART
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
1 Like

Diode is reversed… And some solder joints look cold. :slight_smile: Did you install the uart driver? 15498264414095403510395705885687

I checked in system management and Com 7 is the port designated with uart driver. It does disappear when unplugged. Everything on the screen appears as it should when in the computer, I haven’t tried it connected to the vesc yet, I was trying to configure it to my board first That is the last thing that appears before it stops…

"C:\Users\Trevo_000\Desktop\davega-v0.4\davega-v0.4.ino:86:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

Sketch uses 25700 bytes (83%) of program storage space. Maximum is 30720 bytes. Global variables use 1102 bytes (53%) of dynamic memory, leaving 946 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch"

It would be helpful if you could try connecting it to VESC. If that works, it means the serial connection is functional. That’s used both for VESC communication and for FW update. There could be a problem in the RESET net – that’s the diode, resistor, and the 100n cap. Its purpose is to reset the MCU before the FW upload.

One more thing. In your Arduino IDE preferences, please turn the “Show verbose output during:” for both compilation and update. Then please send the console output again. It should have more details.

1 Like

The diode (1N4148) is backwards on one of those (the top one in the photo). Direction is critical.

2 Likes

I reversed the Diode so both DAVEgas are correct now. This is the error I get.

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53 Copyright © 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright © 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

     Using Port                    : COM7
     Using Programmer              : arduino
     Overriding Baud Rate          : 57600

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x08 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xa0 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfc avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x20 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfc avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x08 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x20 avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfc avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x08

Thanks for your help everyone! I will check the connection with the Vesc later today.

1 Like

This looks wrong. Should be 115200. What do you have in Tools > Board and Tools > Processor?

1 Like

Adurino nano and atmega328p I saw that the baud rate wasnt right but didnt know how to change it…

Same exact readout on both boards (After it has been fixed).

Tools > Board > Board Manager... then find Arduino AVR Boards (should be at the top). What version do you have? If not the latest, try installing the latest.

2 Likes

Well guess what… it worked! Hahaha thank you so much!! Im glad it was vecause I overlooked something dumb15498309610667532707130882520364

4 Likes

Great! 10c

2 Likes

IMG_20190210_184700_776 IMG_20190210_184700_778

a new DAVEga installed! on my esk8 this time!

8 Likes

@mmaner I am about to get the latest version of your enclosure printed. I’m trying to wrap my head around the buttons. I understand that the printed caps should be glued to the buttons, but what exactly is the idea for holding the buttons in place?

I really like the metal panel mount buttons that @lrdesigns uses. They look great and are easy to install. I’m afraid they are slightly too big for your enclosure. Any ideas for a simple mod that would allow using those? Thanks.

2 Likes

There are recesses on the inside of the case that hold the buttons in place, I just use a little hot glue to keep them from moving. I wish I could find some 6 or 8 mm momentary switches to use.

Hey everyone. Another issue. It isnt reading from the vesc. I have Rx to rx Tx to tx Ground to ground 5v to 5v Both Davegas have the same problem and it happens to both vescs. Baud rate is 115200 20190215_111641 Thanks again all.

Do you mean you have TX to TX on both sides (VESC and DAVE) or is it implied you mean you have a TX to RX (VESC to DAVE)?

1 Like

Same as this.

  1. App Settings; General; App to Use: PPM and UART

Did you do this? I did setup yesterday and it works great!

2 Likes