map(), constrain() and solar stuff

  Рет қаралды 6,466

Julian Ilett

Julian Ilett

2 жыл бұрын

New User Get $30 User Coupons jlcpcb.com/CYT
Other Users Get SMT Coupons via Contacting JLCPCB Facebook
Arduino functions, solar panels, inverter, smart meter and the case for 3.6kW
Subscribed to my 2nd channel? Watch all my 3 minute videos on Julian's Shorts: / @juliansshorts
Interested in my new garden workshop? Follow the entire build on Julian's Shednanigans:
/ @juliansshednanigans
Join me on Odysee/LBRY: lbry.tv/$/invite/@julian256:d
Octopus Energy referral link: share.octopus.energy/aqua-birch-918
(We each get £50)
#EasyEVSE
#ElectronicsCreators

Пікірлер: 53
@TeslaFactory
@TeslaFactory 2 жыл бұрын
Because I like maths so much, I often try to write these functions myself, always forgetting to check if something exists in the library, which is probably going to be more efficient than what I can wrote 😂😅
@NiHaoMike64
@NiHaoMike64 2 жыл бұрын
Arduino was known for the I/O macros being really slow compared to other microcontrollers, developers were reluctant to fix that since it would break applications that relied on the slow I/O as delays. I wouldn't be surprised is there's plenty of things to improve elsewhere in the library.
@lint2023
@lint2023 2 жыл бұрын
All very interesting. The time passed before I knew it, so I would have watched much longer. Till next time, cheerio.
@donepearce
@donepearce 2 жыл бұрын
Map and Constrain are a couple of seriously useful functions if you are not in too much of a hurry - which presumably you are not as the application is simply to read a pot. I have recently abandoned using pots on arduinos, and pretty much only use rotary encoders. They are much more reliable and barely any more expensive. It also makes limiting the range trivial
@SomeMorganSomewhere
@SomeMorganSomewhere 2 жыл бұрын
What's the spec say about input VOLTAGE to the car? If it'll go down to 110V you could feed the output through a chunky autotransformer (or a less chunky autotransformer if you got creative with some contactors) to step your 230V down to say 110V, that way you could get it down to about 600W.
@ianharvey868
@ianharvey868 2 жыл бұрын
Something to try, charge a power wall battery bank, then use that to charge the car... Once battery bank is empty have a way to transfer to mains voltage... So, when it's less than 6A get it to turn off car and charge battery bank, then when the battery bank is able to supply enough current turn the charger on, if at any point the solar kicks in at higher than minimum then car charger turns on. I big enough power wall to charge the car over night if you're out in the day
@fuba44
@fuba44 2 жыл бұрын
I absolutely love this project, have you considered adding a "ramp" function so the rate of charge can only change a certain amount per second. That way it can't send max/min/max/min oscillating signals to your car.. (idiot proofing the input pot) thank you for sharing this project with us.
@JulianIlett
@JulianIlett 2 жыл бұрын
Yes, that could be useful - particularly around the 1,400W point where car charging would either be on or off.
@kitecattestecke2303
@kitecattestecke2303 2 жыл бұрын
So just a loop that add/derives "watts" until it reaches current pot position :-) if the loop is slow adding it would create an S curve without overshot but never reach exact pot value..maybe 10W increases
@MyProjectBoxChannel
@MyProjectBoxChannel 2 жыл бұрын
wouldn't be cool if you could do direct DC to DC charging from your solar panels to your car. That way you could bypass the inefficiencies of the inverter. If you could somehow trick your car to allowe it access to the DC voltage of the batteries. I don't know how the DC chargers on electric cars work or what protocol it uses.
@RambozoClown
@RambozoClown 2 жыл бұрын
Charge a transfer battery bank then use that to charge your car. Then you can bring in the charge at whatever power you want and also charge the car at whatever level you desire. I see this setup on quite a few people's solar setups both grid-tied and off-grid.
@dogastus
@dogastus 2 жыл бұрын
Should you apply a litttle bit of hysteresis to the ADC output? Otherwise, you might adjust the pot to a position where it jitters between two values.
@FoolishDane
@FoolishDane 2 жыл бұрын
Yeah you could use a smaller battery to charge when your solar panels produce less than ~1400 watts and then you could discharge the small battery every once in a while through an inverter into your car battery. The biggest challenge is making a variable charger for the small battery that follows the excess power from the solar panels and can charge the battery with up to 1400 watts.
@kitecattestecke2303
@kitecattestecke2303 2 жыл бұрын
Well I have seen quite a lot of older inverters..for example Kostal ones from 2012 already had a staggered 10 output contactor stage that could be set by wattage to close or open as kind of a ladder for own usage ...+ 1400W dumb charger for the intermediate power bank would have made this possible some years ago. Question still is do you get the right parts ?
@TheDefpom
@TheDefpom 2 жыл бұрын
The map function is very handy, I’ve used it to convert a monitored li-ion battery voltage to a % full display for display on an LCD
@JulianIlett
@JulianIlett 2 жыл бұрын
That's a perfect use for it. Although it wouldn't work too well on LiFePO4.
@keithw32123
@keithw32123 2 жыл бұрын
17:22 wow! Suspect indeed.
@peter.stimpel
@peter.stimpel 2 жыл бұрын
That looks not just suspicious, that power cable looks like from such a picture out of some countries with all the wires crossing streets in a chaotic way. Interesting.
@ncot_tech
@ncot_tech 2 жыл бұрын
Not being able to charge at less than 6A makes me wonder what those smart solar EVSEs do when the solar output drops. Since they appear to be sold as a way to store your unused solar energy instead of sending it to the grid. But I can't think of a situation where you'd have kilowatts of unused power for long periods. It's England, we have clouds. Also on octopus' Go tariff it costs me about £1.20 a night to shove about 30kWh into my car, so it's not like there's even a lot of money to save.
@JulianIlett
@JulianIlett 2 жыл бұрын
The Zappi has two modes. ECO tracks solar generation and house usage but will pull from the grid to keep the car charging at a minimum of 6A (1.4kW). ECO+ will discontinue charging if (solar power - house power < 1.4kW). But when charging is started and stopped the car's battery contactors will engage and disengage. So a sunny day with hundreds of little fluffy clouds could work the contactors pretty hard in ECO+ mode.
@virmontisfbg
@virmontisfbg 2 жыл бұрын
Evcc at ithub can handle such situations quite well. Its free and you can customize it with thresholds, so that the relays don't turn on and off all the time.
@ncot_tech
@ncot_tech 2 жыл бұрын
@@JulianIlett yeah that'd bother me, feels like one day there'd be angry buzzing as a contactor jams and dies. With 400v going through it.
@FoolishDane
@FoolishDane 2 жыл бұрын
In my opinion the reason that solar panels makes more power when there are scattered clouds in the sky is that they receive sunlight directly from the sun and also sunlight reflected from the clouds. It's not because they are cooler, although temperature have an effect on solar panels, the effects is not that big as some people believe. This is of course just my opinion and I might be wrong, but I also might be right 😉
@JulianIlett
@JulianIlett 2 жыл бұрын
My panels (JAM72S03-380/PR) have a Temperature Coefficient of Pmax(γ_Pmp) of -0.36%/℃. So for a 40℃ temperature rise, they will lose 14.4% power output. That's over 500W lost from the full array due to high temperature.
@ASBO_Rob
@ASBO_Rob 2 жыл бұрын
Idea... Could you replace the variable with a LDR (Light dependant resistor) so that your car charges more when the sun is bright and less when the sun is limited. I recon with a bit of finessing you could save more money when your car is pulling more Amps when the solar is producing more, Thus wasting less of your solar power to the pittance earned from the feed in tariff.
@MrRaineth
@MrRaineth 2 жыл бұрын
I believe he's stated that the long-term plan is to have an ESP32 control it with actual production data read from the inverter. I do like the simplicity of an LDR, though -- I'll bet you could get damn close to the same performance with a little tuning if you mounted the LDR near the panels.
@ReverendFlatus
@ReverendFlatus 2 жыл бұрын
Rotary encoder instead?
@UpLateGeek
@UpLateGeek 2 жыл бұрын
You have to take your own meter readings for them? That's insane! Don't they normally just send someone around to read your meter if you've got a dumb one? That's what they do here, so it would make sense for them to just tell them to go to your place on the way past and read your meter.
@marcusjenkins
@marcusjenkins 2 жыл бұрын
If your EVSE could be linked to various other power hungry devices (immersion heater (PWM via triac), crypto miner), then you could switch those on at less than 1.4kW PV output? Or when the car isn't plugged in or is full. The whole integration of managing PV output within the home according to priority is fascinating.
@JulianIlett
@JulianIlett 2 жыл бұрын
That's pretty much my current thought process :) Interestingly, since I signed up to the Octopus Agile Outgoing SEG tariff, payments for exported energy can be as high as 40p/kWh (it changes every half an hour) so letting electricity flow out to the grid can be more lucrative than crypto mining. There are so many parameters to factor in.
@marcusjenkins
@marcusjenkins Жыл бұрын
@julianilett Scam?
@piconano
@piconano 2 жыл бұрын
If you had used a multi position rotary switch and resistors, instead of a pot, you would know in a glance what your setting is set at. As it stands, you don't know if you've set it to 10% or 20% or...
@JulianIlett
@JulianIlett 2 жыл бұрын
The pot is temporary - it won't be needed in the finished version.
@sirmiro2
@sirmiro2 2 жыл бұрын
Is there any way to sort out specific values so it skips for example "20"? I'm always so curious when I see fuses in the world. 60A sounds extreme. I got 3*16A in my home. Different systems of course, but it's just interesting why different countries uses so different systems.
@JulianIlett
@JulianIlett 2 жыл бұрын
Do you have a 3-phase supply (hence the 3x 16A fuses). I understand 3-phase is quite common in continental Europe.
@sirmiro2
@sirmiro2 2 жыл бұрын
@@JulianIlett Yep. 380V 3phase. Wonderful to have as a 6kW is without problem even at 16A.
@eDoc2020
@eDoc2020 2 жыл бұрын
Here in the US the _minimum_ for new houses is 100 amps. Due to our split phase system that's 24kW even though 120v is the normal voltage. And 200 amps is standard nowadays, even though I don't know what you'd need 48kW for.
@dom1310df
@dom1310df 2 жыл бұрын
SSEN wanted £4k to change our fuse to 100A, which would've entailed a whole new underground supply from the other side of the road.
@marcusjenkins
@marcusjenkins 2 жыл бұрын
If your main house fuse is 60 A, surely you can charge at 32 A (7 kW) if you wanted to? But, yeah, the supply cables, hmm.
@JulianIlett
@JulianIlett 2 жыл бұрын
Yes, after reading a bit about house fuses, it seems they don't blow immediately at their rated current.
@ianhaylock7409
@ianhaylock7409 Жыл бұрын
Yeah, you're charging the car at max current, then the missus puts the kettle on for a cup of tea. Oh oh.......
@Bob_Burton
@Bob_Burton 2 жыл бұрын
HEX representation of number is a great way to help visualise the value of bits in a byte but has very little value for anything else. You might just as well use ordinary decimal numbers for what you are doing. Why do you prefer HEX in this case when all it does is to confuse things ? I noted with some amusement that you calculated the values in decimal and then converted them to HEX to use them in map() and constrain()
@JulianIlett
@JulianIlett 2 жыл бұрын
Hex also helps to explain the maximum values for PWM and A/D conversion. The numbers 255 and 1023 appear pretty arbitrary whereas FF and 3FF are more obviously upper limits.
@ncot_tech
@ncot_tech 2 жыл бұрын
Oh here's a good one... Today I had to renew my car tax for my EV. It cost me £0. What was the point? The DVLA sent me a letter with numbers on it, I put the numbers into their website, they went "ok, you're taxed for 12 months". Is this so they can introduce a tax later on once the majority of cars are electric and they start losing money from car tax?
@JulianIlett
@JulianIlett 2 жыл бұрын
There are rumours that the new 'smart' EVSE legislation paves the way for dual rate electricity usage. The 'smart' EVSE will log how much car charging you've done so that full rate VAT and fuel duty can be charged for electricity that you put into your car. It is only a rumour however ;)
@ncot_tech
@ncot_tech 2 жыл бұрын
@@JulianIlett what's that you say, charge my car with the granny cable that's dumb as rocks? Righto ;-) I'm enjoying this transition period where we figure out how EVs will work in society, it's full of unregulated cheapness. I'm sure once petrol has gone away it'll all become regulated, taxed and thoroughly boring. No plugging in unauthorised EVSEs, smart everything etc. ;-)
@okiiPL
@okiiPL 2 жыл бұрын
Why Hex are you a cyborg or something? XDDD
@JulianIlett
@JulianIlett 2 жыл бұрын
I did a lot of assembly language programming in my youth. I'm pretty fluent in hex :)
@okiiPL
@okiiPL 2 жыл бұрын
@@JulianIlett that's impresive
@TKomoski
@TKomoski 2 жыл бұрын
JI 4 PM
@JulianIlett
@JulianIlett 2 жыл бұрын
No thanks :)
@OffGridAussiePrepper
@OffGridAussiePrepper 2 жыл бұрын
Solar cable is DOUBLE INSULATED, the dc current or voltage will not JUMP out of it, come on Julian u should know better then that, but never play with the ends not terminated into a dc circuit breaker.
Test and Final Assembly - EasyEVSE
19:34
Julian Ilett
Рет қаралды 8 М.
Watts over the Radio
12:47
Julian Ilett
Рет қаралды 7 М.
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 99 МЛН
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 13 МЛН
WHO DO I LOVE MOST?
00:22
dednahype
Рет қаралды 80 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 488 М.
Xiegu X6200 Field TESTED!
9:19
W6IWN SOTA & HAM RADIO
Рет қаралды 270
Tilting solar display, for off grid life
5:23
oFFgriD Life
Рет қаралды 786
Custom Keyboard From Scratch Part 2
17:13
Casual Coders
Рет қаралды 29 М.
Make magnetic fields visible with Goudsmit magnetic viewing film
0:11
Goudsmit Magnetics - Driven by magnetism
Рет қаралды 2,2 М.
New PCBs: Visual Current Limiter - from JLCPCB
18:42
Julian Ilett
Рет қаралды 8 М.
EVSE Vehicle Simulation
17:42
Julian Ilett
Рет қаралды 27 М.
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 1,3 МЛН