Progress and Details on the Sun Trip Databox and Solar CA code

Aller en bas

Progress and Details on the Sun Trip Databox and Solar CA code

Message par Justin Lemire-Elmore le 2018-02-25, 23:46

Hey there, I'm starting this thread to share with you details on the logging box that we're contributing to the SunTrip event so that you can know what this will be expected to do, and potentially provide some feedback as well.

At it's core, the Databox is made up of a V3 Cycle Analyst and our GPS Analogger products, which together can fulfill the main objectives for the Sun Trip organizers which was to have something that would record and log all of the solar energy usage and output power for each team along with their GPS position.  These two devices are put together into a single enclosure box, and out of the box are just two wires. One goes to a normal CA shunt resistor for measuring the discharge current out of the battery pack. The 2nd goes to a hall effect current sensor which measures the solar charging current (after the MPPT).



Once put together, the entire device fits into a fairly small enclosure box, you can get a sense of the size here:



There are two waterproof buttons built into the box as well. These have the same function as buttons on a normal Cycle Analyst, allowing you to browse through different screens in order to see different information and accumulated statistics so far.  Although a screen was not part of the requirement for the Sun Trip goals, since the CA device already has it onboard we figured we could find ways to make it quite useful.

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Screen Display Functions and General Purpose Software

Message par Justin Lemire-Elmore le 2018-02-26, 00:33

In the normal Cycle Analogger product, the information from the GPS module only goes directly to the memory card, it does end up getting transmitted back to the Cycle Analyst.  In this databox product, we decided it would be worth looking at writing custom firmware for the Cycle Analyst so that the GPS module is communicating data to the CA device instead of to the Analogger device. This would have several advantages

  • The Databox could actively display GPS information on the LCD screen, not just electrical/solar stats
  • The CA would be able to use GPS speed in order to have an independent readout of distance traveled without needing a speedometer sensor
  • The GPS and Current data would always be perfectly synchronized and part of the same log file, instead of having separate GPS files and CA log files, which will facilitate analysis
  • The total file size for logging would be much less, since only the critical GPS parameters like Long, Lat, Elevation would be saved to file, and
  • It would mean we could easily port this code to the normal CA firmware to allow a GPS upgrade option for regular CA users!


We ran into several glitches sorting out the reliable data transfer from the GPS module directly to the CA3, but have that all sorted out now. So in addition to the CA knowing the amps, volts and all of that, it is also aware of the elevation, latitude and longitude, current direction of travel, GPS speed, and the exact date and time.  

For sensing the solar charging current, we have replaced the Analog Aux input function to instead be the Solar Amps. This is set much like the torque sensor signal, there will be an zero amps offset (typically 2.5V for hall style sensors) and then a gain setting for the current sensor in Amps / Volt. For the suntrip sensors we'll be using the ACS712 which has a 10A/V scaling and will allow for charge current measurements up to 20 amps.

Now here is where the fun bit fits in, how do we fit all of this on the 16 character display screen!?  After a lot of design consideration this is where we are at now.
There are two new screens in the CA display which show just GPS data. In one case the Latitude and Longitude:


and another showing the direction of travel, elevation, and time of day:


Then we have modified the other display screens to present the solar electrical info as well. For instance, the 2nd display screen is changed so that you see simultaneously the battery voltage and discharge amps/watts on the top line, while the 2nd line shows the solar charging amps and charging watts


Similarly, for the display screen that normally shows consumed watt hours and Wh/km, it now alternates to between showing that info and the total solar charge Watt-hours and the Net (battery - solar) watt-hours/km, so you can see if so far in the day you have had a net gain or loss of watt-hours into the battery.


And similarly, the %Regen screen used to alternate between showing the Forwards and Regen amp-hours. There is now a 3rd screen screen added to this showing the accumulate solar amp-hours, and instead of showing %regen here, it shows by what percentage the solar amp-hours has reached the net discharge amp-hours.


So if halfway through the day you have consumed 37 amp-hours, but recovered 2 amp-hours from regen, and the solar panel has input 29.5 amp-hours, then this screen should show
29.5 / (37 - 2 ) = 84.3%.  If you pause for a long lunch and and allow another 8 amp-hours of solar charge into the battery, then it would increase to 37.5 / (37 - 2) = 107%  

