Feed aggregator

How To Program A Really Cheap Microcontroller

Hackaday - 8 hours 3 minก่อน

There are rumors of a cheap chip that does USB natively, has an Open Source toolchain, and costs a quarter. These aren’t rumors: you can buy the CH552 microcontroller right now. Surprisingly, there aren’t many people picking up this cheap chip for their next project. If there’s no original projects using this chip, no one is going to use this chip. Catch 22, and all that.

Like a generous god, [Aaron Christophel] has got your back with a working example of programming this cheap chip, and doing something useful with it. It blinks LEDs, it writes to an I2C display, and it does everything you would want from a microcontroller that costs a few dimes.

The CH552, and its friends the small CH551 all the way up to the CH559, contain an 8051 core, somewhere around 16 kB of flash, the high-end chips have a USB controller, there’s SPI, PWM, I2C, and it costs pennies. Unlike so many other chips out there, you can find SDKs and toolchains. You can program the chip over USB. Clearly, we’re looking at something really cool if someone writes an Arduino wrapper for it. We’re not there yet, but we’re close.

To program these chips, [Aaron] first had to wire up the microcontroller into a circuit. This was just a bit of perf board, a resistor, a few caps, and a USB A plug. That’s it, that’s all that’s needed. This is a fairly standard 8051 core, so writing the code is relatively easy. Uploading is done with the WCHISPTool software, with options available for your favorite flavor of *nix.

But it gets better. One of the big features of the CH552 is USB. That means no expensive or weird programmers, yes, but it also means the CH552 can emulate a USB HID device. The CH552 can become a USB keyboard. To demo this, [Aaron] programmed a CH552 board (DE, here’s the Google translatrix) loaded up with touch pads and LEDs to become a USB keyboard.

If you don’t feel like soldering up one of these yourself, there are some suppliers of CH554 dev boards, and the files for [Aaron]’s projects are available here. Check out the videos below, because this is the best tutorial yet on programming and using some very interesting chips that just appeared on the market.

A Lightweight AVR IDE

Hackaday - 11 hours 3 minก่อน

It’s entirely possible to do your coding in vim or emacs, hammering out hotkeys to drive the interface and bring your code to life. While working in such a way has its charms, it can be confronting to new coders, and that’s before even considering trying to understand command line compiler settings. The greenhorn coder may find themselves more at home in the warm embrace of an IDE, and [morrows_end] has now built one for those working with AVR assembly code.

The IDE goes by the name of Simple AVR IDE, or savr_ide for short. Programmed in C++ with the FLTK widget library, [morrows_end] has tested it on Windows XP, but notes that it should successfully compile for Linux, Unix, and even MacOS too.

All the basic features are there – there’s syntax highlighting, as well as integration with the AVRA assembler and AVRDUDE for programming chips. It’s a tool that could make taking the leap into assembly code just that little bit easier.  For another taste of bare metal coding, check out [Ben Jojo]’s discussion of x86 bootloaders.

App note: Securing vibration motor leads and wires

dangerous prototype - 12 hours 2 minก่อน

App note from Precision Microdrives on how to properly connect wires on to vibration motors for reliability. Link here

Vibration motors require electrical power, which must be delivered by wires or PCB tracks to the motor. Precision Microdrives vibrating motors are available in a range of connector forms. From stock, they are available with factory installed leads, terminals, PCB solder pins, or as PCB SMT / SMD options. Solder pins and SMT motors have the advantage of being mounted directly onto the PCB which simplifies the connection process.

Lilbits 350: TCL’s folding smartphone plans revealed (maybe)

Liliputing - อาทิตย์, 02/17/2019 - 22:56

If Chinese electronics company TCL may be better known in the US for its TVs than its smartphones, that’s because the company doesn’t use its own name on phones sold in the US. But if you buy a recent BlackBerry smartphone anywhere other than India, you’re probably using a device manufactured by TCL. The company […]

The post Lilbits 350: TCL’s folding smartphone plans revealed (maybe) appeared first on Liliputing.

Infinity Icosahedron Is Difficult To Contemplate Even Looking Right At It

