I'd like to use a variable speed trigger for brushless dc motors from "omron". Its the type you see on BLDC equipped battery operated drills. https://www.components.omron.com/product-detail?partNumber=C3AW. The datasheet is not super informative. the trigger has 8 cables and a fwd and rev switch. some clues: I know at 2mm of trigger travel you have start voltage of .3v and full speed start voltage 4.8v at total travel or 8.5mm. The trigger is rated to 42vdc. Does this sound like something i could make work?
You want a ADC throttle adjusting the voltage in between the GND pin and the 3.3V pin. Basically a potentiometer changing the resistance in between the ADC pin and the 3,3V rail.
You can't apply external voltage!
I mean, you can, that's exactly what the pot is doing....
So the switch is internally connected like this:
From page 3 of https://omronfs.omron.com/en_US/ecb/products/pdf/en-c3aw.pdf
It seems when you pull the trigger first the main switch is connected, pins 1 & 5. Then the pot between pins 2, 3 & 4 varies depending on how much you pull the switch. The selector switch grounds pins 6 or 7 to pin 4 (or maybe pin 8? it's unclear)
I can't remember the ADC pinouts exactly and I can't find a guide, any chance of a link Frank? But you want to connect pin 2 to +3V3, pin 3 to the ADC1 input and pin 4 to ground. To get reverse connect one of pin 6 or pin 7 to the RX/reverse pin on the VESC and pin 8 to ground.