Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Attempt at cheap homemade version of Harmony
I didn’t now about UBECs, seems like the way to go. The servo is under enough stress as it is without being driven beyond its rating, much as I would like the extra torque. I currently only use the 5V supply for the servo, could put a USB socket on it for phone charging but haven’t. Some very good little modules available for that purpose if I wanted to add it later.

Interestingly with my average speed over the past 450 miles the lipo battery voltage is settling around 11.3V or about 40%. Of course this means more than half the lipos capacity is unused and so is unnecessary extra weight.
- Oran
I swapped all the small package 5 volt voltage regulator on my quadcopter ( Fairchild 7805 or 78M05) to some 99 cents Switching regulator. I don't mind the added weight and they can output 2 amp.  I added an heatsink on one and gave 4 amp @ 70C for educationnal purpose with the kid, well actually more me than the kids. On 12volt they have roughly 80% efficiency going down to 70% on 24 volt. You need to supply only 1 volt above the wanted output.

you can add a diode on the output but you will have a drop of .7volt. Can't recall if they already have one.

This is the product I bought :AKA UBEC

Wish it will be helpful on any circumstance...

Normand is right for the servo don't go above 6 volt. I am still on analog servo, don't know for the digital ones. If they are stated High Voltage servo they can go to 7.4 volt (confimation needed)

Add Capacitor if needed and set the voltage before you connect it to the devices. They are step down LDO switching power supply only.

Used for my 1 meter wingspan plane, it drives two 6 grams servo. No rudder. Blush

[Image: sDrP3tm.jpg]
Avant de le savoir, je l'ignorais...
(antequam sciat ego nescibam)
-  watageek
LM7805 are super stable, but sooooo unefficient! Can't believe they still put them on modern RC stuff... They tend to heat up so much that they end up messing with the servo signal when the chip overheats... For flying stuff, it means a crash! Also, When there is a much larger load on the battery (ie. motors), the 7805 starves current and servos/receiver have issues.
Si ça a déjà été fait, je peux le faire
Si ça n'a jamais été fait, donnez-moi juste le temps de trouver comment !

(09-14-2017, 12:14 AM)Normand_Nadon a écrit : LM7805 are super stable, but sooooo unefficient! Can't believe they still put them on modern RC stuff... They tend to heat up so much that they end up messing with the servo signal when the chip overheats... For flying stuff, it means a crash! Also, When there is a much larger load on the battery (ie. motors), the 7805 starves current and servos/receiver have issues.

Actually they are perfect for a low consumption device where efficiency is not a concern. Super Cheap in a Super small package and self protected for overload and heat... You can even add an big PCB with vias (or a heatsink) to compensate for a bad design . Truly awesome in that aspect.

An oscilloscope can be handy to know the capacitor needed on the LDO output. I put some big low ESR just to be sure because I don't have an oscilloscope and my setup can see some high and low spike since it uses regenerative braking with a high speed brushless.
Avant de le savoir, je l'ignorais...
(antequam sciat ego nescibam)
-  watageek
Hello Oran,

maybe this helps a little for your Bluetooth issue within AppInventor.
To send data is just 'Serial.print(stringOne);'

Best wishes,

- Michael
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 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
Hi Oran,

just noticed that I had a mistake within the attached pictures. Two same ones instead of two different ones. Now it is correct.

About your other progress, that sounds quite interesting. I also use interrupt and currently only one Arduino.

If you look back in this thread in one of my pictured about the app, it looks like you are going for a very similar thing.
Currently I measure speed via a 'Hal-Sensor' that throws interrupts, this value I send to my phone via bluetooth and display it. On the phone I can press some buttons which sends values to the Arduino over the same connection for changing the behaviour.

In case you do not get the bluetooth stuff working, send me you short message over the forum and we can try to schedule a screen sharing session or something else.

Best wishes,

- Michael
Michael I haven’t forgotten the app for displaying Bluetooth data. I’ve been on holiday and working on the next version of circuit board more details below. I did however have another quick look at it and I think sending the values as Serial.print not Serial.println is going to help a lot. AppInventor doesn’t seem to accept a new line as a delimiter. Next is to send the data as a string like you’re doing, I was still getting weird values.

