I'm getting somewhere now. It's not giving full throttle but it is giving some throttle.
I had to hook up the throttle unit in parallel with the Arduino for the bike to accept inputs from the Arduino.
This might work out ok because i wanted to have a throttle lever and pedal assist anyway.
More testing to do still!
I briefly had it working without the throttle connected. I had put a 1.2K resistor between the positive and ground wires and that did it. The bike was under control of the Arduino. Then it just stopped working and hasn't worked since.
The Arduino still works, and the bike still works if I hook a regular throttle to it. Mysterious
@MLE_online aha! I bet I know another answer!
Part 1: was the voltage TO the orig throttle (pot, I suppose) *slightly* less than 5V?
Part 2: did you ground the microcontroller to the "low" voltage lead of the 3 wires, or the "real" system ground?
What I think is going on: I think the signal your giving it is "out of range" like I said, the cart I have is picky, if the "value doesn't look right" it does a safety shutdown. You might find by limiting the max and min PWM levels, you find a "happy place"
I suggest starting it at 50%, and slowly dialing up/down to feel out the limits.
you got this! Were all counting on you!
:]
@RueNahcMohr It's a full 5V going to the original throttle. The original throttle is not a pot. It's a hall-effect thing.
I grounded the microcontroller to the black wire that is identified as ground.
I have already limited the max and min PWM levels so they match the voltage limits that the throttle outputs when it's at the bottom and top of its range
@MLE_online interesting, they must have a really curious "safe input" system in there.
I suppose you cant see the chip in the throttle, I suspect its a hall effect pot.
Does it look like this?
@MLE_online based on what I learned here, it must be ripple in your pwm freaking it out.
With the 1.2k resistor, its fine with the bench power supply signal?
'tomorrow' I know....
@MLE_online I know.
scope this a second.... ( I know the filter might not be arranged right)
@MLE_online ! your powering the arduino from the throttle supply? oh, I wonder if thats the issue...
I'm going to come up with a crazy circuit you can try or not, but that I think might work.
:]
I don't suspect you will try it, I dont know why I'm driven to solve these puzzles..... oh right, core of personality.. ugh...
@MLE_online ah! miscomm. the inner box is the arduino, I didn't intend to say its + is common!
the outter box is meant as your arduino conditioning circuit.
heh, diagram fail Rue.
@MLE_online hmm, I think you have some CDS cells left over from a project that was light sensitive...
omg wait, is my brain cataloging what other people have too? ....