Of course over the course of the trip this will need to average out to more or less exactly 100%. Some days higher, some days lower, but unless you are making amp-hours out of thin air it will eventually all up to 100%

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Logged File Details

Message par Justin Lemire-Elmore le 2018-02-26, 00:53

The other important consideration with the logger firmware is the nature and form of the log file that is saved. Our plan right now is to have data logging at 1Hz, very similar to the standard CA3 log with the data in a tab separated ASCII file.  However, the analog aux input voltage will instead be replaced by a solar charge current, the start of line will have an accurate timestamp, and the additional GPS info of latitude, longitude, and elevation will be present as well.

Here is a list of all the fields in contention,


It's on the order of 150 characters per line. That means every minute has about 9kB of data recorded, or a little over 12 MB / 24hrs.  So 1GB of data memory would cover around 3 months of continuous travel, and that's assuming it is left on logging all night as well. This should hopefully be small enough data size that we can manage doing detailed trip analysis.

Since the log file has accurate time stamp for each datapoint, that also means it will be relatively easy to find and synchronize data from the logger with any video footage taken during the trip, and then use a program like Dashware for superimposing gauges and graphs on the video footage showing the solar watts, speed, GPS position, motor power etc.

As well, you'll notice that the log file still has fields for things like human watts, pedal RPM, temperature etc.  Although these functions are not wired up on the standard databox device, there is no reason at all that they couldn't be hooked up for any riders or teams who are interested in that data too.  I'm especially interested to hear and help out with any persons that want to also measure and monitor the human power levels with this device using a torque sensing bottom bracket. Then we would have some data files that include all the relevant info regarding the vehicle propulsion. Motor power, solar charge power, and human pedal power output.  It could be really interesting.

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Michel Bamps le 2018-02-26, 12:22

Nice ! I've read in your presentation that you understand french, so I'll continue in french, faster for me to write.

Si j'ai bien compris, nous n'aurons plus besoin d'un deuxième CA ou d'un Wattmetre pour vérifier notre production. Cela se fera directement sur l'écran du databox.

Je partirai normalement avec un monitoring sanguin en continu pour le diabète. Je ne sais pas encore lequel, forcément je ne sais pas non plus sous quel forme seront stockées ces données. D'autres données seront collectées par ma montre Gps Lezyne. Ce sera très instructif de pouvoir combiner toutes ces données par la suite. Le databox peut-il récolter des données de fréquences de pédalage en BT/ANT+ ?
avatar
Michel Bamps

Messages : 64
Date d'inscription : 13/06/2017
Age : 57
Localisation : Namur

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-02-26, 16:56

Hi,

this is looking good. What I am interested in: When can I get the unit? Or may be the sensors first?
What are the technical datas of the sensors? Which connectors the sensors do have? Wiring diagram? Which mechnical dimensions the sensors have? Which power supply the unit need? What is the power consumption of the unit? Is it possible to have short wiring with high current to the sensors and to the batterie motor?

I do not need the unit for my system. So I can see later which datas are shown in the display.

Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Justin Lemire-Elmore le 2018-02-26, 20:37

Michel Bamps a écrit:
Si j'ai bien compris, nous n'aurons plus besoin d'un deuxième CA ou d'un Wattmetre pour vérifier notre production.  Cela se fera directement sur l'écran du databox.

Hi Michel, this is effectively true. This databox will provide a direct monitor of your solar panel output and accumulated solar charge during the day so you don't really need a 2nd wattmeter just on the panels. However, if you want to be able to see the solar output while riding and the databox screen is located somewhere not very convenient to look at, then you may still benefit from a 2nd more visible device.  


Je partirai normalement avec un monitoring sanguin en continu pour le diabète.  Je ne sais pas encore lequel, forcément je ne sais pas non plus sous quel forme seront stockées ces données.  D'autres données seront collectées par ma montre Gps Lezyne.  Ce sera très instructif de pouvoir combiner toutes ces données par la suite.  Le databox peut-il récolter des données de fréquences de pédalage en BT/ANT+ ?

