Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
#63
Michael, Thank you for the AppInventor and Arduino code I will give it a try. I've experimented with so many different ways of doing it and not been able to get it to do anything useful with the values received. I'd like to be able to display multiple values on easy to read gauges. Maybe change settings as well be mostly to display data, for example cadence, cadence setting, power, battery %, servo position error.

I’ve now bought a high efficiency UBEC to try out. It has an output of 5 or 6V so gives me the option of giving the servo a bit more torque (3 kg.cm) if needed. High voltage servos are just a little over priced at the moment. I’m planning to completely redesign the whole battery and Arduino arrangement in the near future reducing the voltage to 7.4V, 2 x 18650s. Also bought a genuine Nano to use on this new version to say thank you to Arduino for making this project as success. I’ve used cheap clones so far, just to tempting when they cost a 10th of the price. 

Conveniently I have just realized I can make the code work on a single Arduino. Recently for the power meter I have had to learn a lot more about timers and interrupts. This made me aware that I didn’t need to use a separate timer to monitor each reed switch. All I need is an interrupt set at 1kHz and this runs 2 separate codes one for speed and the other for cadence. 

I tracked down the dodgy cadence measurements to a poor connection of the header pins between the two Arduino’s. That will no longer a problem and the cadence information is now more up to date. Makes a surprisingly big difference to the way it feels to ride, much more responsive. I didn’t realize but sending between the Arduino’s must have been introducing a delay, maybe only one loop, half a second, but that makes all the difference. Should be a little less power hungry now the servo isn’t shifting as much due to random cadence measurements. All together a win win I’m rather pleased about.
- Oran
Répondre


Messages dans ce sujet
RE: Attempt at cheap homemade version of Harmony - par Oran - 2017-10-08, 06:54

Atteindre :


Utilisateur(s) parcourant ce sujet : 4 visiteur(s)