Start Hacking The CAN Bus With The ESP32 CanLite Board – Voltlog #370

Welcome to a new Voltlog project video, today I’m gonna be presenting this little guy called ESP32 CanLite. This is a CAN hacking / development board based on an ESP32 and this is the results of my adventures into hacking the CAN network on my vw golf. I have not made any significant progress on the actual task of hacking the can bus other than what’s shown in Voltlog #342 simply because I got very busy with the professional work I do, consulting for various clients, you know just designing and building electronics but nonetheless I found the time to design and refine this board because this is already the second revision.

I Made A 10 Channel Thermocouple Data Logger – Voltlog #368

The idea for this project started when I got the T-962 reflow oven, after running a few tests I discovered that it had some hot-spots which meant some areas inside the oven were hotter than others and this could lead to trouble, you could get melted connectors in some places and cold joints in other places. Now it’s hard to tell how bad the situation is without doing some measurements so I decided to design & build this board which is capable of reading 10 thermocouples and logging the data. This way I could place the thermocouples inside the oven, something like a 3×3 or 4x2x2 matrix and I could get a sense of what’s going on inside the oven.

New Lab, New Voltlog Electronics Workbench | Voltlog #367

The most important part of this lab is obviously the workbench and this is something that I designed myself, I guess I can call this the Voltlog Workbench Design, it’s 2m wide with 80cm deep. The working surface comes out at about 95 cm from the floor. It sits on these adjustable feet but I haven’t even leveled it so far. Thanks to my friends at Welectron.com my working surface is protected with these nice premium ESD Mats. They are 100% and phthalates free, no bad smell, Heat and solder resistant, Chemical resistant, two layer ESD bottom side is conductive, top side is dissipative and they have this nice anti-reflective surface finish which is very comfortable to work on. I went with gray because it works best as a background for video shooting but you can opt for Blue as well. I’ll put a link to these in the description below, I highly recommend Welectron for their services & customer care and I highly recommend these ESD mats they are top quality.

Upcoming Projects Teaser – Voltlog #365

Welcome to a new Voltlog, for today’s video I want to share with you some of the projects I currently have on my workbench, these are projects that still need some work to be done before they can be published but this will give you a glimpse of what to expect in the upcoming weeks on the channel.

I have these 3 projects on my workbench, the first one is a multi channel thermocouple data logger device based on an ESP32. This has 10 channels based on the famous maxim thermocouple interfacing chips and all of those are read by the ESP32 and data can be logged on an SD card. This should help me measure the temperature inside the T962 reflow oven that I reviewed a while ago in a grid to check how the heat is distributed inside the oven. I’m pretty sure there are some hotspots inside the oven and some cold spots, I don’t know if there is anything I can do at mechanical/design level to correct for them but it would sure be nice to be able to know what’s going on inside the oven and with such a board I can just connect 10 of these cheap braided K-type thermocouples from aliexpress and hopefully get some consistent readings but more on this in a future video.

The next one is an FT2232 based interface which I designed with the main purpose of allowing me to interface via JTAG to FPGA boards. The chip itself is capable of other protocols as well but my goal here is like I said to interface to various FPGA boards. I plan to dip my toes into the FPGA world and try to get a blinky up and running on an FPGA board for a start. I have designed the board to include a voltage level translator because the chip is running at 3.3V but whatever you connect this to might be running at 1.8 or 2.5V so there is provision for that and it uses USB Type-C like all of the boards that I’ve designed in the past year.

The third project is an ESP32 based CAN development board that I plan to use in my adventures of hacking the CAN bus on my car. I should be able to install this into my car to intercept, modify or send CAN messages while at the same time having two outputs which I can use to control various stuff with on/off 12V power. It has a dc-dc converter on board to step down the car 12V to 3.3V to power the board and if I remember correctly the chip was chosen to have a wide input voltage range to accommodate for any potential spikes on the 12V rail of the car.

How To Create High Voltage Isolation Slots In Kicad – Voltlog #364

Back when I published the video on the aquarium controller I built, someone asked how are these high voltage isolation slots or cutouts done in Kicad and I thought I’d do a short video to explain how you can design these into your next project but first, let’s talk about their purpose and whether or not you need them.

There is a common confusion between the terms creepage and clearance, myself I’m guilty of sometimes making this confusion but to give you a clear view on this, I found this picture online which shows everything very clear. Spacing between conductive elements through air is clearance while Creepage is spacing between conductive elements over an insulating surface.

By adding these cutouts in the PCB we are only increasing creepage distance, but if you would also like to increase clearance you will need to add some kind of barrier, and this is usually built into the enclosure and it will slide through the slot creating a barrier to prevent any potential high voltage arc to jump over the barrier by increasing the length.

There are also secondary purposes for putting cutouts into your PCB, I have used them in the past to create a thermal barrier or to accommodate various enclosure walls and features but I won’t talk about those today, those applications tend to vary a lot on a case by case basis.

But if you are using them as high voltage isolation you need to be aware of some aspects: first and most important remember to make the slot at least 1mm wide, if possible go with 2mm as this is required by some standards. There is a min width required by the fab house anyway because they are going to use a router bit on a CNC machine to cut that slot into the PCB and this may vary from one board house to another but I’ve seen 0.8mm mentioned by most PCB manufacturers. For example PCBway which is the sponsor of the channel, gives a min value of 0.8mm non plated slot and 0.5mm for plated ones. For isolation purposes you only want non plated ones.

