Silicon ChipCar Radio Head Unit Dimmer Adaptor - August 2019 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Jaycar Maker Hubs bring great possibilities / New Micromite V3 BackPack will be the standard
  4. Feature: Fluid logic, Fluidics and Microfluidics by Dr David Maddison
  5. Feature: We visit the new “maker hub” concept by Jaycar by Tim Blythman
  6. Project: Micromite LCD BackPack Version 3 by Tim Blythman
  7. Feature: Canberra’s Vintage Radio “MegaFest” by Richard Begbie and Kevin Poulter
  8. Project: “HEY! THE SIGN SAYS NO JUNK MAIL!” by Allan Linton-Smith
  9. Product Showcase
  10. Serviceman's Log: Remaking a ‘vintage’ guitar FX pedal by Dave Thompson
  11. Feature: First look: the new Raspberry Pi 4B by Tim Blythman
  12. Project: Car Radio Head Unit Dimmer Adaptor by John Clarke
  13. Feature: Quantum-dot Cellular Automata by Dr Sankit Ramkrishna Kassa
  14. Project: Discrete Logic Random Number Generator by Tim Blythman
  15. Subscriptions
  16. Vintage Radio: 1924 RCA AR-812 superhet radio receiver by Dennis Jackson
  17. PartShop
  18. Market Centre
  19. Advertising Index
  20. Notes & Errata: Versatile Trailing Edge Dimmer, February-March 2019; Low-power AM Transmitter, March 2018; LifeSaver For Lithium & SLA Batteries, September 2013
  21. Outer Back Cover: Hare&Forbes MachineryHouse

This is only a preview of the August 2019 issue of Silicon Chip.

You can view 47 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • We visit the new “maker hub” concept by Jaycar (August 2019)
  • We visit the new “maker hub” concept by Jaycar (August 2019)
  • Follow up: Arduino Day at Jaycar’s Maker Hub! (June 2020)
  • Follow up: Arduino Day at Jaycar’s Maker Hub! (June 2020)
