Silicon ChipDigital Boost Regulator - December 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions
  5. Back Issues: Hare & Forbes Machineryhouse
  6. Publisher's Letter
  7. Feature: Good grief! by Max the Magnificent
  8. Feature: Net Work by Alan Winstanley
  9. Feature: The Fox Report by Barry Fox
  10. Project: Digital Boost Regulator by Tim Blythman
  11. Project: Dual-Channel Power Supply for BREADBOARDS by Tim Blythman
  12. Project: Display Adaptor for the BREADBOARD PSU by Tim Blythman
  13. Feature: Arduino Bootcamp – Part 12 by Max’s Cool Beans
  14. Feature: Circuit Surgery by Ian Bell
  15. Project: The 555 Timer IC – Part 1 by Robin Mitchell
  16. Feature: KickStart by Mike Tooley
  17. PCB Order Form
  18. Advertising Index by Ian Batty

This is only a preview of the December 2023 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
Items relevant to "ETI BUNDLE":
  • Bookshelf Speaker Passive Crossover PCB [01101201] (AUD $10.00)
  • Bookshelf Speaker Subwoofer Active Crossover PCB [01101202] (AUD $7.50)
  • Bookshelf Speaker Passive and Active Crossover PCB patterns (PDF download) [01101201-2] (Free)
  • Bookshelf Speaker System timber and metal cutting diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Easy-to-build Bookshelf Speaker System (January 2020)
  • Building the new “bookshelf” stereo speakers, Pt 2 (February 2020)
  • Building Subwoofers for our new “Bookshelf” Speakers (March 2020)
  • Stewart of Reading (October 2023)
  • Stewart of Reading (November 2023)
  • ETI BUNDLE (December 2023)
  • Active Subwoofer For Hi-Fi at Home (January 2024)
  • Active Subwoofer For Hi-Fi at Home (February 2024)