There might also be other limitations on the size of the corner radius, I’ve not hit any of those so far myself but just imagine that router bit going around, it will not be possible to create very small features at your request.

Use These LEDs For Your Next Project – Voltlog #362

Welcome to a new Voltlog, this will be a rather short video where I will be talking about a rather common subject, LEDs. I’m sure everyone uses them in their projects but if you are like me you probably never cared about the efficiency of the LEDs you use for signaling the status of something on your microcontroller board. So what I was doing most of the time was picking the least expensive LED available while still picking a known manufacturer like Kingbright or Lite-on or Osram just to avoid quality issues. And that was my voltage rail indicator LED or my blinky LED for signaling some status. But this ofcourse meant I needed to drive those LEDs with a fairly high current of 15-20mA to get decent brightness out of them and that might be OK for numerous applications but in this video i want to talk about high efficiency LEDs and how your project could be nicer because of them.

ESP32 Aquarium Terrarium Controller – Voltlog #361

This project started when a friend of mine which has a snake terrarium asked for my help to build a system that is capable of regulating temperature and humidity so the snake can live in optimum conditions. I’m not necessarily a snake lover, I would rather stay away from these kinds of creatures but that doesn’t stop me from helping my friend.

I started by figuring out what he uses to control temperature and humidity and it turns out there is some sort of a lamp to provide heat from above, some sort of mains powered stone that heats up and a water fountain, probably one that runs with fog to control the humidity. All of these are mains powered and only need simple on/off control which makes things simple when designing the electronics board.

In terms of digital control I figured it would be nice to have to be able to update the set points and check on the status values wirelessly so I went with an ESP32 modules. This also helps to add an extra layer of protection to keep the user away from the dangerous mains voltages present on the relays. I can have the whole board, enclosed in a plastic box so the user never goes near the mains voltages.

Silabs CP2104 No Activity on RX TX LEDs Bug – Voltlog #359

In Voltlog #357 I talked about a bug affecting the programming of ESP32 modules via Serial Bootloader, basically the issue was caused by an incorrect reset sequence regarding the EN and IO0 signals and I also showed a fix which involved adding a capacitor to delay the EN line.

Well, this week I’m gonna show you another bug which I encountered recently but this time with the CP2104 USB to serial converter chip from Silabs. So recently I designed this little board called VoltLink, it’s basically a usb to serial converter board but one that also integrates the auto-reset circuitry needed for programming Espressif modules like the ESP8266 & ESP32. I also have a 1mm pitch JST-SH connector with a standard pinout that I use in all of my designs and this helps with space savings on small circuit boards.

Well after assembling one of these boards, I connected it to my computer, the new virtual serial port was created and I thought everything was running fine, except it wasn’t. I quickly discovered that the status LEDs were not reacting when there was communication on the serial lines. I don’t know about you but I want my status LEDs to be functional, it helps me get a quick visual understanding of the communication happening on the serial lines. I don’t need anything specific, I just need to know that there is activity and if there is a lot of activity or less activity.

A fatal error occurred: Failed to connect to ESP32 – Voltlog #357

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header. This is an error on which I have spent long hours trying to figure out what’s causing it and how to fix it. If you are struggling with the same error on Windows, stick with me, I’ll show you how to fix it.

For example in my case, the issue manifests itself on a single windows computer out of 4 tested and it doesn’t really matter at which baud rate I’m trying to upload it can be 115K or 900K, it doesn’t matter if you are using Arduino IDE or PlatformIO, I still get the error because it’s not caused by the IDE. And also I’ve experienced this with both FTDI and Silabs chips. Sometimes the behavior can be random, meaning it might work 1 out of 10 tries which can get really frustrating, especially if it happens in the most inappropriate times as these problems tend to happen.

First I tried understanding the issue, this is clearly a problem with how the ESP32 resets, it doesn’t go into the correct bootloader mode for code upload. By looking at this repository which is managed by Espressif we get some info on the expected sequence, and we learn that the ESP32 should have GPIO0 pulled low during reset for it to go into serial bootloader mode. Reset is triggered by pulling the EN or Reset pin low. They don’t give us a clear timing diagram of what this should look like but I’m going to assume the state of GPIO0 is read while EN signal goes back high to release it from reset. So the logic thing was to put a scope on these signals and check it out.

VoltLink™ A Fancy USB Serial Adapter (ESP32 Programmer) – Voltlog #356

Welcome to a new Voltlog, today I’ll be showing you how I created my own usb to serial adapter board and we’ll go through some of the design decisions I had to make and I will explain the reasoning behind making these choices but first let me tell you the background of the story, Personally I’ve always liked having my own usb to serial adapter and here is one that I designed something like 10 years ago maybe more. The layout is not great, my PCB skills were obviously not as good as they are today but nonetheless, I created this adapter as an exercise but also for the important purpose of having a reliable and flexible tool. Reliable because I could control the chip that I’m using. It was a Silabs CP2103 and I was getting it from a well known distributor.

Flexible because I had all the IOs of the chip broen out to 0.1 inch headers which could mean that I had the option to trigger a reset on a particular board or something along those lines. And I’ve also designed other adapters based on FTDI chips and more recently based on the CH340 family of chinese chips. 

So this brings me to today’s project, I designed this new adapter for two reasons: one is the good old reason of reliability, you can’t trust the adapters you’re getting from aliexpress, they’re almost always using fake chips and generally are of lower build quality. I want a reliable CP2104 series chip in here, I want it to be able to sustain high bit rates for fast uploading of firmware images to target boards.