Using A Vending Machine Bill Acceptor With Arduino

We’ve all seen, and occasionally wrestled with, bill acceptors like the one [Another Maker] recently liberated from an arcade machine. But have you ever had one apart to see how it works? If not, the video after the break is an interesting peak into how this ubiquitous piece of hardware tells the difference between a real bill and a piece of paper.

But [Another Maker] goes a bit farther than just showing the internals of the device. He also went through the trouble of figuring out how to talk to it with an Arduino, which makes all sorts of money-grabbing projects possible. Even if collecting paper money isn’t your kind of thing, it’s still interesting to see how this gadget works on a hardware and software level.

As explained in the video, a set of belts are used to pull the bill past an array of IR LEDs. The hardware uses these to scan the bill and perform some dark magic to determine if it’s a genuine piece of currency. [Another Maker] notes that these readers actually need to receive occasional firmware updates to take into account new bill designs. In fact, the particular unit he has is so out of date that it won’t accept modern $5 bills; which may explain how he got it for free in the first place.

Years ago we saw one of these bill acceptors used to make a DIY Bitcoin ATM. Of course back then, a few bucks would get you a semi-reasonable amount of BTC. These days you would skip the paper currency and do it all digitally.

Continue reading “Using A Vending Machine Bill Acceptor With Arduino”

Hackaday Links: November 17, 2019

Friday, November 15, 2019 – PASADENA. The 2019 Hackaday Superconference is getting into high gear as I write this. Sitting in the Supplyframe HQ outside the registration desk is endlessly entertaining, as attendees pour in and get their swag bags and badges. It’s like watching a parade of luminaries from the hardware hacking world, and everyone looks like they came ready to work. The workshops are starting, the SMD soldering challenge is underway, and every nook and cranny seems to have someone hunched over the amazing Hackaday Superconference badge, trying to turn it into something even more amazing. The talks start on Saturday, and if you’re not one of the lucky hundreds here this weekend, make sure you tune into the livestream so you don’t miss any of the action.

The day when the average person is able to shoot something out of the sky with a laser is apparently here. Pablo, who lives in Argentina, has beeing keeping tabs on the mass protests going on in neighboring Chile. Huge crowds have been gathering regularly over the last few weeks to protest inequality. The crowd gathered in the capital city of Santiago on Wednesday night took issue with the sudden appearance of a police UAV overhead. In an impressive feat of cooperation, they trained 40 to 50 green laser pointers on the offending drone. The videos showing the green beams lancing through the air are quite amazing, and even more amazing is the fact that the drone was apparently downed by the lasers. Whether it was blinding the operator through the FPV camera or if the accumulated heat of dozens of lasers caused some kind of damage to the drone is hard to say, and we’d guess that the drone was not treated too kindly by the protestors when it landed in the midsts, so there’s likely not much left of the craft to do a forensic analysis, which is a pity. We will note that the protestors also trained their lasers on a police helicopter, an act that’s extremely dangerous to the human pilots which we can’t condone.

In news that should shock literally nobody, Chris Petrich reports that there’s a pretty good chance the DS18B20 temperature sensor chips you have in your parts bin are counterfeits. Almost all of the 500 sensors he purchased from two dozen vendors on eBay tested as fakes. His Github readme has an extensive list that lumps the counterfeits into four categories of fake-ness, with issues ranging from inaccurate temperature offsets to sensors without EEPROM that don’t work with parasitic power. What’s worse, a lot of the fakes test almost-sorta like authentic chips, meaning that they may work in your design, but that you’re clearly not getting what you paid for. The short story to telling real chips from the fakes is that Maxim chips have laser-etched markings, while the imposters sport printed numbers. If you need the real deal, Chris suggests sticking with reputable suppliers with validated supply chains. Caveat emptor.

A few weeks back we posted a link to the NXP Homebrew RF Design Challenge, which tasked participants to build something cool with NXP’s new LDMOS RF power transistors. The three winners of the challenge were just announced, and we’re proud to see that Razvan’s wonderfully engineered broadband RF power amp, which we recently featured, won second place. First place went to Jim Veatch for another broadband amp that can be built for $80 using an off-the-shelf CPU heatsink for thermal management. Third prize was awarded to a team lead by Weston Braun, which came up with a switch-mode RF amp for the plasma cavity for micro-thrusters for CubeSats, adorably named the Pocket Rocket. We’ve featured similar thrusters recently, and we’ll be doing a Hack Chat on the topic in December. Congratulations to the winners for their excellent designs.