Unfortunately there isn't any means of adding any wireless collected data to the log file. That would be nice I agree, but neither the CA nor the Analogger chips have bluetooth or ANT+ functionality. All of the GPS data that is on your watch is being saved independantly with the databox's GPS module so that information is there already, but if you have a cadence sensor on your bike that is ANT+ connected to your watch or bike computer, then there is no way to get this info into the log.  However, it is very straightforward to add an additional cadence or PAS sensor to the bike which plugs into the databox if you did want to log the cadence information too, and we can provide the pickup sensor for this.  
For logging any kind of heartrate or blood sugar monitors or similar, that would be the same situation. Unless they offer a voltage output signal that can be hardwired to the box there won't be any way to log it.

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-02-27, 07:06

Hi Justin,

I am doing the wiring of my solar system right now. I need to get the information which and where with which connection I need to input your senors and the main unit. This is important because otherwise I need to reinstall all issues and I do not know which space I need. If no hardware is available I need the drawings of each part plus wiring diagram to reserve the space and connection in my system.

We are very close to the race and I need some test kilometers...

Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Justin Lemire-Elmore le 2018-02-27, 07:47

schneller66 a écrit:Hi,
What are the technical datas of the sensors?

Hi Jergen, both of the sensors will look exactly like this here:


The one for sensing the discharge current on the battery pack uses a precision 1.00 mOhm shunt resistor and can work with 50 amps continuous and 100 amps peak. The one for sensing the solar charge current is the hall effect current sensor and is good for measuring up to 20 amps. Unless there's a spectacular solar explosion I don't think anyone's panels will be putting in more than 20 amps of charge current to the pack.

There is about 9cm of wire coming out either side of the Grommet. We will supply that to the Sun Trip people as unterminated bare wires. My understanding is that they will be crimping anderson connectors on all of them, which is a very versatile plug type, but this is not really my domain or part of what we are building. I am sure you could remove the andersons and solder on XT60 or XT90 plugs for your own setup, and then reinstall andersons after the trip before you return it and no one would really care.

Which connectors the sensors do have? Wiring diagram? Which mechnical dimensions the sensors have? Which power supply the unit need? What is the power consumption of the unit? Is it possible to have short wiring with high current to the sensors and to the batterie motor?]

The dimension of the sensor shell is 42 x 24 x 12mm. The length of the signal cable from the Databox to the Sensor is totally not defined yet, that's partly why I'm posting here to get some feedback. My understanding is that the tentative plan was for this to be not too long of a cable, like 50-100cm, since the plugs and databox will generally all be located close to the battery itself. But we'll make these cables to whatever length is deemed most appropriate.

The Databox is powered from the connection to the battery discharge port at the 1mOhm shunt, and it will be turned off and on whenever the main battery is turned off and on. Total power consumption of the databox with the hall effect current sensor should be about 15mA - 18mA. It's not much during the course of the day, but you may want to shut it off overnight since the quiescent drain could accumulate to like 0.2 Ah while you are sleeping.

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Guillaume Devot le 2018-02-27, 10:30

juste une petite précision , la présence de la databox sur les vélo ( qui reste en pret  !)  ne remplace pas les deux outils de mesure obligatoire cités dans le reglement technique .

just a small precision, the presence of the databox on the bike (which is on loan!) does not replace the two mandatory measurement tools mentioned in the technical regulation.

_________________
Guillaume (sun trip team )
avatar
Guillaume Devot

Messages : 317
Date d'inscription : 30/11/2012

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Pat l'écolo le 2018-02-27, 14:09

Bonjour Guillaume et le staff,
Si la Databox, nous simplifie le travail de relevé, qu'elle est l'interët d'avoir 2 wattmètres un cycle analyse ou autres supplémentaires?

If the Databox, makes easier the work of reporting, it is interest to have 2 wattmeters a cycle analysis or other additional?

Patrice
avatar
Pat l'écolo

Messages : 67
Date d'inscription : 01/07/2017
Age : 51
Localisation : Neuville-Saint-Amand 02100 France

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Guillaume Devot le 2018-02-27, 14:27

pour pour plusieurs raisons  :