Since I made the automatic shifter I’ve not done any significant changes to the Arduino, power supply and battery arrangement in the saddle bag. As we’ve been discussing in previous posts there are a few thing I wanted to change.  Unfortunately I don’t think I can get everything small enough to fit in the box with the servo, very close though if I wasn’t using two 18650s.

[Image: KyKU6q.jpg]   [Image: NBHhUJ.jpg]

Still need to add the power supply a bridge rectifier for the front hub dynamo. This will be connected with a 2.5mm jack so I can also use a mains charger if needed.
- Oran
I have now made the auto shifter fully automatic and possibly a world first. As far as I know this is the first time BioShift type, cadence varying depending on power, shifting has been used with a CVT. Power meter is now connected  Smile .

The NRF24L01 modules work really well and like I2C if both Arduinos are running the code then data is transferred. No delays and messing around connecting.  

I’ve programmed the shifter to be a torque selector instead of cadence. This alters the relationship between power and cadence. At the moment I’m not using cadence correction, the power data just alters the multiplier and therefore cadence. The worn out hub is really beginning to show with a wide cadence range for a set servo position. A combination of slack in the system, planet axles flopping about in the worn stator slots and the plastic hub interface.

Dispite this the first test ride was a very different experience. Reminded me of when I first uploaded the code to achieve auto shifting. So weird to start applying power and feel that I’m pedalling faster but there isn’t the increase in torque normally required. I think its going to take a bit of fine tuning as I’m finding the cadence changes a little to much but that’s probably due to riding with constant cadence for so long. According to the past data recorded it should be about right. I’m used to knowing my power output from the amount of torque I apply to the pedals. Somewhere in between will probably turn out to be the best.

Example of some data recorded via Bluetooth from the auto shifter. Great to have all the data together for logging. The Bluetooth app allows 7 values to be received they are power, cadence, speed, auto shifter and power meter battery voltage, programmed servo position and power meter zero error. The last one is really useful for checking the power meter as it’s the current stain gauge value minus the zero value calculated during setup.

[Image: Im4Hcp.jpg]
- Oran
Made some improvements to the code so now getting much more accurate shifting especially with the power data. First thing to sort out was the low speed shifting and making it work with the worn hub. There is now such a large region of the shift range that does nothing the hub was getting stuck in a low ratio. I’ve fiddled with the offset and multiples to mostly get rid of this, see graph below. There’s still times when the hub resists up shifting but can’t do much about that as its due to the worn stator slots.
[Image: GjqTCG.jpg]
Next was to get cadence correction working in fully automatic, power meter connected mode. To make this work I had to create two equations that match up. One calculates the multiplier the other the corresponding cadence and both from the power output data. The relationship I’ve chosen between cadence and power is simply linear for the moment, ((Power/18)+60). However the relationship between cadence and multiplier and therefore power and multiplier is a curve. Currently I am calculating this with a section of a sine wave, ((sin(((Power+powerPrev)/2)/-560))*7)+17.

The accuracy is greatly improved as the graphs below show. However something is not quite right about the code as above 500 – 600 watts cadence suddenly jumps up to over 100 rpm. Not easy to do tests at high power outputs as I can’t maintain it for long. Also noticed that cadence isn’t following the straight line and on another graph it only drops to 60 rpm when power is almost 0. Wondering if the change in cadence is simply due to the cadence correction. 

[Image: 9ND100.jpg] [Image: x57rr7.jpg]
Progress is going to slow down on this as I’m having trouble keeping the Welsh weather out of the power meter. Being a prototype its hard to seal everything and the NRF24L01 is mounted externally in just a plastic bag. Got plans to fix that soon with an aerial extension. On top of that at the moment we are getting a bad combination of frosty nights and light rain showers so the roads are constantly wet with salt water. Would be a shame to destroy the power meter prematurely when I could just wait for better weather. Whenever we get some dry weather I’ll be straight out riding as I find fully automatic mode rather addictive.
- Oran

Atteindre :

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