Cheap Multimeter Leads Come With Extra Ohms, Free!

[Nop head] discovered that cheap multimeter leads costing only a few bucks can come with more than one may have bargained for. The first set had a large amount of useful-looking attachments, but the wires used for the leads were steel with a resistance of about one ohm each. With two leads in use, that means any resistance measurement gets two ohms added for free. More seriously, when measuring current, the wires can heat up rapidly. Voltage measurements would be affected the least, but the attachments and lead design expose a large amount of bare metal, which invites accidental shorts and can be a safety hazard with higher voltages.

Are all cheap multimeter leads similarly useless? Not necessarily. [nop head] also purchased the set pictured here. It has no attachments, but was a much better design and had a resistance of only 64 milliohms. Not great, but certainly serviceable and clearly a much better value than the other set.

It’s usually not possible to identify garbage before it’s purchased, but [nop head] reminds us that if you do end up with trash in hand, poor quality counterfeits can be good for a refund. That goes for electronic components, too.

What Good Are Counterfeit Parts? Believe It Or Not, Maybe A Refund

[Charles Ouweland] purchased some parts off Aliexpress and noticed that the Texas Instruments logo on some of his parts wasn’t the Texas Instruments logo at all, it was just some kind of abstract shape that vaguely resembled the logo. Suspicious and a little curious, he decided to take a closer look at the MCP1702 3.3v LDO regulators he ordered as well. Testing revealed that they were counterfeits with poor performance.

Left: counterfeit part. Right: genuine Microchip MCP1702-3302

Looking at the packages, there were some superficial differences in the markings of the counterfeit MCP1702 versus genuine parts from Microchip, but nothing obviously out of place. To conclusively test the devices, [Charles] referred to Microchip’s datasheet. It stated that the dropout voltage of the part should be measured by having the regulator supply the maximum rated 250 mA in short pulses to avoid any complications from the part heating up. After setting up an appropriate test circuit with a 555 timer to generate the pulses for low duty cycle activation, [Charles] discovered that the counterfeit parts did not meet Microchip specifications. While the suspect unit did output 3.3 V, the output oscillated badly after activation and the dropout voltage was 1.2 V, considerably higher than the typical dropout voltage of 525 mV for the part, and higher even than the maximum of 725 mV. His conclusion? The parts would be usable in the right conditions, but they were clearly fakes.

The usual recourse when one has received counterfeit parts is to dump them into the parts bin (or the trash) and perhaps strive to be less unlucky in the future, but [Charles] decided to submit a refund request and to his mild surprise, Aliexpress swiftly approved a refund for the substandard parts.

While a refund is appropriate, [Charles] seems to interpret the swift refund as a sort of admission of guilt on the part of the reseller. Is getting a refund for counterfeit parts a best-case outcome, evidence of wrongdoing, or simply an indication that low value refund requests get more easily approved? You be the judge of that, but if nothing else, [Charles] reminds us that fake parts may be useful for something perhaps unexpected: a refund.

Is That Part A Counterfeit? Here Are A Few Pointers

If you order an electronic component, how do you know what it is you are receiving? It has the right package and markings, but have you got the real thing from the original manufacturer or have you got an inferior counterfeit? We hear so much about counterfeit parts, and sometimes the level of effort put in by the fraudsters is so high that from either a visual or electrical standpoint they can be hard to spot.

[Robb Hammond] writes for Aeri, with an extremely interesting guide to some of the cues for spotting a counterfeit semiconductor part. In doing so he gives us something of an insight into the techniques used by the fraudsters.

The first feature of a package to be examined are the indents. Relabeled chips often have their old markings sanded off and a coating applied to simulate the surface of an unmolested chip, and this coating can either obliterate or partially fill any indentations. Using comparison photos we are shown discernable hidden indents, and partially filled indents.

We’re shown textures and paints, and how markings can sometimes be shown as counterfeit by washing with solvent. A Cypress-marked part is found to be a cheaper Altera one under the paint, and other parts are shown with misaligned markings and markings placed over indents. Wildly varying countries of origin are claimed while seemingly retaining the same batch codes, an impossibility confirmed by manufacturers.