* la databox ne serra installé que quelques heure avant le départ , il est donc important que vous compreniez votre systeme electrosolaire avant le depart...
* la data box n'est pas prévu pour être fixé au guidon et les câbles seront d'une longueur raisonnable pour être proche de la batterie
* la databox est en prêt  , vous serais donc bien aveugle si vous ne l'avez pas par la suite ...
* il ;manque sur la databox beaucoup de paramètres comme la gestion controleur  ( temp moteur , puissance  etc  ....)
* ceux aillant deja invertis dans dans des cycle analyst  ou autre wattmetre aimerais ne pas l'avoir fait pour rien ;-)

.

_________________
Guillaume (sun trip team )
avatar
Guillaume Devot

Messages : 317
Date d'inscription : 30/11/2012

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Justin Lemire-Elmore le 2018-02-27, 21:27

Hi Guillaume, OK thanks for clarifying those details! I wasn't sure just how this item fit into the general context of the event rules, and good to know that they will be installed just shortly before departure.

I guess the databox can also be considered as a nice back-up monitoring device too. For a long distance isolated event like this having redundant systems is really important. This way if there is any issue with one of the main watt meters, then the databox will be a handy fallback reference for knowing where things are at.

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Justin Lemire-Elmore le 2018-02-27, 21:30

Justin Lemire-Elmore a écrit:
Since the log file has accurate time stamp for each datapoint, that also means it will be relatively easy to find and synchronize data from the logger with any video footage taken during the trip, and then use a program like Dashware for superimposing gauges and graphs on the video footage showing the solar watts, speed, GPS position, motor power etc.

Just to give an example, here's a video we recently completed where the log data is then displayed as an overlay to the video footage. There are lots of possibilities for using the data this way I think!

Justin Lemire-Elmore

Messages : 9
Date d'inscription : 25/02/2018
Age : 37
Localisation : Vancouver

http://www.ebikes.ca

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-03-01, 07:30

Hi,

thanks very much for the info. For me it would be good to get the 2 sensors with only the wires as connection no connector. I see that they are small and less impedance with 1mohm only. 20 A on the solarside is okay with me. I am getting peak of 12A only. I will consider a total shut down of the system by Mosfet 3mohm to save engergy over night. I will take into consideration fixed wirring less connectors with minus wire for voltage and current so the connection will be current in row and voltage plus parrallel connection for the motor wire after the main batterie and for the sunpower direct at the solar panel input of the MPPT controller.

From my point of view thats all correct?

The cable for the display unit I can make longer if needed. Because of trailer I will have a very long cable for solar sensor of about 3 m from sensor to display/controller unit. For the motor sensor shorter because on bike. So here it would be also good to get naked wire to fix the connection by myself soldering. If we will get connector at the unit and sensors I need to get the second connector part including the sensors and controller unit to solder it by myself.

Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-03-01, 08:07

Hi,

I read right now that we need to have 2 wattmeters in addition. This means 2 shunt in addition. Only that this is clear. My understanding is that double measurement system is overdressed. But if it is needed I will do the system that the first wattmeter is the analysing function of the MPPT controller (daily power harvest of the solarpanel is measured in the controller) and a second hardware wattmeter for the motor consumption daily. Is this okay with you? In this case I will have only 1 shunt in addition.

What I can not agree with that input of Justins databox short before the start. I do a lot of efford to fix my system fast to have enought time for test kilometers. With changes short before the start the system is not possible to test. Minimum I need the sensors long before the start so that I can input these into my system and test it for some distance. Also I need a exact datasheet of the system with all mechanical issues and connectors long before the start to arrange all issues correct in my system to addapt the databox easily later short before start.

Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Thomas Pollet le 2018-03-01, 14:31

Jurgen,
Except the data box, there is nothing to add in addition that  the regulation imposes to you.

"3.4​ ​Measurement​ ​Tools
All vehicles must be equipped with two wattmeters (Cycle Analyst, Battman, hobbyist
wattmeters, etc..) in order to measure daily solar output and power consumption."


Please read it again to be sure of your system.
The bata box will be connected only the day of departure for the reasons that Guillaume gives above.
This data box will be in your trailer near your battery. We will not have to deal with it. It only serves to collect data for analysis after the Sun Trip. The data box will be returned to the organization at the end.
https://drive.google.com/open?id=0B_YKszH05W1zSDk0dkdpVmdITm8