Hackaday - อาทิตย์, 02/17/2019 - 22:00

Cubes and pyramids are wonderful primitive three-dimensional objects, but everyone knows that the real mystical power is in icosahedrons. Yes, the twenty-sided polyhedron does more than just ruin your saving throws in tabletop RPGs – it can also glow and look shiny in your loungeroom at home.

[janth]’s build relies on semitransparent acrylic mirrors for the infinity effect, lasercut into triangles to form the faces of the icosahedron. The frame is built out of 3D printed rails which slot on to the acrylic mirrors, and also hold the LED strips. [janth] chose high-density strips with 144 LEDs per meter for a more consistent effect, and added frosted acrylic diffusers to all the strips for a clean look with less hotspots from the individual LEDs.

An ESP32 runs the show, and the whole assembly is epoxied together for strength. The final effect is very future disco, and it’s probably against medical advice to stare at it for more than 5 minutes at a time.

The infinity effect is a popular one, and we’ve seen a beautiful cube build by [Heliox] in recent times. Of course, if you do manage to build an actual portal through time and space, and not just a lamp that looks like one, be sure to send us a tip. Video after the break.

App note: Vibration Motors – Voltage Vs Frequency Vs Amplitude

dangerous prototype - อาทิตย์, 02/17/2019 - 20:00

All about vibration motors and how its frequency and amplitude be controlled in this app note from Precision Microdrives. Link here

We’re often asked how to adjust the vibration amplitude or frequency of our various vibration motors. In this article, we’ll look at how simple it is, why it can be useful, and how we can predict the behaviour of a motor using the driving voltage and Typical Performance Characteristics graph.

Command Line Utilities… in the Cloud?

Hackaday - อาทิตย์, 02/17/2019 - 19:00

Although many people think of Linux-based operating systems as graphical, really that GUI is just another application running over the bare operating system. Power users, remote administrators, and people running underpowered computers like a Raspberry Pi have a tendency to do more with command line tools. [Igor] did a FOSDEM19 presentation you can see below about how he’s providing web-like services to the command line using web servers and curl as a client.

This is subtly different from just accessing an ordinary web server via curl. The output is meant for display in the terminal. Of course, you could also hit them with a web browser, if you wanted — at least, for some of them. [Igor’s] tools include a weather reporter, a QR code encoder, information and graphs for currency and cybercurrency rates, and an online help system for programmers.

This has similar benefits — and drawbacks — to a normal cloud service. Invocation is simple. To get the current weather, for example:

curl wttr.in

Produces this:

You can, of course, pass arguments to set a different location and other options.

Some of the tools have pretty impressive graphics outputs for console tools. Of course, there’s nothing magic about curl. You can easily use something like wget if you arrange for its output to go to the console.

[Igor] has promised a framework is forthcoming to help create these kinds of services. Honestly, we could just as easily see using any of a dozen other protocols to do the same thing and unless there is a compelling reason to have things on the cloud, we aren’t sure these services are particularly great other than as examples. But we can see using the technique to serve centralized data out to terminal sessions, for example. As an example of what other protocols can do, try this:

telnet towel.blinkenlights.nl

[Igor] doesn’t have a monopoly on curl-friendly services like this. Try:

curl http://ifconfig.co

If you are a big fan of the command line, why not put one on your Arduino? If you start juggling lots of commands, maybe checkout Marker.

Identifying a 3D Printer From a 3D Print

Hackaday - อาทิตย์, 02/17/2019 - 16:00

A TV crime show I saw recently centered on the ability of forensic scientists to identify a plastic bag as coming from a particular roll: it’s all down to the striations, apparently. This development isn’t fiction, though: researchers at the University of Buffalo have figured out how to identify the individual 3D printer that produced a particular print. The development, called PrinTracker, uses unique differences in the way a printer lays down print material to identify a printer with a claimed 94 percent accuracy.

