Тёмный

#193 

Ralph S Bacon
Подписаться 54 тыс.
Просмотров 4,3 тыс.
50% 1

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 120   
@bigpickles
@bigpickles 4 года назад
How dare somebody dislike one of Ralphs videos!? Thanks again for another awesome vid. Sounds like you have a cold, mate. Get well :)
@RalphBacon
@RalphBacon 4 года назад
Thanks, Nick 👍 I think it might just be a touch of hayfever, Or the heat!
@willofirony
@willofirony 4 года назад
I am loving this series on the Smart Phone Charger. They get better and better. Now I do have a couple of philosophical (not critical) comments to make. The first is on the use of the word mistake when reporting on the development process for non trivial devices. The layout of your PCB and daughter components looks to be very logical , at least to someone seeing the final PCB. So, it is very easy to imagine that that is precisely how one would design the PCB . That is an illusion and one which the actual designer is wont to fall under too. So, when reviewing the earlier phases of the development to castigate him/herself for not coming up with the finished design in the first phase. So, the earlier phases are perceived as mistakes. Well nobody was born with the knowledge of how the Smart Phone Charger would be laid out. Perhaps a perusal of the Zeus Engineering tables might have come with a better interference fit for through hole components but No amount of research would have come up with the finished layout (and I rather suspect one would be disappointed to discover someone had already invented this particular wheel) . So never view the earlier phases of development as mistakes. They are the result of a very human element of development: at some point a real model of the current level of development has to be made to stop the engineer falling into a permanent loop that is the thought experiment of the device. Once it is made, the engineering mind is free to progress the development. This is illustrated by the inventor of the wheel when one considers his first phase of development which he christened the hexagon. The second comment is about the increase in prices since Covid gripped the world. We have to stop kidding ourselves that even without the virus, prices would have remained as low as we enjoyed but a few months ago. They were entirely artificial. The virus reduced the number of passenger planes crisscrossing the globe. So, now all that free mail has to travel on chartered freight planes. So, chinese exports are no longer carried for free. However, the prices of actual components were artificially low too. Just look at the difference in price between the cost of components that the chinese cannot produce and the costs we see on Bangood or Ali Express. You will find differences that are enormous. Yes, one often has to perform the role of quality control but even if you have to reject 90%, you still got a bargain. When I first was attracted to electronic, in the 1970s, a BC109 (the most popular general purpose NPN transistor at that time) cost (in today's money) over £25 ($31USD). Today, even with the vagaries of Covid, it is £2.15 ($2.70) for two. We have had 10 years of extremely cheap components. We, should be grateful for that and perhaps regret not stocking up when we had the opportunity. Future generations of makers may never see those golden years again.
@RalphBacon
@RalphBacon 4 года назад
I truly appreciate the (previously) low prices from China, Michael, and often stocked up with far more than I needed on the basis that the magic smoke was bound to escape from one or two samples. Even now, by buying more, the shipping cost-per-unit can drop to "just-about-acceptable" levels. I hope we do get free shipping again though. I hear you regarding not considering previous versions mistakes. I try not to, really, it was all just part of the learning process! It can be annoying but to be expected too. Unlike (easy!) coding, replacing hardware does have a monetary and time cost, though.
@willofirony
@willofirony 4 года назад
@@RalphBacon In one sentence, the entire reason why software will always be my first love. That and the fact that you can be a thousand miles from the nearest computer/microcontroller and still create that liller algorithm.
@TheDefpom
@TheDefpom 4 года назад
I suggest a pro micro too, I’ve used both, but the micro offers a USB port for easier connection. I’ve used the 2.4” OLED version in some projects, nice display to use.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
I've had problems with the pro micro and usb due to it starting up as one USB device port under the boot loader and then switching port when code runs. It was causing issue with the serial monitor i was using. but now it's PICKit4 all the way and no more boot loaders to get in my way and a far better way to program / debut the arduinos.
@RalphBacon
@RalphBacon 4 года назад
Pro Micro has a 32U4 chip which enumerates in Windows as a HID (eg keyboard). As @The Embedded Hobbyist says, the constant re-enumerating of ports can drive you (well, me) mad! I find the FTDI or ICSP just as easy as any USB port actually and no bootloader to slow things down.
@mikelopez9893
@mikelopez9893 4 года назад
I have no idea on whether the BanGGood boards have a full implementation of the AT command set, but if they do, there is no need for a RESET pin. Here’s how it works ... The modem can be in one of two modes: command and data. In data mode, you can send a stream of binary data with just one reserved sequence (+++ surrounded by one second of silence before and after) that takes it back to command mode. This is much more robust than using EOT bytes etc. In command mode, you can reset with an ATZ command. In the 1970s, Dennis Hayes introduced his “Smart modem” which made pretty much made all configuration automatic and avoided the need for fiddling with DIP switches for configuration. It was such a good idea that within a few months, other modem manufacturers copied the approach to release “Hayes compatible” modems. The secret was to preface all commands with AT (attention). This allowed auto detection of the number of bits, stop bits, parity and even baud rate. Note you can use AT or at, but not At or aT (upper or lower case, but not mixed case).
@RalphBacon
@RalphBacon 4 года назад
Martyn Currey talks about "full AT command mode" only when a certain pin on the modem chip is kept high, otherwise a subset is used. Because my needs are few (I just set the name, baud rate and possibly a pairing) I've never really explored what can be done with the AT commands. However, your explanation here Mike, I found very interesting as I'm sure others will too.
@OsoPolarClone
@OsoPolarClone 4 года назад
Done Done. I was a civil engineer and project manager that designed bridges for 40 years. We used the same words for our work!
@RalphBacon
@RalphBacon 4 года назад
Thanks for sharing! Maybe my dev manager heard it from elsewhere and used it in his work. It certainly changed the way we worked, as we had no "niggles" left over from our work. It was either Done Done or it wasn't. I've used that in my day-to-day life too, keeps you very focussed on the task in hand.
@flashcorp76
@flashcorp76 Год назад
For us electronicians….there is always something nice to look at on a PCB….👍🏻. I always regret putting my creations in closed up boxes….
@RalphBacon
@RalphBacon Год назад
You and me both!
@michaelstevens630
@michaelstevens630 4 года назад
Your project is looking very professional - I love the coaster idea and agree we need to see the electronics! I would have thought that drilling would burn so interesting. The I2C OLED displays have bought some from the original auction site £2.97 free shipping from Hong Kong about 2 weeks for delivery. They are a perfect small display as you mention.
@RalphBacon
@RalphBacon 4 года назад
Thank you, Michael. Even as I sit it (slowly melting in the heatwave that is our 3-day summer in the UK) I am pleased with it. It took me probably 18 months to get the idea out of my head an onto paper and then build it. Glad I did now! I must order more of those displays too, I think that was my last one.
@alibro7512
@alibro7512 4 года назад
Great video thanks Ralph. I always learn when I watch your videos and usually end up spending money but all worth it. Just as an idea for future videos I've been messing about with mcp2515 adapters recently and would love to see you doing something with them. I'm hoping to convert a car to electric so I need to be able to feed CAN signals back into the ECU to make it think the engine is still there. Interfacing with Android radios is another possible use and I'm sure there are many more. Keep up the good work.
@RalphBacon
@RalphBacon 4 года назад
Glad you like the videos, Ali, and thanks for the ideas. Working with CANbus can be tricky (and not something I've done) but I know others have done so, so we know it is possible. I'll put the idea on my list.
@alibro7512
@alibro7512 4 года назад
@@RalphBacon Hi Ralph Since writing this comment I managed to read the canbus off my car and posted a couple of videos showing how I did it. On a different note how about a video showing how to use an Arduino to build a stable 0 - 5V output controlled by buttons and with a LCD display. I had a go at doing this a while back as I wanted to build a type of cruise control for my ebike by sending the output into the ebike throttle sense wire. It worked but the output on my display was a bit unstable and I forgot about it. It might make a nice 0-5V power supply too.
@Ivor_Nastyboil
@Ivor_Nastyboil 4 года назад
An interesting extension to this would be to include QI charging instead of the USB cable. You could then just place your phone on top of the charger instead of having to plug it in.
@RalphBacon
@RalphBacon 4 года назад
I tried that, Ivor. My phone does not have QI charging built in (and neither do many others, either) but I got an adapter thing to stick onto the phone and it did charge... but *slow* is too fast to describe it. I wanted to upgrade my phone to one with built in (fast) QI but they are not readily available in the medium to low budget range. And I don't think any phone is worth $1000 regardless of who makes it! But if you have a QI phone then plug in that charger into this unit and it will work.
@andymouse
@andymouse 4 года назад
Hi Ralph, great project ! just the final " polish "...gonna get me some of those magnetic cables...cheers.
@RalphBacon
@RalphBacon 4 года назад
Go for it! You can them with data connections or without (eg for uploading photos to your PC) even in circular format I've now found.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
The PICKit4 is great for programming the Arduino's been playing with the ATTiny85, and using the PICKit4 I can access everything in one place, fuse bytes, WireDebug. Using WireDebug is great just one pin on the ATTiny85 to debug/program, running with breakpoints and being able to view register contents etc, is just sooooo much better than trying to do the same with serial coms. no more serial.print just to try and see what the program is doing.
@RalphBacon
@RalphBacon 4 года назад
Hmm. I only have a PICkit 2 & 3 and the Mk 4 is quite expensive. But if it really is that good I owe it to myself to check it out. Thanks for the heads-up.
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
@@RalphBacon I'm a bit sad, i have an Pick start+, ICD2, ICD3, PICKIT2,3, & 4. at some time you just need to be watching two pic's at once.
@kerryburton9619
@kerryburton9619 4 года назад
Thanks to your "Smart Phone Charger" series I put a couple months into developing a similar "laptop battery conditioner" setup for Windows. It utilizes an Arduino Nano (with a 433MHz transmitter) plugged into a USB port. The Nano (as instructed by the associated Win32 program) sends signals to toggle a 433MHz "remote outlet" which the laptop is plugged into. In my case, the Arduino hardware (and software) was the "easier" part ... it was the Win32 application that took most of the 2 months. Of course, part of that was due to the "extras" I included: CH340 driver installation, a "learning mode" for working with an existing outlet (using a 433MHz receiver), menu-driven AVRDUDE updating of downloaded firmware updates (if I ever come up with any), etc. I keep trying to get myself to document all of this on my blog, but no luck so far... :^(
@RalphBacon
@RalphBacon 4 года назад
Wow! I'm glad I inspired you to build this, Kerry, but my commiserations on the work it must have entailed. A good place to document this is in GitHub. Once you have "mastered" their markdown language it is a nice system. And you can dump any number of related files there too.
@kerryburton9619
@kerryburton9619 4 года назад
@@RalphBacon I took your advice, and even figured out how to "do" images in Markdown. See the result at github.com/KerryJB/ChargeOn Thanks Ralph!
@RalphBacon
@RalphBacon 4 года назад
Excellent stuff, Kerry, very nice to read and great pics too. And you can always create a quick summary on your web site with links to it.
@boblewis5558
@boblewis5558 3 года назад
Hi Ralph. One key correction re: the "Fast Charging" cables. "Fast Charge" or more correctly USB-PD has had a formal spec since 2012 and it REQUIRES a data feed. The two pin magnetic cables do NOT have data pin connections (as you highlighted) BUT there are proper Fast Charge cables which DO have a data pair magnetic connection and DO work correctly with REAL Fast Chargers like QC3 compliant ones. I have recently been caught out with this myself and after buying a short (1m) four contact "fast charge" magnetic cable, I was impressed. So I ordered some more 2m ones also advertised as Fast Charge but from a different vendor as the first vendor was out of stock. They arrived as just 2 pin versions! These are VERY nice cables BUT completely incompatible with the four contact cable and the adapter plugs I already had, so I had to re-order from another supplier who confirmed theirs were 4 contact ones. This is another case of Chinese manufacturers playing fast and loose (no pun) with standards' definitions and our advertising rules. A Standard, non magnetic USB cable can provide the exact same charging current as THESE cables AND CAN work properly with Fast Chargers whereas these cannot. So, aside from the magnetic connection which works well for standard charging they are completely UNABLE to provide Fast Charging! The Chinese seem to think that being able to supply up to 2.3 A is "fast charging" but ANY standard USB cable can do that ... It is JUST that it charges faster than the standard USB host value of 0.5 Amp. As I'm sure EVERYONE is aware, USB chargers for YEARS have had charging rates well above 0.5A and even cigar lighter socket ones for the car have had 2.1 A and 1.0 A outputs combined in one unit. Proper fast chargers (USB-PD) NEGOTIATE with the device to be charged to determine BOTH the maximum voltage AND current that EACH can handle/provide. WITHOUT data comms this CANNOT happen and ALL you will get is a default USB voltage of 5v and a default maximum current which MAY be limited to as little as 1A (5W) for safety, when the "fast charger" will probably be one that can deliver different voltages (up to 20v and up to 40 watt (Huawei @10v), (15W Samsung) or even 100 watt under full USB-PD rules. Anyone buying one of these 2 pin connections will NEVER get the full output power they think they are supposed to and be left scratching their heads! The usage to which you've put the cable is perfect for the requirements of an Arduino, and with the right supply can handle 2.3A without problem."Faster" charge than a PC USB socket? Yes! But "Fast Charge" it most definitely is not! Caveat Emptor!
@RalphBacon
@RalphBacon 3 года назад
That's a lot of very useful information, Bob. I'm glad someone understand it all. I did quite a few experiments with my Huawei phone and have come to the conclusion it does not have "fast charge" of any kind. But for this project, that's fine, as it is being charged up most of the day (up to a predetermined %) before automatically stopping. And I think for this project, a slow(er) charge is beneficial. The maximum charge I get is about 1.2A when the battery is lower than 60%, but just a few hundred milliamps when it's above 70%. It seems to be self regulating in that respect. The phone even has a settings option to treat 80% charge as 100% charge (confusing, I know) so I guess what I am doing it beneficial to the battery life. I wonder how EV batteries are going to cope with being fast charged for a couple of years, every day?
@boblewis5558
@boblewis5558 3 года назад
@@RalphBacon yes, I really like your design and the thinking behind that charger. Like I said, I have a few of those twin connection magnetic cables which I gave to my wife for her phone, Kindle and tablet and they are really good and work well. But I have a quick charger and couldn't figure out why it charged more slowly on the magnetic cable than a standard USB cable. Checked with my USB power tester and of course it confirmed the max current was lower. I'd hardly say I understand it ALL, but I had to do a good bit of research on it.Considering it's been a (useful) standard since 2012 I'm surprised the maker space hasn't tried to do more with it - partly, I suspect, due to the complexities of implementing BOTH ends of the control protocol and hardware. Anyone who wants a really nice, magnetic connection won't find them lacking EXCEPT if, like I did, they buy one to do proper fast charge they'll end up disappointed, and it CERTAINLY won't be able to charge a laptop (some now have high power USBPD) with only 5 to 10 watts of power at 5 volts! Love your videos, keep up the good work. Tschuß.
@jjab99
@jjab99 4 года назад
SPP = Simple People Purchase!! LOL Stay Safe and Have Fun, Joe
@RalphBacon
@RalphBacon 4 года назад
Ah, that must be it then Joe! SPP! Well, I'm simple so it fits!
@jjab99
@jjab99 4 года назад
@@RalphBacon If you are simple, what does that say about the rest of us? LOL Have a great weekend.
@johncook5872
@johncook5872 4 года назад
No Pink coaster? Big Clive will be seeing you.
@RalphBacon
@RalphBacon 4 года назад
Optional, John. Every colour under the sun on that web site so if pink is your colour of choice... This is an inclusive site.
@lessthanwords
@lessthanwords 4 года назад
Did you explain the logic for your circuit in detail anywhere? I've been looking around, but can't find it. Also, do you fulfill the USB charging specification? IIUC, your device would be considered a DCP ("Decicated Charging Port"). I ask because I've been wondering how to shut off the charging current properly; if you just cut the voltage, I think you'd violate the spec ("A DCP shall not shut down if the load current is less than IDEV_CHG [1.5A] and the load voltage is greater than VDCP_SHTDOWN. [2.0V]")
@RalphBacon
@RalphBacon 4 года назад
Well, before we start quoting specs, what do you do if you're charging your phone but then want to go out? You just unplug it. Effectively that's what I do here. And then plug it back in when the battery voltage has dropped to the user-specified percentage. No different to you doing it manually, IMHO. I wonder what those specs you quote are trying to achieve? Perhaps it is to avoid a charger shutting down when charging a device that requires a small current?
@lessthanwords
@lessthanwords 4 года назад
@@RalphBacon Yeah I also wondered why that is in the spec. I read it because I wondered what to do with the D+/D- lines (ie if I could just wire them through). Those are used for charger attachment detection; if those are also disconnected, that would indeed mean it's as if unplugging the charger. I still can't figure out whether what might be the problem to just shut down the V+; maybe there are devices that rely on the current being there and getting shut down entirely because they disconnect from their batteries if it's not.
@RalphBacon
@RalphBacon 3 года назад
I haven't connected my D+ or D- lines (I tried it both ways, made no difference). Some _fast chargers_ are known to read the voltage level, via D+/- (so it can negotiate the highest charging voltage the device can stand) but I decided a _standard_ charger was sufficient. Works like a charm.
@Mr.Leeroy
@Mr.Leeroy 3 года назад
@@lessthanwords charger current negotiation is there to not overload the charger in case it is not suitable for some devices. If your 5v supply is only 1A capable and you plug a hungry tablet that wants 2.4A, guess what is not gonna feel good, your charger. Specs for USB power are a mess. So, negotiation via data lines is a homework for each case if your supply capabilities are limited, otherwise charge controller and LiPo protection circuitry in your phone will handle themselves just fine. Though, there is value in force limiting charge current if you are after battery longevity and automating storage charge as this project does.
@boblewis5558
@boblewis5558 3 года назад
@@Mr.Leeroy you are absolutely right, but this applies MAINLY to cheap chargers with no form of limiting at all. Even MOST cheap wall warts have a basic load limit - the saturation of the ferrite transformer in an SMPSU, short circuit/overload protection from a standard nd ubiquitous smpsu control chip or the automatic and inherent load regulation of a typical small iron cored, low power 2.5 - 3 watt transformer, many (most?) of which have an embedded fuse within the primary winding which is both sensitive to overload current and to temperature. These are reasons MOST suppliers emphasise in their manuals to ONLY use their supplied or approved charger. [Edit] I also meant to say that data lines are only REQUIRED by USB-PD compliant and capable Fast Chargers (if there are no data lines they CANNOT fast charge). In SOME proprietary chargers they can be used SOLELY to detect connection of a charger which is entirely unnecessary (presence or absence of power tells you that) unless for proprietary (and now illegal in Europe) protection.
@PIXscotland
@PIXscotland 4 года назад
Be careful with those magnetic cables. I had mine offset a bit twice. The first time it shorted out and the power supply wasn't happy. Not a huge issue. The second time if managed to stick on with the wrong polarity and killed the attached device and power supply. I've given up on them and cut the ends off for projects.
@RalphBacon
@RalphBacon 4 года назад
I shall be very careful. They do tend to stick to anything and everything ferrous. I checked with a very straight ruler to make sure the central pin was slightly sunken so a short should not happen. Famous last words.
@MrBobWareham
@MrBobWareham 4 года назад
Ralph, it is not good practice to lay track across the board at forty-five degrees and it looks bad sorry to be picky all the best Bob and do you have a part number for the costers it looks very good
@RalphBacon
@RalphBacon 4 года назад
Not good practice, hey Bob? I've lots of "professionally made" PCBs that do this. No, they are not all my designs!!! Is this for real (apart from the aesthetics what's the problem?)
@boblewis5558
@boblewis5558 3 года назад
WRONG! Read ANY professional text on board layout and you will find that 45° transitions are de-facto industry recommendations. Never make 90° transitions they can cause all sorts of problems. Changes of direction should ALWAYS be done using two 45 degree turns. Don't know where you got that idea but they are OH so wrong! Even analogue boards follow these rules. LONG gone are the days of curved tracks that were very much the norm back in the early 70's when using Chartpak tapes and dots on a 4x sheet to be photographically reduced and firms had reprographic departments JUST to do that. Or, as in my case, just two engineers designing layouts, doing our own negatives, prototypes, drilling, populating and testing boards! MUCH has changed since then. Maybe you need a catch up.
@markgreco1962
@markgreco1962 4 года назад
Ralph, thanks! Sorry for the late post. Keep it up.
@RalphBacon
@RalphBacon 4 года назад
No worries! Nice to hear from you Mark.
@fredflintstone1
@fredflintstone1 4 года назад
Great interesting video, I wanted some coasters for my beer:-) Glad to see you do not seem to need your glasses now, and today 26/06/2020 is nearly as hot as yesterday Phew
@RalphBacon
@RalphBacon 4 года назад
😁 Hot indeed! But tomorrow back to "normal UK summer" weather, rain and only 20°C. Glad you liked the video, Fred.
@fredflintstone1
@fredflintstone1 4 года назад
@@RalphBacon Not here Ralph still 27*C at 23:38 :-( and yes I always like your videos
@ricardogava1604
@ricardogava1604 4 года назад
Hey Ralph, do you know Pinguino? Its a PIC with Arduino format and with a simple IDE.
@RalphBacon
@RalphBacon 4 года назад
I've only seen pictures of one (looks just like an Arduino!). Any good? What toolchain does it use?
@ricardogava1604
@ricardogava1604 4 года назад
@@RalphBacon I didn't tried it yet. There is a website with all informations: pinguino.cc
@ricardogava1604
@ricardogava1604 4 года назад
@@RalphBacon here in Brazil I found a DIP version to sell (aprox. 16U$). You can build a bare bones too. Found this site explaining: www.dimensaobynet.com.br/mic/?p=1629 Unfotunetly is in portuguese. If you have any difficult to understand, just ask me.
@iandawkins2182
@iandawkins2182 4 года назад
Great video as always and perhaps have a duvet day to make up for the early start ;-)). I have been buying components from eBay recently from traders that ship via Free Economy SpeedPAK from China and have been getting things in ten to fourteen days which is incredible. If they ship via China post it as you said many weeks at best.
@RalphBacon
@RalphBacon 4 года назад
Sounds great! I have seen that shipping option on eBay. I will investigate more. Thanks for posting, Ian.
@noweare1
@noweare1 4 года назад
I have always said software is easier than hardware. And we are usually working with modules so it kind of finished hardware. Imagine designing custom circuitry.
@RalphBacon
@RalphBacon 4 года назад
Very true! And it just takes so long to put everything together!
@Chriva
@Chriva 4 года назад
I've always found your code very tidy. Guess I finally know why :)
@RalphBacon
@RalphBacon 4 года назад
I had to read your comment several times, Christian, to realise that you now know I am a programmer by trade! Well, that's why I love Arduinos: code and electronics (and I'm not an electronics engineer just a hobbyist) all in the one package. And now PCB design too! It just keeps on giving.
@UReasonIt
@UReasonIt 4 года назад
MPLAB8 will run under Wine on Linux if Pickit2 use is needed. There is also the picprog utility under Linux as well along with some pic support with sdcc.
@RalphBacon
@RalphBacon 4 года назад
Great information. I've got both my PICkit 2 and PICkit 3 running under Windows 10 now. The GUI also has the ability to watch a folder for file changes and then upload the changed hex file (after a new compilation, for example). Works well.
@lezbriddon
@lezbriddon 4 года назад
i hate unidirectional current sensors... ''for a few dollars more'' - ok when only a charger uni is fine.. but... spp Simple P-something Protocol. friday is so hot its a fryday, dont hold my beer, i need it
@RalphBacon
@RalphBacon 4 года назад
I thought you had MY beer, Lez, where is it... oh, I've already drunk it. This INA219 charger is on my list of favourite components.
@SpeccyMan
@SpeccyMan 4 года назад
My solution for Pickits 2 & 3 is quite simple. I keep my main dev. laptop running Windows 7 cos I put the L in Luddite! Actually, I also keep my desktop studio PC on 7 as well since I have so much licensed music-making (my other passion) software on it I just know 10 would screw it right up. Not all change is progress or maybe I'm just getting old.......
@RalphBacon
@RalphBacon 4 года назад
I think you have been bitten before and are now shy. With good reason. My phone (yes, that one) updated itself today with the new, improved Huawei "skin" and DELETED every single one of my custom grouped app folders. Took me over an hour to get them back. So, stay with Win 7, I fully understand. Or use Oracle Virtual Box and build a Win 10 virtual machine on your Win 7 box just to play with (the reverse of what I have).
@Mr.Leeroy
@Mr.Leeroy 4 года назад
The problem I see with your project is that while it tries to charge phone more delicately it skips Android battery calibration process by being only trickle charged. From what I gathered this calibration is only possible during full discharge - charge cycle. Avoiding this calibration for a long time makes your phone battery percentage reading inaccurate and thus your app may end up charging during wrong actual percentage. It still is a great effort and academic exercise.
@RalphBacon
@RalphBacon 4 года назад
Trickle charging, Leeroy? Where did you get that idea? The phone is allowed to charge normally to the level set by the user (eg 90%) then charging is turned off until the battery naturally runs down to the lower level set by the user (eg 80%). I know several users who do this in real life anyway. If what you say is true (I'm skeptical, sounds like one of these anecdotal truisms) then just allow the phone to charge without loading the phone app. 100% charged and it will stay there. The very thing I'm trying to avoid! I've run mine this way for months and it is still working just as expected. Still accurately tells me the battery percentage.
@Mr.Leeroy
@Mr.Leeroy 4 года назад
@@RalphBacon Ok, when I said trickle charge I meant storage charge. They simply call it trickle charge in UPS applications. Here, take a look at Maxim's paper: www.maximintegrated.com/en/design/technical-documents/app-notes/3/3958.html Specifiacally "Accurately Measuring Charge Level" section. Android phones implement multiple methods for this. They both read the voltage and measure real capacity of aging battery to approximate it's residual charge. When Android displays % value it does not tells you the percentage of charge it thinks battery has left, but rather gives an approximation that is heavily sampled and biased to current load and current consumption of it's hardware. All to get rid of fluctuations and "improve user experience" BS. What happens when you constantly charge your battery to a certain percentage, phone looses this ability to measure real capacity as there are no deep discharges. This lead to a couple of side effects. Firstly, your phone algorithms of "coulomb counting" now work against of accuracy of the system. Chemistry of the battery produces energy losses that you can not account for even if you measure all the mAh input and output. Secondly, your phone now relies only on pure voltage charge measuring method to feed those averaging algorithms, which in turn is highly dependent on factors mention in the paper.
@RalphBacon
@RalphBacon 4 года назад
I wonder how many users of mobile phones know about this? They either plug them in all night (I guess that gives Android the 100% starting point) or just plug them in willy-nilly to avoid the dreaded 3BR (3% battery remaining) syndrome. Luckily, the phone app is occasionally zapped by Android so it does get charged to 100% now and again. That probably saves me from getting a 75% battery remaining when it is in fact fully charged (or whatever Android does). Sounds a crazy way of doing it to me! I shall read that paper over a cup of coffee later, thanks for the link.
@Mr.Leeroy
@Mr.Leeroy 4 года назад
@@RalphBacon Dead battery is a great motivator to upgrade phone, so there won't be a lot effort in prolonging its lifetime. And the fact that people don't know how it works under the hood makes it possible for developers to ignore the issue.
@renzauceval
@renzauceval 9 месяцев назад
hey, any chance I can get the source code for the android app? I would like to modify the app to include temperature control and other things for school :)
@RalphBacon
@RalphBacon 9 месяцев назад
The code files for both Arduino and Android are in my GitHub: github.com/RalphBacon/193-Smart-Phone-Charger
@renzauceval
@renzauceval 9 месяцев назад
@@RalphBacon holy cow! I didn't expect you to reply the fast. I looked for the apk source code in that link but I didn't see it, only apk files.
@RalphBacon
@RalphBacon 9 месяцев назад
I used Kodular Creator to create the .apk file. This uses "building blocks" to create the code. If you familiar with it (or want to be) I can share the .aia (project) and .ais (screen) but if you have never used it then it would be a mountain to climb!
@renzauceval
@renzauceval 9 месяцев назад
Yes please! I've looked into it and this looks like something I can learn from. :)
@renzauceval
@renzauceval 8 месяцев назад
@@RalphBacon .
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
thought I'd just add that all the big guys in distribution have put back order handling charges, so now RS as £5 +vat to process any order under £30. Farnell have got a £4? charge. postbags are going to get a bit limited until the cost of getting the items drops back to pre-covid time. We've had the little bugger slip in to the house without us knowing, wife has tested positive for anti-bodies. so a little core throat she had a few months ago must have been it?
@RalphBacon
@RalphBacon 4 года назад
Luckily (for me) business accounts still don't have a surcharge on RS so guess who I use? Even though the cost of components is quite high (compared to Asian markets) I'm hoping that I won't get fakes, they are up to the required UK/EU standard and that I don't have to buy too many packs of 5/10/20 when I just want one or two! Yes, I'm pretty sure that my sickness month in the whole of February (along with the 7-day stay for pneumonia in hospital) was Covid. They tested me for flu (negative) and Asian flu (negative). No test for Covid. But am I immune now, that is the question?
@TheEmbeddedHobbyist
@TheEmbeddedHobbyist 4 года назад
@@RalphBacon I don't personally buy enough to have a business account, so they have lost my small addition to their profit margin. ;)
@johnstephenson2891
@johnstephenson2891 4 года назад
I've been using Radio Spares (RS) since I was 14!!
@FinneyDale
@FinneyDale 4 года назад
Hello, I am a fan of your channel and appreciate the work you put into your videos. However, you and your sponsor are misleading folks on the cost of PCBs. I recently ordered 5 boards including assembly from JLCPCB. Mostly resistors and capacitors with one canbus transceiver. No extended parts! The price was $45 CAD. But when the package arrived there was an additional $22.50 cod charge. This worked out to $13.50 per board. Please stop quoting two dollars and ask your sponsor to be more honest about the true pricing.
@ForwardGuidance
@ForwardGuidance 4 года назад
So 9.87 USD. COD for what? Is that for Canadian Tax? Here in US I've never ever experienced a COD charge and I've received quite a lot from abroad. It seems the 22.50 is a charge that has nothing to do with JLCPCB.
@RalphBacon
@RalphBacon 4 года назад
In the UK, if the parcel from China is over a certain amount (quite low, about £15) there is the risk of customs and excise demanding import duty. Additionally, there will then be VAT (purchase tax) on the whole amount. That's why it is always better to order small amounts from China. I've been stung once by DHL who demanded the fees before they would even pick the PCB parcel from China! But, once out of about 1000 is pretty good going.
@FinneyDale
@FinneyDale 4 года назад
The import invoice from DHL shows $3.34 in sales tax and a processing fee of $12.94 and a transaction fee of $6.04. So the large majority are additional fees added by DHL. These boards are small - 90 x 50 mm. They could easily have been sent by regular mail. I have never paid duties or sales tax on items from AliExpress which are often larger. JLCPCB should be more transparent with these costs. I would likely have purchased the boards in any case.
@SodAlmighty
@SodAlmighty 4 года назад
My experience with JLC has been that they are unscrupulous in the extreme. One time they tried to charge me extra for panellisation despite the fact that - according to their published rules - my design did not incur extra charges. When I pointed this out, the guy went and CHANGED THE PUBLISHED RULES and said well, now it's due a charge, so pay up. I changed the design - from panellised to "mouse bites" - so that it would again *not* incur a charge. The guy rejected it again, saying that I was "clearly trying to circumvent the charge". What a bunch of criminal bastards. And by shilling for them, Ralph is tarring himself with this same unprofessional brush. Not to mention the fact that his videos have *standard* pre-roll ads in ADDITION to his shilling.
@yuvaraj2485
@yuvaraj2485 3 года назад
Where can I download Arduino coding file
@RalphBacon
@RalphBacon 3 года назад
All the code (plus the Android app) is available in my GitHub here: github.com/RalphBacon/193-Smart-Phone-Charger
@UReasonIt
@UReasonIt 4 года назад
I also have free Gerber files for PIC12F and many PIC16F boards. I will be adding another board soon for other 16F/18F chips. github.com/jscottb/pcbs under the Pic board folder. The Gerbers can be uploaded to any of the current PCB houses and are fairly inexpensive to have made.
@RalphBacon
@RalphBacon 4 года назад
Thanks for that information, Scott, I may make use of them in the future.
@David_11111
@David_11111 2 года назад
ANY SCHEMATICS ?
@RalphBacon
@RalphBacon 2 года назад
In the GitHub. Handdrawn and photographed I'm afraid but they are readable. Link to GitHub for this video always in video description.
@kieranj67
@kieranj67 4 года назад
Great video, thank you
@RalphBacon
@RalphBacon 4 года назад
Glad you liked it!
@jyvben1520
@jyvben1520 4 года назад
nearly done and dusted, hope your phone survives
@RalphBacon
@RalphBacon 4 года назад
My phone is doing so well now, no battery stress and always in top-top charge!
@JinQian
@JinQian 4 года назад
just want to mention it, not likely that would help Pro mini is under 2$ on taobao.com with 1$ shipping to China
@RalphBacon
@RalphBacon 4 года назад
Great, I need more Pro Minis, I'll have a look. I really should build my own though.
@Poult100
@Poult100 5 месяцев назад
This was getting like Micky Flanagan's "out out". Look it up if you've never seen it! 😂
@RalphBacon
@RalphBacon 5 месяцев назад
But I was only popping out for a quick phone charger!
@theonlymudgel
@theonlymudgel 4 года назад
So coding is easy hey! Hmm?
@RalphBacon
@RalphBacon 4 года назад
I just KNEW you would comment about that, Mike! Hence my feeble attempt to backtrack later in the video. To no avail, obviously. 😁 It's _relatively_ easy (for me) when compared to designing circuits, soldering them all together, building the thing... I'll just do the coding, so much simpler (if not easier)!
@flemmingchristiansen2462
@flemmingchristiansen2462 4 года назад
So heat forcing you to rise early? you do sound like it's much to early. maybe a bucket of coffee before work?😉 The project do look good. I hope you let us know when the code is DONE-DONE, nice expression. There is always something that can be done,tidy up your registers and variables and a better explanation in the code. Code is easy -you say, Sure depend on your point of view. It would be nice to pick your brain and see how you work. Are you one of those caos programmers who starts and ends with no plan whatsoever? Or how are you planning you programming. What Structograms are you using, Flow chart or Nassi-Shneiderman or something else? Whit your experience, I am sure you do plan ahead, at least in your head. As you are a great programmer (at least a decent one) you might want to teach us do it the right way.
@RalphBacon
@RalphBacon 4 года назад
I certainly needed coffee as I hadn't even had that when filming this! I do code in a structured way. I quickly create a framework for the code (functions / methods) that do nothing except display the fact they were called. They might return a dummy value. I then concentrate on getting the core functionality working. Nothing on screen, just debug (Serial) statements. When the core function is working, everything else is "just typing" as another boss of mine used to call it! And finally I refactor everything, so each function has a single responsibility. You should read my Home Alone code to see what I mean, although I gave up on the full refactoring as it was working "good enough". That's not grammatically correct but it gets the idea across. Also known as the 80/20 rule: The last 20% of coding requires 80% of the time! Anyway, are you going to build this?
@flemmingchristiansen2462
@flemmingchristiansen2462 4 года назад
@@RalphBacon I probably am going to build this if only to understand it better programming wise. Im not sure i need it much, my wife does but she is running a Iphone:🤢
@chrisleech1565
@chrisleech1565 4 года назад
INA219 at Aliexpress is ~$1.25
@RalphBacon
@RalphBacon 4 года назад
That's a great price and I love those chips. I hope they are OEM and not some clone at that price!
@chrisleech1565
@chrisleech1565 4 года назад
@@RalphBacon Point taken Ralph, but what if it works well enough? Do you think that Banggood is selling the real thing? :) For instance that FTDI dongle you have there I can guarantee is a knock off. I have personal experience with them :-) All you have to do is try to connect with the proprietary software FTDI_Prog. It will do "just about" everything excepting a few tweaks.
@pintokitkat
@pintokitkat 4 года назад
Coding is never done or even done done. It's abandoned.
@RalphBacon
@RalphBacon 4 года назад
Oh, Andy, that is so cynical! 😛
@Lisas4us
@Lisas4us 4 года назад
It certainly lacks complexity.
@RalphBacon
@RalphBacon 4 года назад
KISS they say, and I think they were thinking of me when they said it.
Далее
Silent Hill 2 - Мульт Обзор
07:26
Просмотров 423 тыс.
#171 External Battery Monitor from your Arduino
29:32
#265 Me & My 3D Printer - Just a quick chat!
23:42
Просмотров 7 тыс.