If you order your parts from legitimate distributors then it’s likely that what you receive will be the genuine article. However with the popularity of online auction sites and online bazaars the possibility has become ever more likely of being left with a counterfeit. Knowing some of these tips might just make the difference between the success or failure of your work, so it’s an interesting read.

Have you had any dodgy parts on your bench? Tell us about them in the comments. Meanwhile, it’s a subject we’ve covered before.

Via Hacker News.

A Guidebook To The World Of Counterfeit Parts

We’ve all experienced it: that sinking feeling you get when you’ve powered up your latest circuit and nothing happens. Maybe you made a mistake in your design or you shorted something while soldering. It’s even possible that ESD damaged one of your chips. All of these issues and more are possible, maybe even inevitable, when designing your own hardware.

But what if your design is perfect and your soldering skills beyond reproach? What if your shiny new device is DOA but you’ve done everything right? A fascinating report by [Yahya Tawil] makes the case that it’s increasingly possible that you’ve run across a counterfeit component. While it’s still relatively unlikely the hobby hacker is going to get bit by the counterfeit bug, the figures and examples referenced in his report may surprise you.

One of these is an ATmega328, the other is literal garbage.

[Yahya] points to a number of government studies on the rising scourge of counterfeit components, and the numbers are rather surprising. For example, the U.S Department of Commerce conducted a study between 2005 and 2008 where over 50% of respondent manufacturers and distributors had encountered counterfeit components. Another estimate claims that up to 15% of the semiconductors purchased by the Pentagon are counterfeit, presenting a serious risk to national security.

But how exactly does one counterfeit a microcontroller or transistor? Interestingly, in the vast majority of cases, old chips are pulled from recycled circuit boards and new labels are written over the original. Sometimes the forgery is as simple as changing the date code on the component or up-rating its capability (such as labeling it military spec when it isn’t), but in some cases chips with the same package will be labeled as something else entirely. Other tricks are decidedly low-tech: the documentation for the device may list functions and capabilities which it simply does not possess, artificially raising its value.

The report is a worthwhile read, even for those of us who may not be purchasing components in the same quantities as the Pentagon. It may make you think twice before you click “Buy” on that shady site with the prices that seem to good to be true.

Counterfeit components certainly seem to be on the rise from where we’re sitting. We’ve covered a number of other studies on this increasingly common trend, as well as first hand accounts ranging from successful recoveries to frustrating failures.

Let’s Play Spot The Fake MOSFET

Recently, the voice push to talk circuit in [Ryan]’s BITX40 radio was keyed down for a very long time. Blue smoke was released, a MOSFET was burnt out, and [Ryan] needed a new IRF510 N-channel MOSFET. Not a problem; this is a $1 in quantity one, but shipping from Mouser or Digikey will always kill you if you only buy one part at a time. Instead, [Ryan] found a supplier for five of these MOSFETs for $6 shipped. This was a good deal and a bad move because those new parts were fakes. Now we have an opportunity to play spot the fake MOSFET and learn that it’s all about the supply chain.

Spot the fake

To be fair to the counterfeit MOSFET [Ryan] acquired, it probably would have worked just fine if he were using his radio for SSB voice. [Ryan] is using this radio for digital, and that means the duty cycle for this MOSFET was 100% for two minutes straight. The fake got hot, and the magic blue smoke was released.

Through an industry contact, [Ryan] got a new, genuine IRF510 direct from Vishay Semiconductors. This is a fantastic opportunity to do a side-by-side comparison of real and counterfeit semiconductors, shown at right. Take a look: the MOSFET on the left has clear lettering, the one on the right has tinned leads and a notched heatsink. [Ryan] posed the question to a few Facebook groups, and there was a clear consensus: out of 37 votes, 21 people chose the MOSFET on the left to be genuine.

The majority of people were wrong. The real chip looked ugly, had tinned leads, and a thinner heatsink. The real chip looked like a poor imitation of the counterfeit chip.

What’s the takeaway here?  Even ‘experts’ — i.e. people who think they know what they’re talking about on the Internet — sometimes don’t have a clue when it comes to counterfeit components. How can you keep yourself from being burned by counterfeit components? Stick to reputable resellers (Mouser, Digikey, etc) and assume that too good to be true is too good to be true.