Digital Boost Regulator By Tim Blythman This board lets you use a PIC18F18146 8-bit microcontroller for any task while its onboard peripherals generate an adjustable voltage without interfering with what it’s doing. It even includes some capacitive sense buttons and a seven-segment display that can be used to show the voltage or for other uses! T he PIC16F18146 micro has some interesting onboard peripherals. We realised it is possible to combine several of them with a small number of external parts to make a free-running, programmable boost voltage regulator that doesn’t require any processor intervention while running. This small PCB allows you to experiment with or use this concept. Since this 8-bit microcontroller has 20 pins, we’ve connected them all to headers for making off-board connections. This design was prompted by our review of the latest 8-bit PICs in the October 2023 issue. We’ve added a small LED display and some touch-sensitive pads to create a standalone, digitally controllable boost voltage regulator with a digital readout. If you’re a keen programmer, you might be interested in testing your own designs using this chip. It could be used as the basis of all sorts of devices. You could leave off most of the components and use the board to experiment with the bare chip, although we already presented a ‘breakout board’ that does that in the same October issue. Most recent 8-bit, 20-pin PIC microcontrollers have a similar pin layout, so this board could possibly be used with them too. We purchased some PIC16F18146 chips in SOIC packages for this project Practical Electronics | December | 2023 and potentially for use in other projects. We chose that one over the others we looked at in October because it has more peripherals than the PIC16F18045, and importantly, it was available in a SOIC package (that isn’t hard to solder). The PIC16F17146 differs only in that it also has an internal op amp peripheral. That could be handy for some designs, but we shall have to see when stock becomes available to design a project around it. The Digital Boost Regulator PCB suits all three of the aforementioned chips if you wish to experiment with them instead. However, the other chips will need slightly different code to work, and we will leave that as an exercise for the reader. The working principle of the boost circuit on this board is not novel. What is different is that instead of using a dedicated boost controller IC, we are simply configuring some of the PIC16F18146’s internal peripherals to perform the same role. Most dedicated switchmode controller ICs have more features, such as current limiting and short-circuit protection, that this design lacks. We have specified our circuit modestly to keep it simple. Note that a dedicated chip will probably have a better control algorithm and thus tighter voltage regulation. While our design is not bulletproof, it is a working proof-of-concept that is usable in many roles. This design is a way to show how valuable these advanced device peripherals can be. In particular, the configurable logic cells (CLCs) allow events to be responded to without requiring any processor attention. We’re only using a very small subset of the peripherals, so it won’t Features and Specifications ∎ Onboard digitally controllable boost (voltage step-up) converter from 5V up to 20V ∎ Output power of up to 0.5W (the output current depends on selected voltage) ∎ Capacitive touchpad interface ∎ Four-digit LED display ∎ Breaks out all microcontroller pins to headers 17 is higher and thus, the output voltage increases. The theoretical maximum (disregarding efficiency factors such as resistance and voltage drops across the diode) is equal to the supply voltage divided by the switch’s open duty cycle. So if the duty cycle is 50%, the voltage output is (in theory) double the input. Theoretically, if the duty cycle drops to 10% open (which is the same as 90% closed), the output voltage will be ten times the input voltage. However, with such a high boost ratio, the peak inductor current becomes so high that the output deviates substantially from the theoretical voltage. Fig.1: in a switched-inductor boost circuit, energy is stored in the inductor’s magnetic field when current flows through it. As the magnetic field collapses, it drives current to the output via the diode. By changing the switch duty cycle, the average energy in the inductor can be changed, controlling the output voltage. seriously impact the chip’s ability to perform other tasks if you were to use it for the basis of a design. For example, the PIC16F18146 has two DACs and two comparators, but we only use one of each. Boost regulator Fig.1 shows the basic arrangement of the inductor-based boost circuit we are implementing. If the switch is closed, as shown at the top of the diagram, current from the incoming supply flows through inductor L1 to ground, charging the inductor’s magnetic field. When the switch opens, the inductor continues to pass current, but it is diverted via diode D1 to the capacitor and load on the right-hand side. Consider the case when the switch stays open. Due to the diode drop, the output voltage settles just below the incoming supply. This is the minimum output voltage; such a circuit cannot deliver a voltage much lower than the incoming supply. If the switch spends some of its time closed, the average inductor current 18 Circuit details Fig.2 shows the full circuit of our Digital Boost Regulator and breakout board. IC1 is the PIC16F18146 microcontroller with a 10kΩ resistor pulling its MCLR pin (pin 4) to its supply rail to prevent spurious resets. A 100nF supply bypass capacitor is provided for stable operation. CON1 and CON2 are possible sources for the supply voltage. CON1 is a standard mini-USB socket with only its power pins connected. The circuit nominally runs on 5V and is perfectly happy with anything from 4.5V to 5.5V, as might come from a USB power supply. CON2 is used to connect a programmer, such as a PICkit 4 or Snap, which can also supply power (the Snap requires a modification to do so). Q1 performs the role of the switch from Fig.1; the 10kΩ resistor from its gate to ground holds it off when there is no signal from the microcontroller (eg, during programming). A capacitor on the supply side of L1 provides a stable, local power supply for the boost circuit from the 5V rail. The output capacitor, downstream of the diode’s cathode, is supplemented by a pair of resistors forming a voltage divider. This allows the microcontroller to sense an output voltage that might be higher than it could otherwise accept. This divided voltage is taken to a pin on IC1 that can be configured as an input to the internal comparator. The divided voltage can also be sampled by the analogue-to-digital converter (ADC) peripheral, so we can measure the output voltage. The output voltage on the capacitor is also taken to two-pin header CON4 so that you can feed it elsewhere. TP1-TP3 are connected to PCB touch pads. They aren’t external components but are formed from PCB traces designed to effect a change in capacitance when touched (the capacitors shown attached to the ‘switches’ represent the capacitance between the tracks). They each connect to an ADC-enabled pin of IC1. 17 of the 20 pins on the PIC16F18146 can be connected to the ADC. Finally, LED1 is a four-digit seven-­ segment display connected to the remaining pins, configured as digital I/Os to drive the display in a multiplexed manner. Each of the eight segments (including the decimal point) has a series resistor for current limiting. Firmware Fig.3 shows how the internal peripheral blocks are configured to run the boost regulator. Timer 1 is set running from the instruction clock. The comparator can be set to synchronise with this clock. We do this to prevent the comparator from oscillating at a high frequency when the output is near the setpoint. The firmware also starts one of the PWM peripherals, set to operate at a 20% off and 80% on duty cycle. This puts a theoretical upper limit on the boost voltage that can be achieved, around five times the input voltage. The PWM output is not sent to an I/O pin, but instead routed via an internal multiplexer to one of the CLC instances. The FVR is set up to provide a 2.048V reference to one of the DACs (digital-to-analogue converters). The DAC is enabled and is internally connected to the non-inverting input of the comparator. The 8-bit DAC can thus apply a voltage from 0 to 2.040V in 8mV steps. In practice, the FVR reference is not precisely 2.048V. The stated accuracy is 4%, but the factory measured value can be read from the chip’s DIA (device information area). With a 10:1 (10kΩ/1kΩ) divider, the output range is about 22.44V in 88mV steps. The upper limit of the boost circuit with an 80% duty cycle is around 25V, depending on the supply voltage. So we should be able to achieve 20V at the boost output easily, and that’s what we’ve specified. The inverting input of the comparator is connected to the divided output voltage. Being an analogue input, this can be one of four software-selectable pins. The comparator output is not exposed externally, although it could be. It is instead fed to one of the CLCs alongside the PWM signal. The CLC is configured to simply provide a logical AND of the comparator output and the PWM signal. This is about the simplest possible application of the CLC. Practical Electronics | December | 2023 The output of the CLC AND gate is fed to one of the I/O pins and thus to the gate of the MOSFET. Since it is a digital signal, we could map it to any one of the 17 I/O pins on the PIC16F18146. At power-on, assuming the DAC output is set to a sufficient level, the divided output voltage is well below the DAC setting. So the comparator output is high, and the MOSFET drive signal follows the PWM signal. When the voltage rises above the setpoint, the comparator output drops low, and the MOSFET drive is shut off until the voltage decays below the setpoint. We can change the output voltage simply by altering the DAC value. So the processor does not need to spend any time handling the boost converter unless it wishes to change the settings. The Timer 1 synchronisation takes care of any jitter that might occur around the comparator’s switching point, preventing the MOSFET from trying to switch too frequently by synchronising its state changes to the timer. While it might seem a simple exercise, this demonstrates just how useful and configurable the peripherals can be. For the sake of two external pins, an application circuit can make do without a separate boost controller chip and, as a bonus, have a programmable voltage setpoint! Once the peripherals have been initialised, this part of the circuit continues to run without taking up any more processor cycles. Scope 1 shows typical operation with an output voltage of around 8.5V, including the MOSFET gate drive and drain voltage. The broader peaks are complete PWM cycles, while the narrower peaks are when the PWM cycle has been interrupted by the comparator sensing that the voltage is above the programmed threshold. A dedicated boost control IC would dynamically control the pulse widths and provide more uniformity, giving a smoother output, better regulation and better efficiency, hence our conservative ratings for our boost circuit. Still, it does the job of regulating the output at the target voltage. Touch sensing We’ve discussed the operation of shared-capacitance touch sensing previously, with quite a bit of detail in the ATtiny816 Breakout Board project (July 2021). The principle is that a finger brought near a touchpad Digital Boost Regulator Fig.2: the lower section of the circuit shows the microcontroller connected to the rows of ‘breakout’ headers, along with the 7-segment LED display and the three touchpads. The boost circuitry at the top is driven by circuitry hidden inside IC1 (shown in Fig.3). Practical Electronics | December | 2023 19 Fig.3: the peripherals inside IC1 used to control the boost regulator are equivalent to five distinct ICs: a voltage reference, a digital potentiometer, a comparator, an oscillator and an AND logic gate. We initialise and connect these peripherals as shown by setting various registers. They then control the external circuitry shown in Fig.2 without further intervention from the processor. increases its apparent capacitance and that change can be detected. The PIC16F18146 microcontroller has an advanced ADCC or ‘analogue-to-digital converter with computation’. It can perform multiple samples and provide computed results based on these samples. One of the modes supports the measurement of a capacitive voltage divider, the same principle used in shared-capacitance touch sensing. Effectively, we are comparing the internal capacitance of the ADCC’s sample capacitor (which the data sheet reports is around 28pF) to the capacitance of whatever is connected to the touchpad. When a cycle is started, the ADCC performs a precharge step, which briefly connects the internal capacitor to the supply voltage and the external pad to ground (and vice versa). The internal capacitor and pad are connected together during the sample phase of the ADCC cycle. The numerical result of the conversion depends on the relative capacitance values. Higher values correlate to a higher capacitance at the external pad, as it can hold and thus contribute more charge from the precharge cycle. The PIC16F18146 can actually perform two measurements with inverted precharge polarities and report the difference. Once the ADCC is configured correctly, the channel (corresponding to one of the pads) is set, Parts List – Digital Boost Regulator 1 double-sided PCB coded 24110224, 50 × 89mm, available from the PE PCB Service 1 SMD mini USB socket (CON1) 1 5-way right-angle pin header (CON2; optional, for ICSP) 1 2-way pin header (CON3; optional) 1 2-way pin header or socket (CON4; optional) 1 47μH 1A 6×6mm inductor (L1) [eg, Taiyo Yuden NR6045T470M] Semiconductors 1 PIC16F18146-I/SO programmed with 2411022A.HEX, wide SOIC-20 (IC1) 1 14mm/0.56in blue common-anode 4-digit 7-segment LED display (LED1) [eg, 7FB5461BB] 1 SS34 or similar 40V 3A schottky diode, DO-214AB (D1) 1 2N7002P, 2N7002K or AO3400 N-channel MOSFET, SOT-23 (Q1) Capacitors (all SMD M3216/1206-size X7R ceramic) 2 10μF 25V+ 1 100nF 50V Resistors (all SMD M3216/1206-size 1% 1/8W) 9 1kΩ 3 10kΩ 20 and the cycle starts. The result is read back a short while later. Scope 2 shows the voltages on two touch pads during their cycles. You can see the two precharge and measurement steps for each pad. While we could calculate the actual capacitance from the reading, it is simpler and sufficient to pick a threshold value that can distinguish between the presence or absence of a finger near the pad. A brief software routine scans the pads and sets the values in an array to whether or not a touch was detected on each pad. The other job of the firmware is multiplexed driving of the 7-segment LED display. For this, a timer interrupt is set to trigger 240 times per second. The display is blanked at each interrupt, and the output pins are changed to display the next digit in turn. As it is a common-anode (CA) display, one of the four anodes is pulled high, while the remainder are left floating. Any segments to be lit on that digit are pulled low. The 60Hz update rate combined with the persistence of vision makes the display appear steady. After construction is complete, we’ll discuss the actual use and operation of the default firmware. Construction The following assumes that you want to build the Digital Boost Regulator as described above. You could instead omit some parts and make a custom circuit by adding parts or connections to the breakout headers while using some or all of the included features. Practical Electronics | December | 2023 Scope 1: the blue trace shows the signal from the microcontroller to drive the gate of Q1 while the boost circuit is delivering 8.5V under load (green trace). The red trace is the voltage at the anode of D1. Dedicated boost controller chips typically change their duty cycle dynamically to control the output, while this circuit uses a fixed duty cycle modulated to limit the voltage. Scope 2: the voltages at the I/O pins for two touchpads during the ADCC sampling cycle. The period labelled ‘1’ is precharge while ‘2’ indicates sampling. ‘3’ and ‘4’ are the same phases but with a positive precharge. Note how the stage 2 and 4 levels for the blue trace are further apart than for the red trace; that pad is being touched, and it is that difference that the ADCC reports. The Digital Boost Regulator and breakout board is built on a double-­ sided PCB coded 24110224 that measures 50 × 89mm and is avalable from the PE PCB Service (see Fig.4). It uses practically all surface-mounting parts, so you should have flux paste, tweezers, a magnifier, a fine-tipped iron and some solder-wicking braid on hand. The flux will generate smoke, so use fume extraction or work outside to avoid breathing it in. Start by fitting USB socket CON1. Place flux on the pads, then rest the socket on top. This part has lugs that will locate it correctly, so alignment shouldn’t be difficult. Clean the iron tip and apply some fresh solder to it. Touch the iron to the small pads and allow the solder to flow onto them. Only the two longer pads need to be soldered. If you form Practical Electronics | December | 2023 a bridge, use the braid and extra flux to remove it. Then solder the four larger pads around the sides of the shell to secure it mechanically. Apply flux to the pads on the PCB, then fit IC1. Rest it in place, tack one lead and confirm that it is flat and aligned with all the pins. Also ensure that the divot or notch marking pin 1 is at the upper left, as per the PCB silkscreen markings. When everything is aligned, solder the remaining pins. Add some flux to the rest of the pads for the surface-mounting parts. Q1 is the only transistor and should be oriented as shown. The solitary diode (D1) must be aligned with its cathode stripe to the right. The remaining parts are not polarised. Use the same technique of soldering one lead and checking that the part is correctly positioned before soldering the remaining leads. The two 10μF capacitors are near L1 and D1, while the 100nF capacitor is above IC1. Fit these next, being careful not to mix them up as they won’t have markings. There are only two different resistor values, but take care not to mix them up. Most of the 1kΩ resistors are grouped together near CON1; these are the current-limiting resistors for the LED segments. The last surface-mounting part is L1. Turn up your iron temperature a little, if possible, as this part has more thermal mass than the others. Add a thin layer of flux paste to its pads then, as for the smaller parts, tack one side, check the position and then solder the other leads. Refresh any solder joints that look dry or rough by adding more flux and 21 although it didn’t seem possible to perform debugging. Connect your programmer to CON2 and upload the 2411022A.HEX file using the MPLAB X IPE. This HEX file is available from the December 2023 page of the PE website at: https://bit.ly/pe-downloads Fig.4: the Digital Boost Regulator mainly uses SMD parts, but they are all fairly easy to work with. Watch the orientation of the diode, IC1 and LED display, and you should have few problems. If you omit all parts except IC1 and its two adjacent passives, you can use the PCB as a breakout board that suits many recent 8-bit PICs in 20-pin SOIC packages. We did run into one odd bug, and you might, too; the programming software reports that 0x3112 is an invalid device ID, even though the data sheet indicates that this is the correct device ID for the PIC16F18146. If you get the same error message with that exact value (see Screen 1), it is safe to ignore it. You can continue to use the programmer to supply power, but the PICkit 4 cannot provide much current and won’t be very useful for running the boost regulator. For that, you’ll need to connect an external 5V supply, which could be as simple as a USB cable from a computer or charger. Screen 1: if, during programming, you see an error message indicating that 0x3112 is an invalid device ID for the PIC16F18146, you can safely ignore it. The data sheet shows that 0x3112 is the correct ID. Operation Assuming you have a 5V supply connected, you should see the display reading around 4.70 (the units are always volts) with the rightmost decimal point also lit. You can connect a multimeter to CON4 to check the output voltage. If the displayed or measured voltage is much higher than the input, there may be a problem, so you should shut down the Digital Boost Regulator and check the construction. The limited duty cycle should prevent the output from going way too high if there is a problem with the feedback system. This default display shows the output voltage while the rightmost decimal point indicates that the boost circuit is enabled. If the supply voltage drops too low (below 4V), the output will switch off until the supply voltage increases above 4.5V. As newly programmed, the boost circuit is enabled, but with a target of 0V, so the output voltage is simply the supply less the drop due to the diode. Pressing and holding the > button under TP3 will cause the display to switch to the setpoint display and start flashing 0.00. You can change the setpoint by holding one of the up or down buttons while holding the > button. The change happens straight away. Each step of the setpoint corresponds to one step of the DAC output. The displayed voltages are calculated based on the internal voltage reference values from the device information area, so the steps are not uniform (due to rounding) and the maximums might not align. 22 Practical Electronics | December | 2023 touching a clean iron tip. The solder should flow and smooth out. Before fitting the remaining throughhole parts, clean the PCB of excess flux using a recommended solvent and allow it to evaporate. Then check the alignment of LED1, being sure to orient it as per our photos and overlays. Solder it from the back of the PCB and trim the leads close. If you want to fit CON3 (for a 5V supply) or CON4 (to run the boosted voltage elsewhere), these can be header pins or sockets. If you like, you could add 10-way socket headers to the breakout pads to allow breadboard jumper wires to be used. CON2 is only needed for in-­circuit programming of IC1, so it can be omitted if you are working with a programmed chip, and don’t plan to experiment with the code. A right-angled header is recommended if you do fit CON2. Programming IC1 If this is necessary, you can use a PICkit 4 or Snap programmer. The Snap will require power to be supplied, which can come via CON1. You will need a relatively recent version of the MPLAB X IDE or IPE and the PIC16F1xxxx device family pack (DFP). We’re using MPLAB X v6.00. If you wish to experiment with the software, you’ll also need the XC8 v2.40 compiler. Although the programming pins are also used to drive the LED display, they don’t interfere with programming. At worst, there is faint ghosting on the LED display when the programmer is connected. We didn’t run into any problems with programming the chip after the board was complete, Code details We tested our prototype with various power supplies, both grounded and ungrounded and chose our touch sensitivity values based on those tests. These are the TOUCH_DOWN and TOUCH_UP values near the top of the io.h file. Having two values allows us to provide some hysteresis and thus debounce the buttons. Since the measured value increases on a touch, the sensitivity can be reduced by increasing these values. Conversely, the sensitivity can be increased by lowering the values. You shouldn’t need to make any changes if you are using the board as designed, but if you try to make touchpads by running wires from TP1-TP3, then you may find that the capacitances change. No doubt some people will be interested in using bits of our code, especially the boost and touch sections. So we’ve tried to make it modular and section the code into dedicated functions for each. The doTouch() function calls several other functions to check the state of the touch pads and store them in the t[] array. The other functions include initADCcvd() and getADCcvd(). The boostInit() function sets up the peripherals used for the boost Still, you should have no trouble setting and achieving a 20V output. Releasing the > button will return to the actual voltage output display. You should see the output tracking the setpoint as long as it is above 5V. The output will float a bit high with a light (or no) load as the boost circuit does not shut off until the output voltage is above the setpoint. Pressing the up and down buttons together will display ‘b’ and the supply voltage. Finally, if all three buttons are pressed simultaneously, all segments will flash on, and the setpoint is saved to EEPROM so that it is used by default at power-up. The safest way to do this is to hold the up and down buttons and then press the > button. That way, the setpoint can’t change. If all the segments don’t light up, the saved value may be the same as setpoint, meaning it doesn’t need to write to the EEPROM. If it did, that would cause extra write cycles (and wear) on the EEPROM. If you find the Digital Boost Regulator is not responding to touches or is flashing when no touch pads are pressed, then be sure that you don’t have anything connected to the touchpad I/O pins, especially circuitry that may affect the capacitances. controller. Controlling it simply requires that the DAC is set using the DAC1DATL register after it is enabled by clearing the TRIS bit of the RA2 port pin (which has been defined as SWPIN). Minimal circuitry If you want to use the board as a breakout for the PIC16F18146, only the 100nF capacitor and 10kΩ resistor adjacent to IC1 are needed for operation. The LED display and its eight 1kΩ resistors can be omitted to free up 12 I/O pins. Q1, L1, D1, CON4 and the associated passives, which include a 1kΩ, two 10kΩ resistors and two 10μF capacitors constitute the components that provide the boost feature. Leaving these off will free up two IO pins. Naturally, you will need to change the code to work without the display, and if you need a further three I/O pins, you will need another control method to replace the touch pads. However, they can’t easily be physically removed without sawing off the bottom section of the PCB. Reproduced by arrangement with SILICON CHIP magazine 2023. www.siliconchip.com.au BACK ISSUES Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics Practical Electronics The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine The UK’s premier electronics and computing maker magazine Circuit Surgery Exploring op amp exponential amplifiers Make it with Micromite Circuit Surgery Audio Out PE Analogue Vocoder: Driver Amplifier design Using and interfacing the Exploring op amp versatile iButton input offsets Audio Out Vocoder: Driver Amplifier build KickStart Using the I2C bus Make it with Micromite Circuit Surgery Using and interfacing Exploring the the versatile iButton LM35 temp sensor Audio Out Cool Beans Vocoder: Audio PSU Mastering switch debounce Microchip MPLAB Starter Kit for Digital Power PIC18F Development Board: using displays C void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Soothing Electronic Wind Chimes Assembly movlw D′7 D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Hex 192kHz, 24-bit Learn SuperCodec: Balanced Input and Attenuator Techno Talk – Communing with nature Fox Report – Power as free as the wind Net Work –EVs, upgrading to Windows 11 and space tech <at>practicalelec WIN!High-current Microchip WLR089 Xplained Pro Evaluation Kit Battery Balancer Electronic Building Blocks Circuit Surgery Building a budget Distortion and electronic stethoscope distortion circuits Audio Out Designing a practical de-thump circuit Make it with Micromite Circuit Surgery Code for an iButton-based Simulating distortion Electronic Door Lockand distortion circuits Audio Out Make it with Micromite Circuit Surgery Using transformers in audio electronics Installing MMBASIC on Using a distortion and Raspberry Pi Pico distortion circuits Flowcode void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Assembly movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Flowcode Programming Hex :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg Techno Talk – Should we be worried? Net Work – Electricity generation and streaming radio <at>practicalelec High-current Battery Balancer Hex Full-wave Universal Motor Speed Controller PLUS! Feb 2022 £5.49 Techno Talk – Go eco, get ethical! PLUS! 01 WIN! :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 PLUS! Jan 2022 £5.49 Explorer 8 Development Kit from Microchip Microchip SAM E54 Curiosity Ultra Development Board Assembly Learn Flowcode Programming: PIC, Arduino and 16x2 LCD Battery Monitor Logger 9 772632 573023 practicalelectronics www.electronpublishing.com Digital FX Unit WIN! 8/14/20-pin PIC Introducing the Programming Helper Raspberry Pi Pico WIN! WIN C void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); 02 Apr 2022 £5.49 Fox Report – Another fine mess: moving to Windows 11 Net Work – Scanners, eVTOLs and the latest from space 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec Techno Talk – From nano to bio 04 Cool Beans – Simple filtering with software Net Work – UK gigafactories, Rolls-Royce electric planes 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec PLUS! We can supply back issues of PE/EPE by post. We stock magazines back to 2006, except for the following: 2006 Jan, Feb, Mar, Apr, May, Jul 2007 Jun, Jul, Aug 2008 Aug, Nov, Dec 2009 Jan, Mar, Apr 2010 May, Jun, Jul, Aug, Oct, Nov 2011 Jan 2014 Jan 2018 Jan, Nov, Dec 2019 Jan, Feb, Apr, May, Jun Issues from Jan 1999 are available on CD-ROM / DVD-ROM If we do not have a a paper version of a particular issue, then a PDF can be supplied for the same price. Your email address must be included on your order. Please make sure all components are still available before commencing any project |from a back-dated issue. Practical Electronics December | 2023 Introduction to linear actuators Single-Chip Silicon Labs FM/AM/SW Digital Radio Receiver May 2022 £5.49 Techno Talk – Positivity follows gloom 05 Cool Beans – Amazing Analogue AI and a handy PSU Net Work – Google Lens plus energy and space news <at>practicalelec PLUS! Jun 2022 £5.49 Techno Talk – Mixed Menu 06 Cool Beans – Choosing servos and a little competition Net Work – NFC and the rise of mobile payments <at>practicalelec MMBASIC + RPi Pico + display = PicoMite Backpack! Microchip SAM V71 Xplained Ultra Evaluation Kit Multi-purpose Battery Manager Controlling a linear actuator 9 772632 573023 practicalelectronics www.electronpublishing.com Make it with Micromite Exploring DACs and microcontrollers WIN! Simple MIDI Toot toot! Music Model Railway Level Keyboard Crossing with moving barriers, flashing Advanced GPS Computer: lights and bell! Advanced GPS Computer construction and use 9 772632 573023 practicalelectronics www.electronpublishing.com BACK ISSUES – ONLY £5.95 £5.95 per issue for UK incl p&p n £8.95 Europe Air Mail n £9.95 ROW Air Mail KickStart WIN! Microchip SAM C21 Xplained Pro Evaluation Kit Digital FX Unit WIN! Microchip MPLAB ICD 4 In-Circuit Debugger WIN! :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 Flowcode C www.electronpublishing.com Wind turbine Small-scale garden set-up Completing our impressive Analogue Vocoder Mastering AC meters MiniHeart Heartbeat SimulatorBuild this handy Arduino-based power supply Learn Flowcode Programming PLUS! Audio Out Vocoder final assembly WIN! WIN Flowcode Vintage Battery Radio Li-ion Power Supply Make it with Micromite Circuit Surgery Build an iButton-based Exploring the Electronic Door Lock Royer oscillator 64-key MIDI Matrix WIN! WIN! Retro gaming with Nano Pong! Flowcode Digital Clock Design Flowcode C void interrupt(void) { if (intcon & 4) { clear_bit(intcon, 2); FCM_INTERRUPT_TMR o(); Assembly movlw D′7′ bsf STATUS, RP0 bcf STATUS, RP1 movwf _adcon1 movlw D′192′ movwf _option_reg PLUS! Jul 2022 £5.49 Hex :040000008A01122837 :08000800F000F00S030 EF10000 :10001000040EF2000A0 EF300BA110A122928352 86C :2000200D928FE28073 Techno Talk – Time for a total rethink? 07 Cool Beans – Touch-sensitive robots and using servos Net Work – The irresistible rise of automotive electronics 9 772632 573023 practicalelectronics www.electronpublishing.com <at>practicalelec Aug 2022 £5.49 08 9 772632 573023 practicalelectronics ORDER FORM – BACK ISSUES  Back issues required (month / year) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tel: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Email . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  I enclose cheque/PO to the value of £ . . . . . . . . . . . .  Please charge my Visa/Mastercard £ . . . . . . . . . . . . . . . Card No . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Valid From . . . . . . . . . . . . . Card Expiry Date . . . . . . . . . . . . . Card Security Code . . . . . . . . . . (Last three digits on or under the signature strip) SEND TO: Practical Electronics, Electron Publishing Limited 113 Lynwood Drive, Merley, Wimborne, Dorset BH21 1UU Tel: 01202 880299 Email: stewart.kearn<at>wimborne.co.uk On-line Shop: www.electronpublishing.com Payments must be in £ sterling – cheque must be drawn on a UK bank and made payable to ‘Practical Electronics’. All items normally posted within seven days of receipt of order. Copy this form if you do not wish to cut 23 your issue.