You are here

coms port bluetooth and switch and adc ?

8 posts / 0 new
Last post
badger1666
Offline
Last seen: 1 year 2 months ago
Joined: 2017-11-11 13:08
Posts: 33
coms port bluetooth and switch and adc ?

hi

i am planning to use a vesc6

in a high power scooter project and want to make heavy use of coms port.

adc for throttle, switch for variable regen   and bluetooth to monitor speed ect.

from what i have read so far it looks like this might not be possible, as bluetooth  uses rx pin but so would the switch for the regen. is this correct?

is there a way to use a spare adc pin for the regen switch ?

thanks

 

 

benjamin
Offline
Last seen: 2 weeks 3 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

The inputs behave differently depending on the app you choose. If you use APP_ADC then rx and tx are used, but if you use APP_ADC_UART (which you would use for connecting a bluetooth module over UART) the servo input is used instead. You can have a look in the code to see how it behaves exactly:

https://github.com/vedderb/bldc/blob/master/applications/app_adc.c

badger1666
Offline
Last seen: 1 year 2 months ago
Joined: 2017-11-11 13:08
Posts: 33

hi benjamin

sorry dont understand code that well, so if i use adc uart app  i would use servo input for  what exactly ?

i would  like to use bluetooth for reading power and speed using an android app.  after a change of plan.use two hall throttles ,one for accelerating , one for variable regen brake .

how would i connect them adc1 and adc2 ??

thanks

C green

benjamin
Offline
Last seen: 2 weeks 3 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

If you use two hall throttles you don't need rx and tx for control, so then you can just use APP_ADC_UART and connect the throttles to adc1 and adc2 and the bluetooth module to rx and tx.

Amaxophobie
Amaxophobie's picture
Offline
Last seen: 5 months 2 weeks ago
VESC FreeVESC Original
Joined: 2017-12-22 19:24
Posts: 2

Hi,

As I'm coming from a regular ESC and got an Arduino translate from hall to ppm I would like to get it directly done with the VESC6 alone. 

I would change the settings in the VESC Tool to ADC and UART and split the power/grnd cable to feed the bluetooth module and the hall-throttles. The RX and TX from the module stay as they were but the signal wire from the hall throttles goes now into ADC1 and ADC2.

Is this correct?

siicic
Offline
Last seen: 9 months 4 days ago
Joined: 2019-03-23 17:49
Posts: 3

Hi, could please someone explain how this is done? I`m using flipsky 4.2 VESC and I have throttle on ADC1 with brake switch on ADC2 and pas sensor on TX and RX, but I also need reverse button and when in tool I select ADC_CTRL_TYPE_CURRENT_REV_BUTTON_BRAKE_ADC I should be able to engage reverse by pulling signal pin for receiver low? If so then what could be at fault, that it doesn`t engage? and if not, how to do it corretly?

Thank You.

siicic
Offline
Last seen: 9 months 4 days ago
Joined: 2019-03-23 17:49
Posts: 3

Still hoping for some advice 😄

Ampit
Offline
Last seen: 1 month 2 weeks ago
VESC Free
Joined: 2023-09-11 03:15
Posts: 4

So if I am understanding this correct, as long as ADC _ UART is the app mode that is selected the servo pin automatically become available for use to connect your brake button but use the same GRN and 3.3 volt pins that you would have used for your throttle on ADC1  if needed for this brake button? Or would this brake button has to be a one wire setup wired to the servo pin that would be grounding the servo pin ? (If not what kind of signal would you connect to the servo pin?) for the PIN and that would act as the brake button turning your throttle into a proportional regen brake....