I need to stabilize the on/off first (the reed switch has a strange behavior sometime… like sticking close when trying to turn off), i might add a calibration time, but it will be painful at each restart. Hard coding the coefficients in the remote after the sensors are installed should be enough, as the wheel only uses 10 steps and and down out of 1024 values…
The soft ramp is handled by the remote in the modes using the wheel, but not for the trigger, i think i’ll modify the code there on the remote side.
I like to keep the receiver as direct as possible to not mess with the safety: if it looses communication for more than 1 second, it stops the motor…
The big discovery i made this time is the constrain() function… soooo usefull!
The 315Mhz module gives me a 0-255 value, easy to use, and precise enough. You might not have been using the right library. i like the tolerance it gives when you go underwater a bit…
Below are the video of modes 1 and 3.
I use a servo to test the signal coming out of the receiver.
The blue light turning on on the receiver is to say that it’s connected to the remote.
Whoa!! Ok, now I got it, cool! Reed sensor: check the datasheet, max current value. I took two types we yse at work on boat windlasses for chain meter counter device, one did the same as yours, as soon as transmission started, ut struggled to turn off, the other (Hamlin brand, more “brittle” but better quality), still working, switching on an off immediately. It’s rated 500mA at rather high voltage (don’t remember but multiple of 5V I use). I love your ring solution!
That’s great Mat, it’s awesome that you implemented trigger control and an easy to use and safe cruise control. Solid effort!
I think it would be great if we could have a battery voltage displayed on the remote, this shouldn’t be to hard to make work with a small LCD screen.
Or even easier for simplicity, implementing some code into the receiver that turns a bright row of LEDS down as the voltage decreases would be good, as it would be easy to see while riding, and would be easier than a 2 way communication between remote and receiver.
Anyone know of a voltage sensor for arduino that can read 50v?
Yes, that information would be useful, but it would require to switch to Bluetooth instead of the transmitters i’m using. Mine only go one direction, the remote has a transmitter only, and the board only a receiver.
I plan on having the display of the voltage / remaining capacity on the board as it’s not necessarily something you need every few seconds
Hi mat, i tried to download your remote files from fusion360, they look great but it didn’t work. I guess they changed the account rules. If you could upload the files to thinginverse or somewhere, i’d be really grateful!
OK, i did a new account so now it’s working. Had trouble getting the license, probably because my old account was eventually removed due to inactivity .
It’s a clever design, good work! How many iterations before you reached final design?
It seems that the throttle output in this design is 2.5V at resting position? Is this normal for ESC:s or do you translate it in the code?
the way I was using it, the wheel is not directly giving the signal to the ESC,instead, the lever arm it, once you release it sets everything to 0.
The wheel either add or remove from the signal, so to start, you hold the lever and add with the wheel. once you fly, just release the wheel and the speed will be constant.
I did 3 modes in total: either the wheel up adds, either the wheel down adds or the lever controls the speed directly.
but in the end, I used only the 1st mode
Code is not my strong part but i think i understand.
when lever is pressed throttle starts from zero, then the up or down movement is accumulative adding or retracting to the throttle value. So there is a constant cruise control so to say if you don’t touch the wheel?
Could it start to drift if you leave the wheel untouched with lever activated or do you have some deadband value in the code?
it could drift depending on how the sensor is glued…
so once it’s all assembled and running, you’ll have to monitor what it’s doing in the serial monitor and adjust the center. mine was in the middle between 30 and 1000.
it’s pretty basic code to be honest, i didn’t knew arduino when i started it