top of page

Search Results

5 items found for ""

  • Designed in a Day: Battery Capacity Tester

    I've been working hard on assembling all the components for my electrotactile haptic feedback project. While I'm waiting for the next stages of that project, I've returned to an idea I've been wanting to explore for a while: a battery capacity tester. Specifically, I want to create a tester for the used "disposable" vape batteries that I've collected. These batteries are actually reusable and can be utilized in various projects or for repairs. The batteries claim to be 550mAh Li-ion batteries with a typical nominal voltage of 3.7V. After a bit of research, I found the standard size for these batteries is 13400. Of course, this battery tester should be capable of testing any Li-ion battery I might want to use. I quickly sketched a simple block diagram outlining the circuit I plan to use. Since I'm already familiar with the voltage-controlled constant current circuit from my electrotactile stimulation project, I thought it would be a valuable feature to include in the battery tester. This circuit allows me to adjust the current drawn during testing, enabling me to assess voltage drop and simulate different loads on each cell. This flexibility is particularly important when testing the capacity of batteries with varying capacities. The industry standard for capacity testing involves discharging the cell at a rate of 1C, which is the current required to fully discharge the cell in 1 hour. When designing the circuit, I had a couple of other features in mind that I thought would be helpful additions. I have decided to add a TP4056 charging board so that the batteries can be both charged and discharged from the same board. To do this and make sure that only charging or discharging can happen at any one time, I added an SPDT slide switch. The battery tester should be compatible with any MCU that supports an ADC and DAC (although these could be substituted for additional dedicated IC’s for better performance). I also wanted to use parts that I had on hand so that I wouldn’t have to wait to receive any more parts and be able to finish the project in a day. My final aim was to use as little outside help as possible to challenge myself and see where my weaker areas are. Datasheets and similar documents were fair game, but I wanted to use the techniques that I had learnt over the last few years. Once I’d drawn the quick sketch, I started looking at the components I had and picked out the major ones. I’ve listed the components chosen below. I could’ve definitely substituted other components for the ones used and the ones I have used here are by no means the best for the job. The ESP32, for example, is completely overkill for this application but it’s what I’ve been using recently and the only MCU I had on hand. After collecting the components, I jumped into Fusion 360 to design the schematic that I would be working from. While designing, I realised that I would need to use a voltage divider to be able to accurately read the working voltage of the battery. Since the ESP32 is 3.3V, the max voltage of 4.2V would overdrive the pin and possibly cause damage. Because of this, I added a voltage divider to bring the entire range of the battery into readable range. As the upper and lower limits of the inbuilt ADC do not display values as reliably as closer to the middle of the range, I designed the voltage divider to bring a max value of 4.4V down to 3.3V and allow some headroom for reading battery voltages starting at 4.2V. To reduce noise in the reading, I also added a 1uF electrolytic capacitor. Next, I grabbed some perfboard and began to place the components. I could’ve tested using a breadboard however because of the relatively high current and issues with noise, I decided against it. The process of populating the board was mostly seamless other than having to modify the slide switch pins as it was designed to be a panel-mounted component. I also found out that in my mess of random, unsorted resistors, I didn’t have anything around the 3kΩ value so settled for one 10kΩ in parallel with three 10kΩ resistors in series. Overall, the circuit looked okay and was functional but I think a little more planning of the perfboard (and future improvements in mind) would have made the board look even better. Once the board was built, I needed to write some code to get any readings out! I started with a switch statement where I wrote out the functions I was expecting I would need to create a functional battery capacity tester. I started with the most obvious, which was voltage control of the current sink. This was fairly easy initially but required some tuning. This involved taking writing values to the DAC in increments of 10 and then measuring the voltage across the shunt resistor. I logged this relationship in an Excel sheet and made a quick graph to find that the relationship was a curve but could be approximated to be roughly linear. Using this linear approximation, I used the map function to map the expected voltage across the shunt resistor to a DAC value. I then implemented this so that the user would only have to input the current they wanted which would then be used to map to the corresponding DAC value. After this, I looked at reading the voltage of the battery. Again, a simple analogRead() was all that was needed which was then mapped to convert it to the battery’s real voltage for the user to read. I initially used a simple multiplication here, however, the results were not accurate and I found that mapping the values aligned much better with the real-world values. The final function was the battery capacity test function which would run the actual capacity test with the specified parameters. In simple terms, this function would take a starting voltage, a drain current and a final voltage, then return the time taken for the battery to drain from start to finish. This final time would then be used to calculate the capacity in mAh of the battery. If you would like to see the final program, any 3D models or schematics for this project, please check it out here. The results of the battery capacity tester are promising and appear to be fairly accurate to the ratings of a few of the batteries I have tested. As the shunt resistor is dissipating the energy as heat, it does heat up significantly, as does the MOSFET. The voltage measured across the shunt resistor and battery both stay roughly in line with the measured voltage using an RHMM17 digital multimeter. I’m hoping to be able to test some of the cells that I’ve already tested on a professional battery capacity tester to verify my results. As you can see below, the battery tester got a value of 597mAh with a current of 550mA over 1.09 hours. I measured the voltage across the shunt resistor and for the majority of testing this measured voltage was only 230mV! That's roughly 25mV, or 10%, under the expected voltage. If you account for this difference, the measured capacity is almost dead on. There are a number of improvements that I’d like to make to the project, some of which will increase the accuracy of the capacity measurements. For example, taking readings of the shunt resistor using another ADC on the ESP32 would allow the current to be set precisely and allow the DAC value to change and maintain a constant drain current throughout the test. Swapping out the MOSFET may also give more accurate measurements by eliminating a lot of the power lost to heating by the device operating in the linear region. This effect could be reduced by using a MOSFET with a lower VGS(th) and with a low RDS(on) as the MOSFET would be operating further out of the linear region with the aim of being in saturation. To improve the usability, I’d also like to add a case to the device and swap out the ESP32 for a more suitable board, such as an Arduino Nano (this will take some small modifications to the hardware and code). To hold the battery while it is being charged/discharged, I’m looking at designing a battery holder for 13400 size batteries and similar while maintaining the JST connections for anything larger. Any future updates will be posted on my blog.

  • Pushing the Voltera V-One

    Sending PCB designs off to China? Old news! Etching copper clad boards at home with some nasty chemical? Who’s got time for that?! The latest and greatest way to prototype circuit boards is with the Voltera V-One PCB Printer. Although it's not the cheapest machine, it's the perfect tool for my electrohaptic feedback project. I'm specifically using it for the electrode array that attaches to your fingertip, where I'm looking to create a flexible substrate for maximum comfort and effectiveness. The Voltera V-One is a 3D printer which uses conductive inks to print conductive ink. It can be used to quickly prototype simple designs and means that to get a purpose built board which doesn't use stipboard or veroboard can be done quickly and relatively easily. Traditionally, it is used to print single layer, or sometimes dual layer PCBs onto either a rigid substrate, like FR4, or onto a flexible substrate, like Kapton film. To make the dual layer boards, the V-One uses drilled holes and rivets and so it is only possible to create dual layer rigid boards leaving flexible boards on just a single side. For simple designs these limitations are fine and are simple enough to work around a lot of the time. If you are prototyping simple boards, its a powerful tool for teaching both circuit design and additive manufacturing in the same machine however, once you need a second layer (or more) the process becomes much more difficult and even more limitations are introduced. After using this machine for a few months, I've learnt its quirks but also the secret power it holds once you remember what this machine essentially is, a 3D printer! The Voltera V-One boasts some pretty impressive specs stating that it can print down to trace widths of 0.2mm (8mil) and can do pin-to-pin pitches of 0.65mm (26mil). It can print on rigid boards or flexible substrates too - exactly what I need. Another feature of the V-One that isn’t explicitly stated is the ability to use other liquids like, for example, a material that would allow vertical stacking of layers such as resin. Now, the utility of this isn’t immediately obvious; why wouldn’t you just use vias to go from one side of a board to the other? In the case of flexible substrates, this option can include using rigid rivets which would decrease the flexibility of a small board. Another issue is when you want as much surface area in a small space as possible, as is the case with the electrode array I’m designing, because in the middle of a conventional via is a airgap. There is a process called "via-in-pad" that can be used to overcome issues like using vias in tight spaces and the airgap in the centre. The process for creating this feature is more complex than a regular via as there are extra steps involved in the fabrication process. Using the V-One, I can print the traces and pads on just a single side of rigid or flexible material, then print a layer of resin to act as an insulator, then finally print the top layer of electrode pads that would be in contact with the finger. To connect the layers, I can utilise a similar process to the via-in-pad, but with a much lower cost and complexity as I'm simply using the V-One as its predecesors intended, as a 3D printer. Using this method also allows me to create blind and burried vias, another feature that is usually reserved for only high end PCB fabrication processes. The process was something that I had to tune so that I didn't break too many of the fragile nozzles that are used on the V-One. For the conductive inks, I continued to use the high precision machined nozzles but for the resin, I used a similar sized needle with the end cut down to fit properly onto a cartridge. After developing my method, I was left with something that goes like this: The first conductive ink layer is printed onto the substrate like normal. For a 2 layer design, this would be the bottom layer which has additional reference points so that additional layers can be aligned properly. Bake the board to the settings of the conductive ink. The next layer is the vias which should be loaded up and aligned to the pads below. This layer is then printed at roughly a 0.15mm layer height so that it can be safely printed on top of the rough surface of cured ink. Bake (another 45 minutes of waiting) Now the resin layer will be printed by aligning the layer with the reference points and printing at the same height as before, roughly 0.15mm. The layer is closely inspected to make sure that there is no runover of the resin to the vias but that the resin is completely covering lower layers. Blast the UV curable resin with some UV rays (courtesy of a high power UV torch, the sun also works). The final layer can be printed. In my design, this is the top layer that has the pads which will be in contact with the fingertip. Align with the reference points and print at roughly 0.15mm. Bake! Test all the points for continuity and hope that your hard work has paid off! After these steps, you should be left with something that resembles the design you were expecting. To make sure that all the layers were doing their jobs, I sacrificed one of my first test boards to get a cross-section. Now, it wasn't all smooth sailing and there were/are definitely some issues with the whole process. The main problems are down to the V-One being a relatively unsofisticated piece of equipment. By that I mean that it lacks some features that would make using the machine much easier and projects like mine more abundant. In terms of hardware, some kind of camera system would be incredibly helpful as aligning the layers (on points that are just 1mm^2) is difficult to say the least and caused shorts on at least one of my test boards because of poor alignment. I guess you could say that alignment is human error, but when it comes to the software there are 'features' that just don't work so well in practise. My two main complaints here are the calibration sequence that forces you to print over the top of your work piece and the seemingly completely random Z probing. I understand that the calibration sequence was not built for my purposes but I would appreceiate the ability to move it to another area of the board. As for the Z probing, I have no solution other than to request that the probing should be the same between probings of the same design. As an experiment, I also played around with some black UV-curable resin and found that it could be used to create text. With the limited time I spent tinkering with the Z-height and flow settings, I was able to get text that I would say is legible at 100mil height but I think this could be improved by using a smaller nozzle, slower speeds and a lower layer height. Unfortunately for these tests, it looks like a lower layer height is a requirement as even after curing with a 10W UV torch for twice as long as usual, only the outer layer of the text was cured leaving uncured resin shielded inside. Overall, the Voltera V-One proved to be a useful tool in creating the custom boards I hope it could make. While there were some challenges with the machine's lack of advanced features, such as a camera system, the process was simple and repeatable. By sacrificing one test board to get a cross-section, I confirmed that all layers are properly aligned and that the interlayer connection looks almost seamless. With some improvements to the machine's calibration and probing sequences, the V-One could become even more user-friendly and capable of producing more complex designs. Despite its limitations, the V-One has proven itself to be worth more than it's often given credit for. As the NOVA, the bigger brother to the V-One, is now available, I hope that it can cover all the short comings and that more people can develop this process in the future.

  • Electrohaptic Stimulation Hardware: Shockingly Difficult

    Creating a device that can send pulses of electricity through the skin is in theory quite a simple task. You have a control circuit and microcontroller which sends the pulses and the electrode that’s in contact with the skin. Two simple components which are both made much more complicated because of the home to the nerves we are trying to stimulate: the skin. The skin is an incredibly complex and individual medium that we’re using to push our pulses of electricity, or current, through. It consists of layers of tissue, each with different properties and host to different nerves depending on which layer you look at. Going from one individual to another (or even one fingertip to another) can result in wildly different skin thicknesses and as a result, further variation in the properties of the skin. Skin can be hot or cold, wet or dry, rough or smooth; all factors which influence the electrical properties of the skin and therefore the way that current is pushed between the electrodes and because of this, our control circuit needs to be robust enough to handle all of these different scenarios. As a starting point, it can be assumed that the resistance between two adjacent dry electrodes (no gel or special interface material) with the skin as a conductor between is anywhere from 100kΩ to 10MΩ. For reference, to drive just 1mA through these electrodes, it would require a minimum of 100V which is approaching dangerous levels if someone using the device was trying to hurt themselves. Thankfully, 1mA has been found across a few different studies to be all that is needed to create some kind of sensory stimulation of the fingertip and the risk of someone using the device incorrectly is low due to the small area where stimulation should be happening. After my initial research, I created a rough layout for the electrode array that would attach to the fingertip. I decided on a 4x4 array so that the electrodes would still have a large enough contact area with the skin while also giving more room to play with different textures when it came time for testing. As I was designing the electrode array, it became clear that it was going to be difficult to route traces to all of the electrodes on just a single-sided flexible circuit board. I initially considered using one of the Chinese PCB manufacturers, but as well as being hugely more expensive and having a fairly lengthy wait time for flexible substrates, I thought the presence of vias (holes from one layer of the board to another) could pose issues for the contact area. Thinking about the facilities available to me, I started designing around using the Voltera V-One PCB printer which I have access to through my University. This would allow me to iterate on my designs quickly and (relatively) easily rather than having the boards ordered from China. It also gave me the opportunity to play with a piece of equipment that I’d been seeing on my YouTube feed for years from creators like GreatScott! The process I’ll be using will be the subject of a future post on this blog as it involves some more unusual techniques and deserves its own post. Another way to enhance the electrode array and lower the skin-electrode resistance is to use some kind of interface material to bridge the gap between skin and electrode, not unlike using thermal interface material between a computer processor and its cooler. Traditionally for electrodes, this would be an electroconductive gel that is applied directly to the electrode before attaching it to the skin which decreases impedance and signal variability. However, this method has some drawbacks, including the tendency of the gel to dry out, diminishing its effectiveness over time, it can trigger allergic reactions and is an extra step making using the electrodes at all a more time-consuming task. Alternatively, a dry-electrode can be used, but this eliminates the advantages of the electroconductive gel. Recent research has highlighted some materials which may be able to bridge the gap between wet and dry electrodes giving the best of both technologies. Now that there are some parameters to work from for the control circuit, that’s what I focused on next. There are 16 electrodes, all of which must be able to be switched on and off individually with current control of each electrode. The most complex part is where I started first, the switching of the electrodes between a high-voltage source and ground. I assumed that to achieve lower dry electrode impedance, I would need to work with voltages in the range of up to 200V (with the goal of using a lower voltage) and up to 5mA per channel since the materials I mentioned could potentially lower impedance have not yet been tested. This current came from other studies looking at electro-tactile stimulation finding that participants required between only 0.5mA and 1mA for sensations on the fingertip. Ideally, there would be a chip that fits all of these requirements, or at least an easy way to make something like this. I did find the HV507 from Microchip that could work, but it has limitations. It can only handle up to 1mA of current per channel, and it doesn't offer control over the current for each individual channel. Alternatively, I could build an array of push-pull amplifiers, each with its own current control circuit. However, this approach is complex and could require a lot of time to troubleshoot. HV507 it is! The HV507 is a low-voltage to high-voltage serial-to-parallel converter with 64 push-pull outputs. It can handle up to 300V and is CMOS-compatible (uses 5V logic). In conjunction with the ESP32-WROOM that I will be using for the microcontroller in this project and a 3.3V-to-5V logic level converter, the HV507 is a great choice for simplicity. Another benefit of this IC is that it has 64 channels which gives room for either higher-resolution electrode arrays or the potential for the stimulation of multiple fingers without having to reconfigure the entire control circuit. Either way, more electrodes! The constant current circuit that I’ll be using is a simple voltage-controlled current source (VCCS) circuit and consists of an op-amp, shunt resistor and N-channel MOSFET. I’ve used this design since the very first ideas about the circuit and it’s been pretty reliable and simple to use. In a typical VCCS circuit, an op-amp is used to compare the input voltage with the output voltage across a shunt resistor. The op-amp then adjusts the output voltage to ensure that the current flowing through the shunt resistor is proportional to the input voltage. The output voltage of the op-amp is then sent to a MOSFET that acts like a switch to control the flow of current through the circuit. The MOSFET's drain is connected to the load and its source is connected to the shunt resistor. By adjusting the output voltage of the op-amp, the VCCS circuit maintains a constant current through the load, which in turn ensures that the current flowing through the circuit is proportional to the input voltage. I think this is a case where a picture (or schematic) speaks a thousand words… For the brains of my project, I'm using an ESP32-WROOM as I mentioned earlier. I had one lying around and it turned out to be a great choice because of its built-in WIFI and Bluetooth capabilities. Plus, it's really easy to get started with! Right now, I'm writing the code for the project in Arduino, but I'm planning to switch over to the Espressif-IDF framework soon. This will give me more control over the hardware and allow me to customize things even further. The circuit I’ve ended up with looks pretty good and seems to cater to my needs quite well. I’m sure there are lots of little improvements that can be made, but for initial testing, I think my design will work to show the potential of electrotactile haptic feedback.

  • The Future of Remote Surgery: Exploring the Possibilities of Electrotactile Stimulation

    Remote surgery has been a game-changer in the medical field, allowing for surgeries to be performed from afar and providing access to medical services to remote and underserved communities. However, one major challenge that remote surgery robots face is the inability to recreate the sense of fine touch. This sense is crucial for surgeons to distinguish between cancerous and non-cancerous tissue, among other things. To tackle this challenge, various solutions have been proposed, including the use of complex microfluidics or bulky actuators to create sensations of macro touch. But these solutions fall short in recreating the sensation of fine touch and texture. The good news is, research has shown there may be a new solution that promises to solve this problem - electrotactile stimulation using an array of electrodes. My proposed solution uses electrical stimulation to stimulate specific small areas of the fingertips, which is accomplished by controlling each of the electrodes. To make the stimulation predictable, I'll be using a grid pattern for the electrodes, as it will allow for sensations to be created related to the boundaries between each electrode. The electrode pads should have as large an area as possible to minimize the resistance between each electrode. The shape of the electrodes and the material used at the interface between the electrode and skin are also critical factors to consider. A conventional paired square-type electrode may not provide a high boundary length, so a different shape may be needed. The material used should not readily oxidize and should be biocompatible. For ease of use, a dry electrode array is ideal, but it may not be possible due to high skin-electrode resistance. In this case, a material such as gold- or silver-plated copper could be used, and an additional interface layer may be required to lower the skin-electrode resistance. The electrodes will be controlled by a dedicated microcontroller that communicates with a host computer, which will send commands including the state of each electrode, amplitude, frequency, and wave type. To be used in virtual reality applications, a battery-powered system with wireless communication with the host computer is preferable. Each electrode should be configurable as either anodic or cathodic, or even as a tristate configuration to allow for a high impedance state so that current can be forced deeper into the skin to activate different nerves. To ensure correct interfacing between the device and fingertip, skin electrode resistance monitoring should be used. This will not only ensure the device's safety but also monitor the quality of the skin-electrode interface and provide feedback on the stability of the connection. For the application of electrotactile stimulation in remote surgery robots, a method of detecting texture must be used to interpret the material being touched by the surgical instrumentation. Piezoelectric devices have been demonstrated to capture texture data, and this data must then be interpreted and translated into data that will display the texture data on the electrode array connected to the fingertip. To further optimize the design, simulation software can be used to simulate the current paths between electrodes and visualize the differences. The initial focus for stimulation parameters will be derived from previous studies and literature, including frequency, amplitude, and waveform. For example, research suggests investigating frequencies such as 5Hz, 250Hz, and 2kHz using sinusoidal, square, and pulsed DC waves. The ultimate goal is to transfer this knowledge to haptic feedback applications. In conclusion, electrotactile stimulation using an array of electrodes holds promise in solving the challenge of recreating the sense of fine touch in remote surgery robots. With proper design and optimization, this solution could revolutionize the way surgeries are performed and provide better outcomes for patients.

  • Touching Reality - Beginnings

    This project started as a curiosity about the ways we interact with the virtual world, be it through gaming, virtual reality, or even our smartphones. I was fascinated by the idea of feeling the weight of an object or running my fingers through grass in VR games without having to rely on bulky, expensive and complicated peripherals. This curiosity led me to explore the concept of virtual texture perception, which then changed my future aspirations, directing me towards the manipulation of the human body and the senses. I designed an initial prototype, tested it on willing participants, and documented my findings in a paper for my undergraduate dissertation. During my studies, I encountered many challenges and obstacles, but I persevered, and my final year project demonstrated that virtual texture creation was a viable option. After graduating with a BEng in Electronic and Computer Engineering, I switched to Biomedical Engineering for my Masters degree, where I'm currently researching the effect of electrical nerve stimulation on the fingertip. The concept I'm investigating is called Transcutaneous Electrical Nerve Stimulation (TENS), which involves sending electrical impulses through the skin to reach the nerves. TENS has numerous medical applications, but there's little research on its potential for entertainment or recreational purposes. I aim to demonstrate how TENS can be used to simulate sensations in consumer electronics, like smartphones and VR devices. In my final year project, I developed an electrode array and control circuit that fits the fingertip. I tested my design on participants and analyzed the results to determine if there's any correlation between the stimuli applied (electricity) and the stimuli perceived (texture). The goal was to classify the different stimuli that can be perceived and figure out how to recreate them. The results were positive and good motivation for a deeper dive into what this technology could have to offer. TENS offers numerous advantages over traditional haptic feedback technologies, including cost savings, the ability to simulate sensations that are difficult to recreate, and improved immersion into the digital world. It has the potential to revolutionize virtual training, enabling similar experiences at a lower cost. For my research project, I've scoured through all the studies and research that could be of help in reaching my goals. Since wrapping up my dissertation, there's been a ton of new findings on using electrical stimulation for haptic feedback and the nervous system's response to touch. Armed with this newfound knowledge, I've revised my original control device to allow for some dynamic electrode movement. My goal is to bring real touch to the virtual world and have people be able to recognize it (though officially its for use with remote surgery robots)! I'll be posting updates from this project and others on this page to document my research and development.

bottom of page