The researcher behind PrinTracker is [Wenyao Xu], associate professor in the Department of Computer Science and Engineering at the University of Buffalo. He presented the details at a conference in October of 2018 (PDF link) and described how it works. In the study, they printed keys on 14 different printers, then examined each print with a high-powered microscope. In particular, they scanned the print to examine the banding and attachment textures of the print. Banding is the texture on the surface of the model created by the filament being laid down, which is created by the feed rate, temperature, and shape of the outlet of the printing head. The attachment texture is the way that layers are attached to each other. When they examined the sample prints, they found that, after some image analysis and number crunching, they could identify which printer had produced the print with a decent level of statistical accuracy.

It’s an interesting read for those who want to understand how this sort of analysis works. [Xu] speculates that it might be useful for law enforcement in firearms and counterfeiting cases, and the paper also looks at if techniques like scratching or heating a print might obfuscate the identification.

Thanks for the tip, [Sascho]!

Calling World Cup Goals Before They Happen, By Polling a Betting Site

Hackaday - อาทิตย์, 02/17/2019 - 13:00

[Ben] made an interesting discovery during the FIFA World Cup in 2018, and used it to grant himself the power to call goals before they happened. Well, before they happened on live TV or live streaming, anyway. It was possible because of the broadcast delay on “live” broadcasts, combined with the sports betting industry’s need for timely and detailed game state tracking.

He discovered that a company named Running Ball provides fairly detailed game statistics in digital form, which are generated from inside the stadium as events occur. An obvious consumer of this data are sports betting services, and [Ben] found a UK betting site that exposed that information in full inside their web app. By polling this data, he measured a minimum of 4 seconds between an event (such as a goal) being reported in the data and the event occurring on live TV. The delay was much higher — up to minutes — for live streaming. [Ben] found it quite interesting to measure how the broadcast delay on otherwise “live” events could sometimes be quite significant.

Knowing broadcast delays exist is one thing, but it’s a neat trick to use it to predict goals before they occur on “live” television. This isn’t the first time we’ve seen evidence of [Ben]’s special interest in data and using it in unusual ways; he once set up a program to play Battleship over the Border Gateway Protocol (BGP), making it very probably the first board game played over BGP.

The Magnetic Rubik’s Cube

Hackaday - อาทิตย์, 02/17/2019 - 10:00

Ernő Rubik has much to answer for when it comes to the legacy of his namesake cube. It has both enthralled and tormented generations, allowing some to grandstand in the playground while others are forced to admit defeat in the face of a seemingly intractable puzzle. It just so happens that [Tom Parker] has been working on a Rubik’s cube with a novel magnetic design.

Yes, that’s right – [Tom]’s cube eschews the traditional rotating and sliding mechanism of the original cube, instead replacing it all with magnets. Each segment of the cube, along with the hidden center piece, is 3D printed. Through using a fused deposition printer, and pausing the print at certain layers, it’s possible to embed the magnets inside the part during the printing process.

[Tom] provides several different versions of the parts, to suit printers of different capabilities. The final cube allows both regular Rubik’s cube movements, but also allows for the player to cheat and reassemble it without having to throw it forcefully against the wall first like the original toy.

It’s an interesting build, and a great one to get to grips with the techniques involved in embedding parts in 3D prints. It may not be capable of solving itself, but we’ve seen another build that can pull off that impressive feat. Video after the break.

Drones Rain Down Rat Poison on the Galapagos

Hackaday - อาทิตย์, 02/17/2019 - 07:00

If your favorite movie is Ratatouille, now would be a good time to read a different article. Rats on the Galápagos Islands are an invasive species and eradication is underway. This is not a first for the islands, and they are fiercely protected since they are the exclusive home to some species including the distinctive tortoise from which the island derives its name and of course finches. Charles Darwin studied the finches while writing On the Origin of Species. So yeah, we want to keep this island from becoming unbalanced and not disturb the native wildlife while doing it. How do we check all these boxes? Technology! Specifically, hexacopters carrying rat poison.

The plan is simple, drive a truck to a central location, release the hounds drones and fifteen minutes later they come back after flying high above the indigenous wildlife and dropping pest control pellets. The drones save time and labor, making them a workhorse rather than a novelty. This work experience on their resume (CV) could open the door to more dirty work or more wholesome activities. Who is to say that the same drones, the exact same ones, couldn’t deliver plant seeds, or nourishing food to the dwindling species harmed by the rat population explosion.

