View All Posts
read
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi

Buckle up folks, this video is a thrilling one! There's everything from unboxing my new ESP32 TV boards that arrived from PCB Way to discovering some hidden issues. We're talking about some pesky problems, surprises, and even a potential catastrophic error that could've led to a disaster. The main dish is the high-speed SD card access over USB - ultimately achieving a whooping transfer rate! But, the journey is a roller-coaster ride, from the project completely failing initially, to some smart hacks and triumphant moments. All the peripherals worked well, from the display to the sound amplifier and even the infrared receiver. Despite the ups and downs, there's a lot to learn and that's what makes this video exciting! Can't wait to share the improvements I have in mind for turning the prototype into the ultimate all-in-one device. But first, let's address the elephant in the room - an ill-placed diode that's a ticking bomb, because you know, safety first!

Related Content
Transcript

[0:03] my new esp32 TV boards have arrived from
[0:06] PCB way there are a couple of problems
[0:08] with the board which we’ll cover next
[0:10] but there’s also a catastrophic error on
[0:12] the board that could have led to some
[0:14] really nasty consequences so quick quiz
[0:17] can you see the problem is it a the
[0:19] moset is the wrong way around B the
[0:22] input capacitor is way too low C the
[0:25] ncp1 167 can’t deliver enough power or D
[0:29] something else that really obvious we’ll
[0:31] come back to this towards the end of the
[0:32] video let me know in the comments if you
[0:34] get it
[0:36] right my goal with this board was to get
[0:39] everything working we’ve got audio
[0:41] output from the max
[0:42] 98537 battery charging with a tp4056 an
[0:46] infrared receiver and the biggest
[0:48] feature of all super high-speed access
[0:50] to the SD card now this is the most
[0:53] exciting thing on the board if it works
[0:55] then we can load files onto our TV
[0:57] without needing to unplug the SD card
[1:00] now it is already possible to access the
[1:01] SD card directly from our PC using the
[1:04] esp32 in mass storage mode but it’s
[1:06] painfully slow I did manage to get it up
[1:09] to 1 Megabyte per second reading and
[1:11] writing but it took a lot of hacking and
[1:13] for me it’s still not fast enough
[1:15] especially if you want to transfer large
[1:17] video files so that’s the big goal
[1:20] high-speed SD card access over USB to
[1:23] achieve this I’ve added an additional IC
[1:26] the USB 2244 in theory this should give
[1:29] us a transfer rate to the SD card of up
[1:31] to 35 mbes per second now this does of
[1:35] course depend on the SD card and how
[1:37] good our USB connection is testing the
[1:39] SD card I’m using connected directly to
[1:41] my PC I get 25 megabytes per second so
[1:44] that’s my target rate if we can get
[1:46] close to that I’m going to call it a
[1:50] win so the big question is does the new
[1:53] PCB actually work do we get the results
[1:56] I’m looking for and initially it was a
[1:59] big fat no the board did absolutely
[2:02] nothing we can’t connect to the esp32
[2:05] and we can’t connect to the SD card what
[2:07] a disappointment we’re completely dead
[2:10] when I made the board I was concerned
[2:12] that the es32 and the USB 2244 would not
[2:15] play nicely together but I was hoping
[2:18] that the es32 would be able to use the
[2:20] USB connection when the USB 2244 was
[2:23] held in reset mode to ensure this I put
[2:26] a pull down resistor on the reset line
[2:28] when it’s in reset mode all the pins are
[2:30] supposed to go into a high impedance
[2:32] State and not interfere with anything
[2:34] else looking at my schematic I can see
[2:36] that I’d Ed gpio 39 to control the reset
[2:39] line as we discovered in our previous
[2:42] video printing pcbs at home this pin
[2:44] behaves weirdly when the esp32 is in
[2:47] download mode both gpio 39 and gpio 40
[2:51] are used for JTAG debugging so you get
[2:54] all sorts of weird output on them my
[2:56] initial suspicion is that this was
[2:58] stopping the USB 224 4 from going into
[3:00] reset and that it was conflicting with
[3:02] the es32 on the USB lines measuring the
[3:06] voltage on the reset pin I got 2.7 volts
[3:09] to me this felt like some kind of clock
[3:11] signal or a data line that is being
[3:13] toggled on and off so I attacked my PCB
[3:16] and chopped through the trace leaving
[3:18] just the pull down resistor the USB 2244
[3:21] should now definitely be in reset mode
[3:24] all the time sadly this did nothing I
[3:27] still couldn’t connect to the ESB 32
[3:30] this completely stumped me so I took the
[3:32] nuclear option and Des soed the USB 2244
[3:35] completely leaving just the ESB 32
[3:38] module and as expected I could now
[3:40] connect to the esp32 without any
[3:43] problems so I tried the opposite I took
[3:46] another board and desol the USB 32
[3:49] plugging this in I now got an SD card
[3:51] appearing on my computer which was great
[3:54] the USB 2244 was working but also not
[3:57] great the USB 2244 should be held in
[4:00] reset mode VI the pull down resistor it
[4:02] should not start up at all measuring the
[4:05] voltage on the reset pin I still got 2.7
[4:08] volts what on Earth is going on there’s
[4:11] nothing in the data sheet but looking at
[4:13] some other similar ic’s I think there is
[4:15] an undocumented pull-up resistor on the
[4:17] reset line giving our measured voltage
[4:20] of 2.7 volts and the 100K pull down
[4:23] resistor this hidden pull-up resistor
[4:25] must be around 20K our 100K pull down
[4:28] resistor is not going to do anything so
[4:31] I took another board thank goodness I
[4:33] ordered five assembled boards and I
[4:35] solded a 1K resistor across the existing
[4:37] pull down resistor and hey Presto the
[4:40] esp32 sprang into life I then tested out
[4:43] switching over from the esp32 to the USB
[4:47] 2244 I changed the two USB pins on the
[4:50] USB 32 to input and enabled the USB 2244
[4:53] by taking gp39 high and amazingly my
[4:57] board transformed into a high-speed SD
[4:59] card my proof of concept works we can
[5:02] share the USB bus between the two chips
[5:04] and switch between them all it took is
[5:07] one bodge resistor but just how fast is
[5:10] our high-speed SD card with the USB 2244
[5:14] enabled we can transfer files at around
[5:16] 21 megabytes per second that’s over 20
[5:20] times faster than using the esp32
[5:22] directly it’s a massive Improvement once
[5:25] more we’re close to what I was able to
[5:27] get when connecting the card to my Mac
[5:29] so I’m happy with this performance it’s
[5:31] an amazing result but what about the
[5:34] rest of the board do all the other
[5:36] peripherals work the first thing I
[5:38] wanted to check was the display on the
[5:40] back of the board I’ve got a footprint
[5:42] for the FBC ribbon cable the display has
[5:44] a completely nonstandard pin pitch of 7
[5:47] the only place that I’ve been able to
[5:48] find a connector with this pitch is on
[5:50] Alibaba and I’m not sure I really need
[5:53] one 100 of them at least not yet so
[5:56] we’re going to have to sold it on I’ve
[5:57] never solded one of these flat cables
[5:59] before but it seemed to work okay I just
[6:01] tinned the pads added plenty of flux and
[6:04] then taped the cable in place with
[6:05] capton tape this technique seemed to
[6:07] work okay I kept the soldier iron on
[6:09] quite a low temperature and just run it
[6:11] over each pad until the soldier flowed
[6:14] with my TV firmware loaded and adjusted
[6:16] for the new pins we get a picture
[6:18] showing up and with a speaker plugged in
[6:20] we get sound coming out the amplifier is
[6:22] all
[6:23] [Music]
[6:25] [Applause]
[6:27] good my new esp32
[6:37] TV come
[6:40] [Music]
[6:42] in once more this proves that the
[6:44] infrared receiver is also working we’ve
[6:47] come quite a long way for our original
[6:49] prototype with our minimal Dev board
[6:51] project so what’s next there are a
[6:54] couple of things that need improving I’m
[6:56] very pleased with the sharing of the SD
[6:58] card between the USB 2244 and the ESP 32
[7:02] this seems to work nicely it is possible
[7:05] to turn off the jtac pins by burning an
[7:07] euse on the es32 and holding gpo3 high
[7:11] but of course to do that we need to be
[7:13] able to connect to the es32 a bit of a
[7:16] chicken and egg situation we could use a
[7:19] different Jeep openin to fix this but
[7:21] sharing the USB connection between the
[7:23] two ICS concerns me it just feels a bit
[7:26] nasty and way too easy to get into a
[7:28] state where we can’t talk to the es32
[7:30] and our board is brooked so I’m thinking
[7:33] of moving to having two USB sockets one
[7:35] for the es32 and one for the USB
[7:39] 2244 with the ribbon cable working I can
[7:42] lose this pin header which gives me a
[7:43] bit more space on the board I could even
[7:46] skip the USB socket for the USB 32 and
[7:49] just have a programming header for it
[7:51] another issue I found is that the module
[7:53] I’m using has 8 megab of PS Ram enabling
[7:56] this caused the board to crash as soon
[7:58] as I tried to use the SD card the
[8:00] problem is if we’re using psram we’re
[8:02] not allowed to use gp35 gp36 or GP 37
[8:08] and of course I used all three of these
[8:09] pins for my SD card connection so I’ll
[8:12] have to shuffle a few things around to
[8:13] avoid these pins and the JTAG pins I’m
[8:17] also taking a look at a much cheaper IC
[8:19] for the SD card controller there’s a GL
[8:21] 823 that is just 40 cents that’s 10
[8:25] times cheaper than the USB 2244 and it
[8:29] doesn’t need a crystal which simplifies
[8:30] the circuit and reduces the bomb nicely
[8:33] the docks for this IC are not great so
[8:35] I’m going to create a test PCB first to
[8:37] see if it actually works now I’m sure
[8:40] you’re asking what’s the big issue you
[8:42] promised us a potentially explosive
[8:44] error well I’m not sure where this ever
[8:46] crept in and it’s a bit of a silly one I
[8:49] got it right in the previous board but
[8:51] somehow this diode got move to the wrong
[8:54] side of this mosfet this power control
[8:56] circuit is designed to switch between
[8:57] the USB power and battery power when the
[9:00] USB is connected the battery should be
[9:02] blocked and when the USB is not
[9:04] connected the battery should be used
[9:06] it’s a very cleever circuit when it’s
[9:08] done properly with the current PCB I’ve
[9:11] connected the USB 5 volts directly to
[9:13] the battery via this diode this is
[9:16] definitely not what you’re supposed to
[9:17] do and it could have ended up in a very
[9:19] nasty situation it’s a good job I didn’t
[9:21] test out the battery charging first
[9:23] before I notice this so I think that’s
[9:26] probably the first thing to fix before I
[9:27] do anything else while I working on that
[9:30] you might enjoy this playlist of videos
[9:32] you can see the journey we took to get
[9:33] to this video and what we might be doing
[9:35] next


HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
Want to keep up to date with the latest posts and videos? Subscribe to the newsletter
Blog Logo

Chris Greening

> Image

atomic14

A collection of slightly mad projects, instructive/educational videos, and generally interesting stuff. Building projects around the Arduino and ESP32 platforms - we'll be exploring AI, Computer Vision, Audio, 3D Printing - it may get a bit eclectic...

View All Posts