_________________
Thomas (Sun Trip Team)
Suntriper 2015
http://suntrip.thomas-pollet.fr/
avatar
Thomas Pollet

Messages : 272
Date d'inscription : 04/06/2014
Age : 39
Localisation : Lille

http://suntrip.thomas-pollet.fr/

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Guillaume Devot le 2018-03-01, 15:26

to be clear  , all participants must put anderson connections between battery and solar charger (ideally close to battery ), and another between motor and battery  (close to battery too ), it's simple  , after that we will ask you distance of two anderson connector and we will put dadatabox between  ...
if you charge and discharge same battery there is no problem , actually we have just one bike with two separate battery ( one on motor and one charging by solar )

in you case juergen  , where is your battery ?

_________________
Guillaume (sun trip team )
avatar
Guillaume Devot

Messages : 317
Date d'inscription : 30/11/2012

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-03-01, 15:44

Hi,

okay I will have 2 batteries. The system is: Solarpanel, Victron MPPT controller to 1. batterie 7S8P LiMN to stepup converter with constant current to 2. batterie 10S4P(36V) to Bafang Bss01 motor. So I have the 1. wattmeter in the Victron controller which will count the sunpower havest by software. I can read out over bluetooth. My second wattmeter will be simple hobbyist which can count up to 65555 Wh. This I can read daily and is before the motor.

This is my system. Please confirm that it is okay with the rules of suntrip. Solar is 450Wp and the 2 batteries under 1100Wh in addition.

I will add one male/female connector Anderson before the 2. (Main) batterie and one male/female connector Anderson behind the 2. (Main) batterie. The second Anderson connector is in this case before the motor so that all  current also the current direct from the stepup converter is counted. This connectors Anderson will bei 20cm before and 20cm behind the 2. batterie. I will not use the sensors of the databox for any thing. The second batterie is in the back suitcase of my bike/trike. There is space for your databox and sensors. But no chance for fixing by screws or so.Is this okay with you?

If yes I need to get the exact type number of the Anderson connectors so that I can buy 2 male and 2 female ones.

Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Guillaume Devot le 2018-03-01, 16:01

your system is ok with rules  ..

put just connector anderson between your two  batteries ( close to 36v battery ) and one more betwwen 36v battery and motor ....

anderson model is 30a , i will take some for 10/11 march WE


_________________
Guillaume (sun trip team )
avatar
Guillaume Devot

Messages : 317
Date d'inscription : 30/11/2012

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-03-01, 17:06

Thanks I need 2 male/female and will pick it up on march meeting. Price is resonable I think... Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Guillaume Devot le 2018-03-02, 07:14

if there is some people interested , i will take some anderson pack of 5pcs ( 4 for databox + 1 for GPS ) for 9€ ?

_________________
Guillaume (sun trip team )
avatar
Guillaume Devot

Messages : 317
Date d'inscription : 30/11/2012

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par schneller66 le 2018-03-02, 07:31

I am ordering this fix and take it with me on March weekend. Thanks very much. Best regards Juergen

schneller66

Messages : 56
Date d'inscription : 28/01/2018
Localisation : Germany Darmstadt

Revenir en haut Aller en bas

Schéma électrique / Electric data sheet

Message par Lionel Serra le 2018-03-14, 16:16

Bonjour,

Est ce que vous auriez un schéma électrique qui reprend le câblage décrit dans les échanges précédant ?

intégrant les différents éléments batterie, databox, moteur, mppt, wattmètres, et la position des connecteurs anderson à prévoir (power et GPS)

Merci !

Do you have an electric sheet that includes the wiring described in the preceding exchanges?

integrating the different elements : battery, databox, motor, mppt, wattmeters, and the position of anderson connectors (power and GPS)

Thanks !


Lionel

Lionel Serra

Messages : 2
Date d'inscription : 09/03/2018

Revenir en haut Aller en bas

Re: Progress and Details on the Sun Trip Databox and Solar CA code

Message par Contenu sponsorisé


Contenu sponsorisé


Revenir en haut Aller en bas

Revenir en haut


 
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum