EEVblog 1491 - The MacGyver Project - Part 1 - Page 1
Forum section: electronics / general

author: EEVblog
author_rank: Unknown
timestamp: August 05, 2022, 12:11:37 pm
content: Part 1 reverse engineering the interface on the LED display of the Banshee Ultrasonic gas leak detector to make a MacGyver type countdown timer THING (for demonetisation purposes).This will be a choose your own adventure project, I don't have anything planned, so let me know what you want to see!

author: Per Hansson
author_rank: Unknown
timestamp: August 05, 2022, 01:30:45 pm
content: I think seeing this multiplexed and running on a Raspberry Pi Pico (ARM RP2040 MCU) would be the most interesting, it can also then possibly make use of the infrared sensors to be able to set the countdown time "remotely"DiodeGoneWild did a video on a ring tester where he shows multiplexing via a Attiny24 that some might find interesting:https://youtu.be/QBbEYYWiBI8?t=523

author: Kleinstein
author_rank: Super Contributor
timestamp: August 05, 2022, 02:03:31 pm
content: The LED on the Q7 output limits the signal voltage available to drive the next stage. So one may have to use blanking, not just for the visual, but just to make it shift to the 2nd chip.The on resistance of the 74HC chips goes up with less supply voltage. With low enough a supply (likely somewhere in the 2.5-3 V range) the LED current should be at a reasonable level (like 5 mA) so that the chip can atually drive it. To still get a valid logic level for the next stage, something like a diode in the common cathode line may be a good idea.So the easiest way is likely a reduced supply voltage.Driving external shift registers is a bit odd with discrete logic. So the logic choice for the control would some kind of µC. Which one to a large part which ones are actually available. Many of the modern ones are ok with some 2.5 - 3 V.

author: Ivan7enych
author_rank: Regular Contributor
timestamp: August 05, 2022, 04:12:35 pm
content: Crazy idea - count a number of segments in a microcontroller, multiply it by required current per led (3-6mA), and set it into DAC driven current source.Second idea - to use a tuned fixed voltage on a common cathode, and use internal output resistance of 74HC chips as a simple current regulation for each led. But there will be a large thermal dependence...

author: Fungus
author_rank: Super Contributor
timestamp: August 05, 2022, 04:54:33 pm
content: Quote from: Per Hansson on August 05, 2022, 01:30:45 pmIt'll be an awful lot easier to do on an Arduino where the pins can drive LEDs directly.

author: nhenry
author_rank: Newbie
timestamp: August 05, 2022, 10:45:33 pm
content: Maybe simpler version, use the CC connection to show the segment and use the shift register as one bit pass through all the segments one at a time.In other words, set the first output to the ON state and after keep the data line to OFF state and just send the clock to move across the displays.And when you want to show the segment send the signal to the CC connection.

author: BrianHG
author_rank: Super Contributor
timestamp: August 06, 2022, 12:59:13 am
content: Quote from: Kleinstein on August 05, 2022, 02:03:31 pmI've seen this before and had to deal with it sometimes.So long at the total output current doesn't exceed the diving IC's max VCC current, plus some headroom, you can get away with a constant display brightness (except the decimal points which may be brighter) by placing a 'constant voltage' on the LEDs CC input VS the serial shift register's VCC.2 ways of doing this, as mentioned above, use a lower VCC voltage, or drive the CC input with a constant regulated voltage held above GND with a PNP emitter follower amp with the base set to something like ~1.5v-2v.Also, when filling the shift registers, turning off the CC will give your the un-loaded Q7 data output line feeding the next shift register, especially if the supply voltage is only 3.3v. This is also you display blanking period during display update.

author: Bud
author_rank: Super Contributor
timestamp: August 06, 2022, 01:14:26 am
content: It is Great that we are in the middle of chip shortage times, so hopefully there will be no stupid "Just use an FPGA" comments how to proceed with this project.

author: Per Hansson
author_rank: Unknown
timestamp: August 06, 2022, 07:11:23 am
content: Quote from: Fungus on August 05, 2022, 04:54:33 pmYes of course but the question in the video was also about using something that has not been covered a million times already.I think the Pico would be a good choice, mainly because it is not that popular so you can actually still buy it in today's component shortage!

author: rob77
author_rank: Super Contributor
timestamp: August 06, 2022, 07:27:40 am
content: Quote from: Ivan7enych on August 05, 2022, 04:12:35 pmno, that's not crazy.. most probably that's the way how they did it.. but except a DAC they just adjust the PWM duty cycle on the common cathode. so something like.. turn off the common cathode, shift out the segments, count the 1s during shiftout , adjust PWM duty cycle and spit out that PWM till the next display update.

author: G7PSK
author_rank: Super Contributor
timestamp: August 06, 2022, 07:32:35 am
content: Thinking about the name, it reminds me of the Manhattan project and something from Los Alamos. So it should just be called "The Device". The finnishe device should also produce a ticking noise.

author: EEVblog
author_rank: Unknown
timestamp: August 06, 2022, 11:10:51 am
content: Quote from: nhenry on August 05, 2022, 10:45:33 pmYes, that is what I was thinking, just use it as a 40:1 mux. This is how it must be working in the original design, only one segment is on at a time.

author: EEVblog
author_rank: Unknown
timestamp: August 06, 2022, 11:12:35 am
content: Quote from: Kleinstein on August 05, 2022, 02:03:31 pmYes, I mentioned this in the video. I'm sure they are blanking it when shifting. And I'm willing to bet they are only turning on one LED at a time.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 06, 2022, 03:05:49 pm
content: Rather than using the shift registers as SPI, it would be easier to clock a 1 and "walk" it through with the current sink switching on as needed to light the segment, a 2 transistor current sink will work nicely. That would be a perfect use of a PIO block in the Raspberry Pi Pico, or an interrupt driven routine on some other microcontroller will also work.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 06, 2022, 03:35:48 pm
content: For low current operation as needed battery operation a simple 1 segment at a time mode may work.Battery powered would also prefer low voltage. There are 2 temperature effects: some -2 mV/K from the LED forward voltage (with LEDs the exact number can be a little different, but still the same order of magnitude) and than some +6000 ppm/K temperature coeffcient for the MOSFET R_on. These 2 effect have an opposite sign and may compensate if the votlage drop is small (e.g. 150-200 mV).It may be worth a look at directly dirving a LED from a 74HC... gate with reduced supply voltage.For high brightness, to get outdoor visibilty one would need to operate at least 2 channels of the HC164 at the same time to use the full 50 mA it can deliver and not just 1 channel. With a relatively high current the HC164 R_on could at least help with current charing for 1 digit. So one could run 1 digit at a time, possibly with a variable time depending on the number.

author: iMo
author_rank: Super Contributor
timestamp: August 06, 2022, 04:55:46 pm
content: Quote from: EEVblog on August 06, 2022, 11:10:51 amYep, that is how it works, most probably..You "multiplex" through single segments, that means - in order to show full 8.8.8.8.8. you have to send 40 times the "full load of 40 serial bits into the shift registers", always with only a single 1 in the serial word (ON), all other bits 0.A single segment should be, say, 1/25/40=1ms ON with full current (or you may limit the current as you like - as only 1 segment will be active at a time).

author: AndyBeez
author_rank: Frequent Contributor
timestamp: August 08, 2022, 02:51:35 pm
content: That's an interesting LED display design. Curious the designer specified 5 digits; most jellybean displays are 2,4,6 and 8 digitsI would have expected something like a single MAX7219 segment driver - which only needs data and clock, and does the MUX and supply for upto 8 digits. Data:https://www.maximintegrated.com/en/products/power/display-power-control/MAX7219.htmlThere is also the cheapo TM1637 four/six digit modules with similar data and clock inputs. Example use:https://os.mbed.com/components/TM1637-LED-controller-48-LEDs-max-Keyboa/It's a pity Nixie tubes are too big to fit the apeture. I was wondering if 14 segment alpha numeric displays could be used instead? This would give the 'bangshee' the chance to display TICK TICK BOOM and other motivational messages.Either way, a facinating artefact that should not be left unattended in a built up area. Cue MacGyver theme.

author: microphonon
author_rank: Newbie
timestamp: August 08, 2022, 03:19:08 pm
content: If anyone is interested, there is a completely open-source acoustic leak detector (sensor board) that just launched on Crowd Supply:https://www.crowdsupply.com/microphonon/aquapingLet me know if you have any comments or questions!

author: thm_w
author_rank: Super Contributor
timestamp: August 08, 2022, 09:23:23 pm
content: Quote from: AndyBeez on August 08, 2022, 02:51:35 pmThese are just single digit displays:https://www.digikey.ca/en/products/detail/broadcom-limited/HDSP-U113/2219397

author: JustMeHere
author_rank: Frequent Contributor
timestamp: August 09, 2022, 12:13:05 am
content: I'd love to see the countdown timer from Goldfinger in there, but where's the challenge in that.

author: Peabody
author_rank: Super Contributor
timestamp: August 09, 2022, 02:41:32 am
content: I think it will actually work, with acceptable brightness range, if you multiplex by segment two segments at a time. By that I mean shift out the values of the A and B segments for all five digits in one 40-clock shift. The values for the other 5 (or 6) segments will be zero. Then when you turn on the transistor, each 164 will output up to 25mA on its A output, and up to 25mA on its B output, with the total output for the chip being 50mA. These are rough values, but they don't do violence to the 164's absolute maximums, particularly if you can control the value of Vcc. The transistor needs to be able to sink up to 250mA, which should be no problem.Then you would shift out the values for segments C and D, and so forth. So each segment would be lit a bit less than 25% of the time - a little less because of the time required to do the shifting. But if you could leave the segments on for, say, 5ms per pair, the shifting time burden wouldn't be all that great as a percentage - the shifts can be really fast.This would reduce the amount of shifting you'd have to do. And my guess is that the brightness would be ok - nothing too noticeably dimmer than anything else, no matter how many segments are lit up.Once you have the values of the individual five digits, I think the rest of the system could be implemented with discrete chips. You could shift out the value of the digit to a 164, and shift out the AND pattern for the two segments you are driving into another 164. Then run the former through a CD4056 7-segment decoder, then AND that output with the second 164 output selecting the segments, and latch that output into an HC165 parallel load shift register, which shifts out the final product. Having done five bytes, you would change the AND value to pick new segments, and do the same value bytes again. After the four AND patterns have been completed, you start over. But of course, you would actually do all this with a microcontroller.

author: Neutrion
author_rank: Frequent Contributor
timestamp: August 09, 2022, 07:30:12 pm
content: Are there also ideas needed regarding the aim of the repurposing, or only abouth the ways the display should be driven?

author: thm_w
author_rank: Super Contributor
timestamp: August 09, 2022, 08:58:44 pm
content: Quote from: Neutrion on August 09, 2022, 07:30:12 pmSure, he mentioned motion detection, varying countdown speed, in the video.Power wise I prefer: USB port or cable hidden under the cap, usual cheap charge module, and some salvaged lithium rechargeables.

author: Fungus
author_rank: Super Contributor
timestamp: August 10, 2022, 06:46:22 am
content: Quote from: thm_w on August 09, 2022, 08:58:44 pmThese work freakishly well for motion detection:https://www.aliexpress.com/wholesale?SearchText=RCWL-0516(I have no idea how they do it, it's just a tiny PCB, but they definitely work...)

author: Bud
author_rank: Super Contributor
timestamp: August 11, 2022, 04:54:18 pm
content: Doppler effect based.