Items relevant to "Micromite LCD BackPack Version 3":
  • Micromite LCD BackPack V3 PCB [07106191] (AUD $7.50)
  • PIC16F1455-I/P programmed for the Microbridge [2410417A.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite Mk2 plus capacitor (Programmed Microcontroller, AUD $15.00)
  • DS3231 real-time clock IC (SOIC-16) (Component, AUD $7.50)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • GY-68 Barometric Pressure/Altitude/Temperature I²C Sensor breakout board (Component, AUD $2.50)
  • DHT22/AM2302 Compatible Temperature and Humidity sensor module (Component, AUD $9.00)
  • 23LC1024 128kB (1Mb) RAM (SOIC-8) (Component, AUD $6.00)
  • AT25SF041(B) 512KB flash (SOIC-8) (Component, AUD $1.50)
  • 10uF 16V X7R ceramic through-hole capacitor (Component, AUD $1.00)
  • 22uF 6.3V X7R ceramic through-hole capacitor (Component, AUD $1.50)
  • GY-BM BMP280 module (Component, AUD $5.00)
  • GY-BME280 Barometric Pressure/Altitude/Temperature/Humidity I²C Sensor breakout board (Component, AUD $12.50)
  • Micromite LCD BackPack V3 complete kit (Component, AUD $75.00)
  • Matte/Gloss Black UB3 Lid for Micromite LCD BackPack V3 or Pico BackPack using 3.5in screen (PCB, AUD $5.00)
  • Software for the Microbridge (Free)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Demonstration software for the Micromite LCD BackPack V3 (Free)
  • Micromite LCD BackPack V3 PCB pattern (PDF download) [07106191] (Free)
Items relevant to "“HEY! THE SIGN SAYS NO JUNK MAIL!”":
  • ISD1820-based voice recording and playback module (Component, AUD $7.50)
Items relevant to "Car Radio Head Unit Dimmer Adaptor":
  • Radio Head Unit Dimmer Adaptor PCB [05107191] (AUD $5.00)
  • PIC12F617-I/P programmed for the Radio Head Unit Dimmer Adaptor [0510619A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware (ASM and HEX) files for the Radio Head Unit Dimmer Adaptor [0510619A.HEX] (Software, Free)
  • Radio Head Unit Dimmer Adaptor PCB pattern (PDF download) [05107191] (Free)
  • Radio Head Unit Dimmer Adaptor lid panel artwork (PDF download) (Free)
Articles in this series:
  • Quantum-dot Cellular Automata (August 2019)
  • Quantum-dot Cellular Automata (August 2019)
  • Follow-up: Quantum-dot Cellular Automata (February 2021)
  • Follow-up: Quantum-dot Cellular Automata (February 2021)
Items relevant to "Discrete Logic Random Number Generator":
  • Pseudo-random number generator (LFSR) PCB [16106191] (AUD $5.00)
  • Pseudo-random number generator (LFSR) PCB pattern (PDF download) [16106191] (Free)

Purchase a printed copy of this issue for $10.00.

DRIVING AT NIGHT? LOSING NIGHT VISION DUE TO THE BRIGHT LIGHTS INSIDE YOUR VEHICLE? YOU NEED THIS Radio Head Unit Dimmer Adaptor and Voltage Interceptor by John Clarke Very few aftermarket car radio ‘head units’ offer a dimming function, which makes driving in the country at night downright hazardous. This simple device fixes that, adjusting the display and backlighting brightness as you dim your instrument lights, giving you back your night vision and letting you see properly! It can also be used as a basic Voltage Interceptor for various automotive sensors. W hen driving at night, especially outside of towns and cities where there are no street lights, your eyes need to adapt to the dark. It’s called “night vision”. Bright headlights generally aren’t sufficient for you to see far enough down the road to drive safely, because many vehicles shine far too much light at your face to allow your eyes to adapt properly to the dark. One especially bad offender is ‘infotainment’ screens; while these generally dim automatically at night (ie, when your headlights are on), they’re usually still far too bright. Some can’t be turned off at all. And if you fit an aftermarket 70 Silicon Chip ‘head unit’ to your car, to add new features like Bluetooth or MP3 playback (or just to enhance the sound quality), you will usually find that the display doesn’t dim at all when you turn on the headlights. That isn’t good enough! Australia’s electronics magazine This device was designed specifically to solve that problem. Not only does it allow you to dim the display of a typical head unit automatically, but it will adjust the display brightness as you adjust your dashboard instrument light dimmer. So it’s really convenient. Once it’s set up, you simply adjust your dash lights to the desired brightness, and the radio will follow suit. It’s a small unit that draws little power and can be hidden away under the dash or possibly even inside the head unit. It’s quite easy to set up, too. So if you’ve installed a new head unit, or are planning to do so, you need to build this device. It’s tough to dim the head unit dissiliconchip.com.au play without it, since most aftermarket radios don’t have any wires to control the display brightness. So to be able to dim the display, you will need to open it up and find the display backlighting supply source. This is then intercepted and adjusted by our Dimmer Adaptor. In most cases, this is not hard to do for anyone with a little electronics knowledge; we’ll explain how to do this later on. Why we had to design this device Part of the reason you need this Dimmer Adaptor is that typically, the switch lighting and alphanumeric display in the head unit are backlit by LEDs, whereas the instrument backlighting in most vehicles more than a few years old uses incandescent lamps. The dimming voltages required are quite different between LEDs and incandescent lamps. For example, the head unit may use two white or blue LEDs connected in series to illuminate the buttons, and these will likely be driven from a regulated supply of about 8-9V via a current-limiting resistor. So 8-9V would give full brightness while around 6V would cause them to barely light up at all. Compare that to 12V incandescent lamps, that still give some light down to below 1V. Additionally, incandescent lamps have a brightness that is very non-linear with supply voltage. Even if your vehicle has backlit instrument lamps that use LEDs, their operating voltage range will not necessarily be suitable for head unit display dimming. Our Dimmer Adaptor works in either situation. One final aspect to note is that the Fig.1(a): the unit’s output voltage varies smoothly as the input voltage varies. This example suits a typical head unit with LED backlighting. As the input voltage ranges from 12V down to 1.6V, the LED drive voltage drops from 8V to 6V. With the instrument lights off, the backlight goes to full brightness. dimming control voltage for instrument lamps drops to 0V when the parking lights and headlights are off. However, the radio head unit should have its backlighting at maximum brightness during the day. This requirement is also catered for by our Dimmer Adaptor. That’s because its output voltage can be set to a particular value corresponding to various instrument dimming voltages in up to 16 steps. When the input voltage is between two of the programmed values, the output voltage is linearly interpolated so there is not a sudden change as the instrument light brightness is adjusted. Figs.1(a) & (b) show two examples of how the Dimmer Adaptor can be configured to operate. In Fig.1(a), the unit is programmed Fig.1(b): a more complicated example, with five voltages defined. Without interpolation (black lines), the output voltage would jump to the next set point as soon as the input voltage reached the defined threshold. The interpolated output (red) provides a linear variation between the set points instead. to deliver 8V at the output when its input is 0V, then reduce its output to 6V as the input voltage increases to 1.6V, then the output rises again, finally reaching 8V when the input is at 12V. This has the effect of giving maximum display brightness (8V for two white/blue LEDs in series) when either the headlights are off, or the instrument lights are at the maximum brightness setting. As the instrument lights are dimmed, the LED drive voltage smoothly drops towards 6V, which would give minimal display backlighting on the head unit. Fig.1(b) demonstrates how the linear interpolation works. Here, five different points have been programmed in. The black lines show what the result would be without interpolation, and Features • • • • • • • • • Compact unit Suitable for use with voltage or PWM based instrument dimming Maps output voltage against input voltage Easy setup of the adaptor Voltage follower or PWM output with 500mA current rating Voltage modifier output (low current signal) 16 programmable input voltage steps available Interpolation for output between each input voltage step Adjustable output change rate and smoothing siliconchip.com.au Australia’s electronics magazine August 2019  71 The PCB mounts in the base of the UB5 Jiffy Box. We’ve used a flanged lid, which actually becomes the base of the unit and provides convenient mounting holes. The cable gland nut’s side faces must be vertical to fit the PCB cutouts. the red line shows the result with interpolation. You can see that it’s much smoother. Using more points would help to give a good brightness correspondence between incandescent and LED lamps. Circuit description The circuit of the Dimmer Adaptor is shown in Fig.2. It is based around microcontroller IC1, a PIC12F617-I/P. The vehicle’s 0-15V instrument light dimming voltage is applied to CON1. This is reduced to a 0-5V signal by the 20kΩ/10kΩ resistive divider and filtered by the 100nF capacitor, then applied to pin 3 of IC1. This pin is its AN3 analog input and converts the 0-5V at that pin into a digital value of 0-1023 using its internal analog-to-digital converter (ADC). This is then used to control the duty cycle of the 7.8kHz pulse width modulated (PWM) waveform at its pin 5 output. The PWM signal is smoothed using an RC low-pass filter comprising a 100kΩ resistor and 100nF capacitor. This gives a voltage which is proportional to the PWM duty cycle, at pins 2 & 5 of dual CMOS op amp IC2. Half of this op amp, IC2b, buffers and amplifies the filtered PWM voltage. It has a gain of three, set by the ratio of the 20kΩ and 10kΩ feedback resistors, giving it a 0-15V output range, assuming that the supply voltage is high enough (otherwise, the upper limit is set by the supply voltage). The 100nF capacitor across its feedback resistor limits its output voltage slew rate to provide further filtering. The 0-15V signal from this op amp is fed to the “MOD OUT” terminal of CON2 via a 100Ω resistor, which isolates the op amp output from any external capacitance and also provides some protection in case of a short circuit or if a voltage is accidentally fed back via this pin. As mentioned earlier, the smoothed PWM signal is also fed to pin 2 of IC2a, which is the inverting input of the other half of the dual op amp. Fig.2: the Dimmer Adaptor circuit is based around microcontroller IC1, dual op amp IC2 and transistors Q1 & Q2. IC1 monitors the drive voltage to the instrument lights at its AN3 analog input (pin 3) and produces a PWM waveform at its output (pin 5). This is smoothed to give a varying DC voltage, and op amp IC1a drives transistors Q1 and Q2 to varying the head unit backlight drive voltage at DIM OUT. 72 Silicon Chip Australia’s electronics magazine siliconchip.com.au This op amp drives the base of NPN transistor Q1 via a 3.3kΩ/1kΩ voltage divider, with a 10µF capacitor helping to filter out any remnants of the PWM waveform. Since Q1 is configured as a common emitter amplifier, it has the effect of inverting the signal from IC2a, ie, if the voltage at the output of IC2a rises, Q1 conducts more current and so its collector voltage drops. Similarly, if the output voltage of IC2a falls, Q1 conducts less current and its collector voltage increases, pulled up towards the 12-15V supply voltage by the 470Ω resistor. This inverted voltage at the collector of Q1 is then buffered by emitterfollower Q2, with the resulting voltage fed to the “DIM OUT” terminal of CON2. The voltage at this point is also fed back to input pin 3 of IC2a, the non-inverting input, via another 20kΩ/10kΩ divider, to translate the 0-15V at the output back to 0-5V at this pin. The reason for this seemingly odd configuration is to control the current to the radio’s LED display, and therefore its brightness. The V+ terminal is connected to the supply voltage for this LED display, but the track feeding that voltage to it is cut and connected to the “DIM OUT” terminal instead. So how much current is conducted by Q2 determines the display brightness. The feedback goes to the non-inverting input of IC2a, and the control signal to the inverting input, simply because its output voltage is inverted by Q1. By swapping around the inputs, we ‘re-invert’ the way it operates, therefore giving it negative feedback so that its output will stabilise at the desired voltage, as determined by the filtered PWM signal. The 10µF capacitor at Q1’s base not only filters this signal further but also provides loop compensation, slowing down its response rate and thus preventing high-frequency oscillation due to the extra loop phase shift introduced by the two added transistors. Alternative PWM drive arrangement As we shall explain later, linear control of the head unit backlighting may not provide equal dimming between the LED display and switch backlighting. This can be solved by siliconchip.com.au Parts list – Head Unit Dimmer Adaptor 1 double-sided PCB coded 05107191, 77 x 47mm 1 UB5 Jiffy box (optionally with flanged lid) [Jaycar HB6016, Altronics HF0205] 1 3-way PCB-mount screw terminal, 5.08mm spacing (CON1) 2 2-way PCB-mount screw terminals, 5.08mm spacing (CON2) 1 8-pin DIL IC socket 1 SPST tactile momentary pushbutton switch (S1) [Altronics S1120, Jaycar SP0600] 9 M3 x 6mm panhead machine screws (for Q1 and PCB mounting) 1 M3 x 10mm panhead machine screw (for Q2) 2 M3 hex nuts 4 12mm long M3 tapped spacers 2 IP65 cable glands to suit 3-6.5mm diameter cable Automotive wire, solder, connectors, self-tapping screws etc Semiconductors 1 PIC12F617-I/P microcontroller programmed with 0510619A.HEX (IC1) 1 LMC6482AIN dual CMOS op amp (IC2) [Jaycar ZL3482] 1 LM2940CT-5.0 automotive 5V regulator (REG1) 1 BC639 500mA NPN transistor (Q1) 1 BD139 1.5A NPN transistor (Q2) 1 3mm high brightness red LED (LED1) 1 15V 1W zener diode (ZD1) [eg, 1N4744] Capacitors 1 100µF 16V PC electrolytic 1 22µF 16V PC electrolytic 1 10µF 16V PC electrolytic 1 470nF 63V MKT polyester 5 100nF 63V MKT polyester Resistors (all 0.25W, 1% metal film unless otherwise stated) 4 band code 5 band code 1 100kΩ brown black yellow brown or brown black black orange brown 3 20kΩ red black orange brown or red black black red brown 4 10kΩ brown black orange brown or brown black black red brown 1 3.3kΩ orange orange red brown or orange orange black brown brown 2 1kΩ brown black red brown or brown black black brown brown 1 470Ω 1W, 5% yellow violet brown gold or yellow violet black black gold 1 100Ω brown black brown brown or brown black black black brown 1 10Ω brown black black brown or brown black black gold brown 1 10kΩ multi-turn top adjust trim pot (VR1) [Bourns 3296W or similar] getting rid of this linear control and instead, switching the lights on and off rapidly, varying the duty cycle to control the brightness – ie, direct PWM control. This can easily be achieved by a few simple changes to the circuit. The feedback resistor from DIM OUT to pin 3 of IC2a is eliminated, and instead, it connects pin 3 to the +5V rail, as shown in Fig.2. Pin 3 of IC2a then has a constant voltage applied of around 1.66V (5V ÷ 3). The 100nF capacitor that filters the voltage at pin 2 of IC2a and the 10µF compensation capacitor at the base of Q1 are also removed. IC2a then acts as a comparator, and its output will go high when its pin 2 Australia’s electronics magazine voltage is below 1.66V and low when it is above 1.66V. When its output is high, Q1 switches on and pulls Q2’a base down, switching it off. And when its output is low, Q2’s based is pull up by the 470Ω resistor, switching it on. As a result, backlight current can flow whenever the pin 2 voltage is above 1.66V. Power supply The circuit is powered from the vehicle’s 12V ignition switched supply, which is wired to CON1. Power flows from there to the input of automotive 5V regulator REG1 via a 10Ω resistor. The resistor and 470nF decoupling capacitor filter out any voltage transients, reducing their amplitude August 2019  73 05107191 significantly by the time they reach REG1’s input. This LM2940CT-5.0 regulator is not damaged with a reversed supply connection or transient input voltage up to 55V for less than 1ms. Its output is stabilised by a 22µF filter capacitor. The resulting 5V supply powers microcontroller IC1. Dual op amp IC2 is powered from the nominally 12V supply via the same 10Ω resistor, but there is also a 15V zener diode (ZD1) across the supply, to protect the op amp from transient voltage spikes. This supply is also smoothed by a 100µF capacitor. Additional components Trimpot VR1 and pushbutton switch S1 are used to set the unit up. VR1 is connected across the 5V supply with its wiper going to pin 7, the AN0 analog input. IC1’s internal ADC can sense the voltage at this pin and thus Fig.3: the Dimmer Adaptor PCB is quite compact so it can fit inside the head unit, or a UB5 Jiffy box. The vehicle connections are on the left (CON1) while the head unit wires are connected on the right (CON2). Trimpot VR1 and tactile switch S1 are used to configure the unit. Once it has been set up, no further adjustments need to be made. sense the trimpot’s rotation. Test point TP2 is used to measure the voltage at pin 7 during the setup procedure, described below. VR1 is also used to set the unit’s response time once it has been set up, which will be explained in more detail later. S1 is connected between digital input GP1 (pin 6) of IC1 and GND. IC1 has an internal pull-up current enabled on this pin which usually keeps it high, at around 5V. When S1 is pressed, this pin is pulled low to 0V, changing the digital input state, and this is sensed by IC1. LED1 is used during setup and lights up when digital output GP5 (pin 2) is driven high. Its operating current is set to around 3mA by the 1kΩ series resistor ([5V - 2V] ÷ 1kΩ). A 10kΩ pull-up resistor between pin 4 of IC1 (MCLR) and the 5V supply prevents unwanted resets of the micro. Its internal power-on reset cir- Fig.4: as described in the text, the unit can optionally control the head unit display brightness using PWM at 7.8kHz. This may give better brightness matching between different display elements. This shows a typical output waveform (at DIM OUT) when the Dimmer Adaptor is used in this manner. 74 Silicon Chip cuitry ensures it starts up normally each time power is applied. Construction The Dimmer Adaptor is built on a double-sided PCB coded 05107191 which measures 77 x 47mm. This is sized to mount into a UB5 Jiffy box. The PCB overlay diagram shown in Fig.3 indicates which components go where. Start by fitting the smaller resistors. Their colour codes are shown in the parts list but it’s best to use a digital multimeter to double check their value as the colour bands can be easily misread. Once all the smaller resistors are in place, mount zener diode ZD1 with its cathode stripe facing as shown, then the larger 470Ω 1W resistor. Next, solder IC1’s socket in place, followed by IC2. While you could use a socket for IC2, it’s better to solder it directly to the PCB. Take care with the Fig.5: with VR1 set for 0-1V at TP2, the unit is in fast response mode. The cyan trace at the bottom shows a 12V step the input voltage, and you can see that the DIM OUT voltage (yellow) responds almost immediately, giving a response time of around 20ms, which is virtually unnoticeable. Australia’s electronics magazine siliconchip.com.au The track feeding power to the head unit front panel display lighing has been cut and wires soldered to either side, run to the V+ and OUT terminals of CON2 on the Dimmer Adaptor. orientation of both and be careful not to mix up the two ICs as they both have eight pins. Follow with tactile switch S1, which will only fit with the correct orientation. Make sure it’s pushed down fully before soldering its pins. REG1 can be now installed. It is mounted horizontally on the PCB. Bend its leads so they enter the PCB pads with the tab mounting hole lining up with the hole on the PCB. Secure it to the board with a 6mm M3 screw and nut before soldering the leads. Q2 also mounts horizontally, with its metal tab facing upwards. Secure it to the PCB using a 10mm screw and nut before soldering its leads The smaller MKT capacitors are next; these are not polarised. Follow by mounting transistor Q1. Gently bend its leads to fit the hole pattern on the PCB, then solder it with its flat face orientated as shown in Fig.3. Now fit trimpot VR1. It is 10kΩ and may be marked as either 10k or coded as 103. It is orientated with its adjustment screw toward LED1 (see Fig.3). Once that is in place, fit LED1. Its anode (longer lead) goes into the pad marked “A” on the PCB. Install it with its lens about 5mm above the PCB, so its upper surface is level with the top of VR1. The next job is to fit CON1 and CON2. CON2 can either be one fourway terminal block, or two 2-way terminal blocks dovetailed together. In both cases, make sure the wire entry holes are facing towards the nearest edge of the board and that the blocks are pushed down fully before soldering their pins. Now mount the polarised electrolytic capacitors. In each case, the longer lead goes into the pad marked with a + sign. Housing The Dimmer Adaptor could be fitted inside the head unit if there is room. Fig.6: with VR1 set for 1-2V at TP2, the unit is in intermediate response mode. Once again, the input (cyan) has a 12V step, and the output is shown in yellow. Note the smoother output ramp and the response time of around 70ms. This will better match the response time of small incandescent lamps. siliconchip.com.au Holes are required at each end of the box for cable glands, plus four in the base for the mounting pillars, as seen fitted here. Otherwise, you can mount it outside the head unit in a UB5 box. We used a flanged box that has an extended length lid with extra mounting holes, making it easier to mount under the dashboard. But you can use a standard UB5 box instead, or the unit can be wrapped in insulation and cable tied in position. To prepare the box, you need to drill holes for the cable glands at each end. There are cut-outs in the PCB to accommodate the gland nuts but note that the nuts need to be centred properly and orientated so that the sides are vertical to fit into these recesses. Having fitted the cable glands, slide the PCB into place and mark out the four mounting holes, then drill them to 3mm. Mount the PCB using the four 12mm tapped spacers and eight machine screws. If you want to make a label for the lid. The artwork can be downloaded from the SILICON CHIP website. Fig.7: setting VR1 for more than 2V at TP2 gives an even slower response (proportional to the voltage). Here we have set 4V at TP2, giving about 1/3 of a second between the input changing and the output voltage reaching its target value. The maximum delay is 400ms with TP2 at 5V. Australia’s electronics magazine August 2019  75 looking for a steady reading of around 7-10V. Our test head unit was marked as 9V, but we found that this was closer to 8V. This is the positive rail for the display lighting. Once you’ve found it, you need to open up the head unit itself and break the PCB track feeding this pin; it will likely This front panel artwork can be photocopied come from the output pin of a or, for a better result, downloaded from regulator before going to the siliconchip.com.au/shop/11/5061 and printed front panel connector. – see the text below for details. Confirm you have the right For a rugged label, print onto clear track with a continuity measurement overhead projector film (using film before cutting. suitable for your type of printer) as a The Dimmer Adaptor V+ terminal mirror image, so that the ink is on the on CON2 goes to the regulator output back of the film when the label is af- (ie, the driven side of the cut track), fixed. Attach it with clear silicone seal- while the DIM OUT terminal is wired ant (or grey if the box is black). to the section of the cut track going Alternatively, you can print onto to the front panel. The earlier photo an A4 sized synthetic ‘Dataflex’ sticky shows where we made our conneclabel for inkjet printers or a ‘Datapol’ tions. sticky label for laser printers. Note that while we have used tape For details see: siliconchip.com.au/ as a temporary measure to support Help/FrontPanels the wires, it will not hold for long. We recommend using dabs of neutral Installation cure silicone sealant (eg, roof and gutThe Dimmer Adaptor is supplied ter sealant) to hold the wires permawith power from the vehicle’s ignition- nently and secure in place. switched +12V wire plus a chassis conYou can run these two wires out of a nection for 0V. (Power could also be pre-existing hole on the head unit, or supplied from the head unit “power if there is no suitable hole, drill one. antenna” wire which is live when the You can seal it up with another squirt ignition is switched on). of silicone, and this will also prevent Both of these wires are accessible the wires from chafing or doing any at the rear of the head unit. Just make damage if they are bumped or pulled. sure the +12V wire you tap into is off Checking the dimming signal when the ignition is off. The vehicle’s instrument light dimThe unit controls the radio lighting ming wire then needs to be connected to follow any curve within the voltage to the Dimmer Adaptor input (labelled range of the circuit (0-15V). Basically, “IN” on CON1). That takes care of the you are defining a mathematical functhree wires to CON1. tion (curve) which maps the incomTo make the connections to CON2, ing voltage from the vehicle dimming you will also need to delve inside the circuitry to the output voltage, which radio head unit and find the main sup- controls the head unit brightness. ply for its display lighting. You can do Before going any further, connect this using a multimeter. your DMM (still on a low DC volts Most aftermarket head units have a range) between TP1 and GND and detachable front panel and the power verify that the voltage varies as you for the panel backlighting is fed to it adjust the vehicle’s instrument dimvia a multi-pin connector, so you can ming control. find the backlighting power pins by You should get a varying reading on probing these pins. your meter regardless of whether the Set your multimeter to its 20V range vehicle’s dimming is linear or PWM(or slightly higher, if it doesn’t have based. Note though that if the vehia 20V range) and connect the black cle’s dimming is PWM based and uses probe to chassis or some other con- a frequency well below 100kHz, you venient 0V point. may need to increase the value of the Probe the head unit front panel pins, 100nF capacitor connected to pin 3 76 Silicon Chip Australia’s electronics magazine of IC1 (in the lower left corner of the PCB) to give smooth dimming. For example, you could use a 10µF electrolytic capacitor if you find your vehicle uses 1kHz PWM (positive to the top) or 100µF for a 100Hz PWM frequency. Many multimeters have a frequency measurement function, so it’s a good idea to check the dimming frequency now. Set-up procedure The unit needs to be calibrated to provide an appropriate light output from the head unit over the vehicle’s instrument dimming range. In other words, we want its brightness to match that of the other instruments as they are dimmed. Entering set-up mode clears any previous configuration. So the unit needs to be set up from scratch each time. The set-up procedure is best done when it is dark; if you have a garage, you can sit in the car with the door closed and the lights off. Otherwise, you will need to wait until night time. To enter the programming mode, press and hold S1 as you are switching the ignition on. (Note: you don’t need to start the engine and indeed, if you are in a garage or other confined space, you should not do so.) When you release S1, LED1 will flash once to indicate that the Dimmer Adaptor is ready to be set up. Switch on the radio head unit and turn on your parking lights or headlights, then set the dash lights to their highest brightness. The unit is set up by successively dimming the dashboard lamps using the vehicle’s dimmer, then adjusting VR1 on the unit to give a similar brightness on the radio head unit. S1 is then pressed to store this data point. Several different levels can be programmed, and the micro then generates a piecewise linear curve by interpolating between each step. The input voltage must start at the highest voltage and progressively drop for each successive voltage point that is saved. This is why you need to set the dash lights to maximum brightness to start. Adjust VR1 to give the desired head unit display brightness to match your maximum brightness instrument lights. Then press S1. LED1 should flash off twice, indicating the next value to be programmed is at point 2. siliconchip.com.au Then dim the instruments a little and adjust VR1 for a similar dimming on the head unit. Press S1 to program it in. You can program up to 16 brightness values, although you don’t have to program that many. One thing to keep in mind during the set-up procedure is that you probably want the head unit display to operate at full brightness during the day, when your headlights (and thus instrument lights) are off. When this is the case, there will be no voltage at the unit’s input. So once you have reached minimum instrument brightness, switch off the lights and adjust VR1 to maximum (or your desired display brightness setting for daytime use) and press S1 to set the final stored value for this situation. Once you’ve finished programming in all the brightness steps, switch off the ignition. When you switch it on again, without pressing S1, the Dimmer Adaptor will dim the head unit display as programmed, and provide full brightness when the parking or headlights are off. Switching to PWM control If you find that some of the display LEDs do not dim to the same level as others, or the alphanumeric display does not dim at a similar rate to the switch illumination LEDs, it may be that there are fewer or more LEDs connected in series, causing the mismatch in brightness with dimming voltage. This can be cured by converting the Display Dimmer Adaptor to produce a variable duty cycle switch mode output drive to the radio head unit SILICON CHIP display panel instead of a DC voltage, as explained above in the circuit description. Having made this change, you will need to repeat the setup procedure, but otherwise, the unit will operate in substantially the same manner. Making these changes is easy. Cut the thin track on the bottom of the PCB, between two rectangular blocks, near the MOD terminal of CON2 (shown as a red line in Fig.3). Then solder a component lead offcut between the two nearby empty pads, shown as a red line in Fig.3. Finally, remove the 100nF capacitor below REG1 and immediately to the left of the 3.3kΩ resistor, and the 10µF electrolytic capacitor. Fig.4 shows a typical waveform at the DIM OUT terminal of CON2 when the unit is operating in PWM mode. Using VR1 to adjust dimming speed Once the unit has been set up, trimpot VR1 can then be adjusted to give either fast, smooth or delayed dimming of the head unit display. The main reason for providing these options is so you can have the head unit display dimming match the brightness of incandescent lamps that may be used in the instrument cluster. These can take time to change brightness due to thermal inertia in the lamps. Each time you adjust VR1, press S1 to have this new adjustment take effect. LED1 will light to indicate that VR1’s position has been read. Note that you don’t have to press S1 if you adjust VR1 when the unit is off, ONLINESHOP Using this unit as a Voltage Modifier The separate output at CON2 labelled MOD OUT allows the Dimmer Adaptor to be used as a voltage modifier. So if you have a sensor output that varies over a specific voltage range, but want to change that range (eg, to suit an ECU which expects a different type of sensor or to change a vehicle’s throttle response), you can use this design to do just that. There are many automotive uses for a Voltage Modifier. As this unit lets you program the output voltage for a series of different input voltages, and then linearly interpolates between them, you can build up an input/output voltage map quite easily. If you need a more comprehensive and fully featured Voltage Modifier, then see our Automotive Sensor Modifier design in the December 2016 issue (siliconchip.com.au/Article/10451). as VR1’s position is read at power-up. When VR1 is adjusted so that the voltage at TP2 is below 1V, the unit will adjust its output brightness as soon as it notices a change in the input voltage, giving virtually no delay. This is demonstrated in Fig.5. When VR1 is set for a voltage of 1-2V at TP2, the output voltage will change more smoothly and more slowly. In this mode, the output changes in small increments over time until it reaches the required voltage; see Fig.6. This rate is even slower if VR1 is adjusted for 2-5V at TP2, as shown SC in Fig.7. . . . it’s the shop that never closes! 24 hours a day, 7 days a week . . . it’s the shop that has all recent SILICON CHIP PCBs – in stock . . . it’s the shop that has those hard-to-get bits for S ILICON C HIP projects . . . it’s the shop that has all titles in the S ILICON C HIP library available! . . . it’s the shop where you can place an order for a subscription (printed or on-line) from anywhere in the world! . . . it’s the shop where you can pay on line, by email, by mail or by phone Browse online now at www.siliconchip.com.au/shop siliconchip.com.au Australia’s electronics magazine August 2019  77