What would you deliver with drones? How about providing parcels or just learning a better way to navigate?

Via IEEE Spectrum.

Biodegradable Implants Supercharge Nerve Regeneration

Hackaday - อาทิตย์, 02/17/2019 - 04:00

Controlled electrical stimulation of nerves can do amazing things. It has been shown to encourage healing and growth in damaged cells of the peripheral nervous system which means regaining motor control and sensation in a shorter period with better results. This type of treatment is referred to as an electroceutical, and the etymology is easy to parse. The newest kid on the block just finished testing on rat subjects, applying electricity for one, three, or six days per week in one-hour intervals. The results showed that more treatment led to faster healing. The kicker is that the method of applying electricity was done through unbroken skin on an implant that dissolves harmlessly.

The implant in question is, at its most basic, an RFID tag with leads that touch the injured nerves. This means wireless magnetic coupling takes power from an outside source and delivers it to where it is needed. All the traces on are magnesium. There is a capacitor with silicon dioxide sandwiched between magnesium, and a diode made from a doped silicon nanomembrane. All this is encased in a biodegradable substrate called poly lactic-co-glycolic acid, a rising star for FDA-approved polys. Technologically speaking, these are not outrageous.

These exotic materials are not in the average hacker’s hands yet, but citizen scientists have started tinkering with the less invasive tDCS and which is applying a small electrical current to the brain through surface electrodes or the brain hacking known as the McCollough effect.

Via IEEE Spectrum.

Build Your Own Dial-up ISP With A Raspberry Pi

Hackaday - อาทิตย์, 02/17/2019 - 01:00

The bing-bongs, screeches, and whiirings of a diai-up modem are long forgotten now. For good reason. Dial up was slow, and if you’re one of those unlucky people reading this and waiting for the animated gif above this paragraph to load, you have our condolences. But still, nostalgia. It bit [Doge Microsystems] hard, and now there’s a dial-up ISP on [Doge]’s desk.  Why? For fun, probably, and if you’re going to retrocompute, you might as well go the whole way.

The setup for this astonishing feat of dial-up networking is an ISA modem inside a ‘lunchbox’ computer running what is probably Windows 98. The ‘homebrew POTS’ system is a SIP ATA (which is most certainly obsolete and out of stock, but this one will get you close), and a Raspberry Pi clone running Asterisk.  There’s a serial modem and a USB to serial adapter involved, and a PPP daemon running on the Pi clone answers the incoming call, negotiates authentication, and does the NAT. It’s a networking geek’s dream.

As for what good this is, anyone who asks the question is missing the point entirely. Dial up is slow, horrible, and there’s a reason we don’t use it anymore. However, and there’s always a however, if you’re developing your own serial modem hardware for some weird project, I guess this setup would come in handy. If you’d like to test out a wooden modem, this is the setup for you. Yes, it’s ancient technology no one wants anymore, but that’s how you do it if you want.

Lego Monorail From Your 3D Printer

Hackaday - เสาร์, 02/16/2019 - 22:00

If you had to guess the age of a person hailing from a country in which Lego is commonly available, you might very well do it by asking them about the Lego trains available in their youth. Blue rails or grey rails, 4.5, 9, or 12 volt power, and even somewhat unexpectedly, one rail or two. If that last question surprises you we have to admit that we were also taken aback to discover that for a few years in the 1980s everybody’s favourite Danish plastic construction toy company produced a monorail system.

[Mike Rigsby] had a rather ambitious Christmas display to produce, and as part of it included a pair of reindeer, Rudolph and Bluedolph, atop freight cars on a loop of Lego monorail. He didn’t just use classic Lego parts off-the-shelf, instead he recreated the system in its entirety on his 3D printer; locomotive, rolling stock, and all. In a simlar way tot he original his locomotive sits between the two freight cars, each container housing a pair of AA batteries which together power the unit.

The Lego system isn’t perhaps a classic monorail, in that it involves a four-wheeled vehicle that is guided by a central rail rather than sitting upon it. Drive comes from teeth on the side of the rail which mesh with a gear on the power car. There have been 3D-printable sections of it available as add-ons for owners of classic sets for a while, but this may be the first printable locomotive and train. The Christmas novelty aspect of it all may be a little past its sell-by date here in February, but it’s still worth a look as a potential source of parts for any project that might require a linear rail system.

Perhaps surprisingly we’ve never featured a monorail before, though we have brought you a MagLev.

Lilbits 349: The 5G smartphones are coming

Liliputing - เสาร์, 02/16/2019 - 21:12

Mobile World Congress is a little more than a week away, and we’ll likely see new phones from companies including Samsung, Huawei, HMD (Nokia), and others, as well as other devices (Microsoft, for example, is expected to introduce its next-gen HoloLens mixed reality headset). It’s likely that we’ll also hear a lot about 5G. Next-gen […]

The post Lilbits 349: The 5G smartphones are coming appeared first on Liliputing.

How Do You Etch Something You Can’t Move?

Hackaday - เสาร์, 02/16/2019 - 19:00

We probably don’t need to tell this to the average Hackaday reader, but we’re living in a largely disposable society. Far too many things are built as cheaply as possible, either because manufacturers know you won’t keep it for long, or because they don’t want you to. Of course, the choice if yours if you wish to you accept this lifestyle or not.

Like many of us, [Erik] does not. When the painted markings on his stove become so worn that he couldn’t see them clearly, he wasn’t about to hop off to the appliance store to buy a new one. He decided to take things into his own hands and fix the poor job the original manufacturers did in the first place. Rather than paint on new markings, he put science to work and electroetched them into the metal.

Whether or not you’ve got a stove that needs some sprucing up, this technique is absolutely something worth adding to your box of tricks. Using the same methods that [Erik] did in his kitchen, you could etch an awesome control panel for your next device.

So how did he do it? Despite the scary multisyllabic name, it’s actually quite easy. Normally the piece to be etched would go into a bath of salt water for this process, but obviously that wasn’t going to work here. So [Erik] clipped the positive clamp of a 12 V battery charger to the stove itself, and in the negative clamp put a piece of gauze soaked in salt water. Touching the gauze to the stove would then eat away the metal at the point of contact. All he needed to complete the project were some stencils he made on a vinyl cutter.

We’ve previously covered using electricity to etch metal in the workshop, as well as the gorgeous results that are possible with acid etched brass. Next time you’re looking to make some permanent marks in a piece of metal, perhaps you should give etching a try.

[via /r/DIY]

CNC Tellurion Lets You See the Earth and Moon Dance

Hackaday - เสาร์, 02/16/2019 - 16:00

Kids – they’re such a treasure. One minute you’re having a nice chat, the next minutes they’re testing your knowledge of the natural world with a question like, “Why can we see the Moon during the day?” And before you know it, you’re building a CNC Earth-Moon orbital model.

We’ve got to applaud [sniderj]’s commitment to answering his grandson’s innocent question. What could perhaps have been demonstrated adequately with a couple of balls and a flashlight instead became an intricate tellurion that can be easily driven to show the relative position of the Earth and Moon at any date; kudos for anticipating the inevitable, “Where was the moon when I was born, Grampa?” question. The mechanism is based on the guts of a defunct 3D-printer, with the X-, Y-, and Z-axis steppers now controlling the Earth’s rotation and tilt and the Moon’s orbit respectively, with the former extruder drive controlling the tilt of the Moon’s orbital plane. A complex planetary gear train with herringbone gears, as well as a crossed-shaft helical gear set, were 3D-printed from PLA. The Earth model is a simple globe and the Moon is a ping-pong ball; [sniderj] is thinking about replacing the Moon with a 3D-printed bump-map model, a move which we strongly endorse. The video below shows the tellurion going through a couple of hundred years of the saros at warp speed.

There’s just something about machines that show the music of the spheres, whether they be ancient or more modern. And this one would be a great entry into our 3D-Printed Gears, Pulleys, and Cams contest too.

You Are Your Own Tactile Feedback

Hackaday - เสาร์, 02/16/2019 - 13:00

[Maurin Donneaud] has clearly put a lot of work into making a large flexible touch sensitive cloth, providing a clean and intuitive interface, and putting it out there for anyone to integrate into their own project.. This pressure sensing fabric is touted as an electronic musical interface, but if you only think about controlling music, you are limiting yourself. You could teach AI to land a ‘copter more evenly, detect sparring/larping strikes in armor, protect athletes by integrating it into padding, or measure tension points in your golf swing, just to name a few in sixty seconds’ writers brainstorming. This homemade e-textile measures three dimensions, and you can build it yourself with conductive thread, conductive fabric, and piezoresistive fabric. If you were intimidated by the idea before, there is no longer a reason to hold back.

The idea is not new and we have seen some neat iterations but this one conjures ideas a mile (kilometer) a minute. Watching the wireframe interface reminds us of black-hole simulations in space-time, but these ones are much more terrestrial and responding in real-time. Most importantly they show consistent results when stacks of coins are placed across the surface. Like most others out there, this is a sandwich where the slices of bread are ordinary fabric and piezoresistive material and the cold cuts are conductive strips arranged in a grid. [Maurin] designed a custom PCB which makes a handy adapter between a Teensy and houses a resistor network to know which grid line is getting pressed.

If you don’t need flexible touch surfaces, we can help you there too.

Via Hackster.

This Kerosene Lantern Becomes A Compact Bioreactor

Hackaday - เสาร์, 02/16/2019 - 10:00

A bioreactor is a useful thing to have in any biology lab. Fundamentally, it’s a tank in which biological activity can be nurtured and controlled. [The Thought Emporium] needed a visual aid for an upcoming video on bioluminescent bacteria, but figured a single test tube full of the little critters just wasn’t visually striking enough. Thus began the build to turn a kerosene lantern into a full-featured bioreactor.

The ideal bioreactor for the project needed to be visually appealing, biologically safe, and to have the possibility for continuous operation. First, the lantern’s base was sealed with aluminium plate and silicone sealant. The top was then fitted with a plastic plug, which contained passthroughs for air and fluid feeds, UV LEDs for luminescence tests, as well as potential sterilization purposes. Wiring was neatly passed through the arms of the lantern, and an air pump hidden in the top. A battery compartment was also installed so the reactor can be portable, even when fully loaded.

The bioreactor was first filled with highlighter ink, and the UV lights switched on, confirming that the reactor does look the part when filled with glowing fluid. Then, it was flushed with hydrogen peroxide, before being refilled with growth medium and an E. Coli strain which produces a fluorescent red protein. Growth was successful, and there are future plans to use the bioreactor for other projects, too.

It goes without saying that it’s important to take the proper precautions when hacking on biological projects, lest you inadvertently create the zombie virus and take down half the population of the eastern seaboard. Regardless, it’s an impressive build that showcases various techniques for working with biological matter that may not be familiar to the home hacker. If you’re looking for more automation for your home biology hacks, perhaps the OpenLH project may interest you. Video after the break.

[Thanks to Baldpower for the tip!]

This Home Made Power Hacksaw Cuts Quick And Clean

Hackaday - เสาร์, 02/16/2019 - 07:00

If you’re cutting metal in the workshop, you’re likely using a table-mounted cutoff saw, or perhaps a bandsaw for finer work. The power hacksaw is an unwieldy contraption that looks and feels very old fashioned in its operation. Despite the drawbacks inherent in the design, [Emiel] decided to build one that operates under drill power, and it came out a treat.

The build uses a basic battery powered drill as its power source. This is connected to a shaft which rotates a linkage not dissimilar to that seen on steam locomotives, but in reverse. The linkage in this case is turning the rotational motion of the drill into linear motion of the hacksaw, which moves along a metal rail, guided by a 3D printed bearing.

With a body of plywood and plastic moving parts, this might not be your tool of choice for high-volume, fast paced work. However, as [Emiel] notes, it’s faster than doing it by hand, and it was a fun build that by and large, used what was already lying around the workshop. It’s not the first time we’ve seen a powered hacksaw use 3D printed parts, either. Video after the break.

 

Syndicate content