Vista Normal

Hay nuevos artículos disponibles. Pincha para refrescar la página.
AnteayerSalida Principal

Open Source Universal ROM Programmer Grows Up

17 Noviembre 2024 at 03:00

When we first looked at [Anders Nielsen’s] EEPROM programmer project, it was nice but needed some software and manual intervention and had some limitations on the parts you could program. But through the magic of Open-Source collaboration, revision 2 of the project overcomes all of these limitations and—as you can see in the video below—looks very polished.

If you recall, the programmer is in a “shield” format that can plug into an Arduino or — if you prefer a retrocomputer — a 6502uno. Along with hardware improvements from the community, [Henrik Olsson] wrote Python software to handle the programming (see the second video below).

The biggest change in the new version is that you don’t have to configure the voltages with jumpers anymore. This was required because different devices draw power on different pins, but a clever two-transistor circuit lets the software handle it. There is still one jumper for switching between 32-pin and 28-pin EEPROMs. The extra transistors added four cents to the total price, although if you buy the kit from [Anders], it is still $9, just like before.

Skimming the database, we don’t see any Microcontrollers (MPUs). However, it looks like the device should be able to program flash MPUs, too.

We covered the first edition of this project, and we were impressed even then. We do hope people will add MPUs and other devices like PALs to the project over time.

WiFi Status Indicator Keeps Eye on the Network

Por: Tom Nardi
16 Noviembre 2024 at 09:00

These days, most of us take the instant availability of a high-speed link to the Internet for granted. But despite all of the latest technology, things still occasionally go pear-shaped — meaning that blistering fiber optic connection you’ve got to the world’s collected knowledge (not to mention, memes) can still go down when you need it the most.

After suffering some connectivity issues, [Arnov Sharma] decided to put together a little box that could alert everyone in visual range to the status of the local router. It won’t fix the problem, of course, but there’s a certain value to getting timely status updates. Using a 3D printed enclosure and a couple of custom PCBs, the build is fairly comprehensive, and could certainly be pressed into more advanced usage if given the appropriate firmware. If you’ve been thinking of a Internet-connected status indicator, this is certainly a project worth copying studying closely.

The aptly named “Wi-Fi Status Box” uses two PCBs: one to hold the Seeed Studio XIAO ESP32C3 microcontroller and four WS2812B addressable LEDs, and another that plays host to the IP5306 power management IC.

That latter board in particular is something you may want to file away for a future project, as it not only handles charging lithium-ion batteries such as common 18650 cells, but it also features an LED “fuel gauge” and the ability to boost the output power to 5 VDC with relatively few external components.

As for the firmware on this one, it’s simplicity itself. The goal is to see if the router has gone down, so all the code does is check every ten seconds to see if the ESP32 is still able to connect to the given wireless network. If the connection is good the LEDs are green, but if the link fails, they flip over to red. Combined with a printed front panel that uses transparent filament to soften the glow of the LEDs, and you’ve got an attractive way of knowing when it’s time to panic.

Too obvious for you? Perhaps you’d prefer this version that uses an analog multimeter to display when the net drops out.

RISC-V Pushes 400 Million Forth Words Per Second

16 Noviembre 2024 at 00:00

We’ll be honest. Measuring Forth words per second doesn’t seem like a great benchmark since a Forth word could be very simple or quite complex. But we think the real meaning is “up to 400 million words per second.” There was a time when that level of performance would take a huge computer. These days, a simple board that costs a few bucks can do the trick, according to [Peter Forth] in an online presentation.

The key is the use of the Milk V Duo and some similar boards. Some of these look similar to a Raspberry Pi Pico. However, this chip on board has two RISC V cores, an ARM core, and an 8051. There’s also an accelerator coprocessor for vector operations like AI or video applications.

[Peter] has some popular Forth systems ported to the machine on GitHub. This might be the easiest way to get started because, as he mentions in the video, the documentation for these boards leaves something to be desired. However, these chips have a lot of capability for a small price.

We like Forth. If you want something that is less of a port, we’ve seen some native RISC V implementations.

Cheap Sensor Changes Personality

11 Noviembre 2024 at 06:00

If you want to add humidity and temperature sensors to your home automation sensor, you can — like [Maker’s Fun Duck] did — buy some generic ones for about a buck. For a dollar, you get a little square LCD with sensors and a button. You even get the battery. Can you reprogram the firmware to bend it to your will? As [Duck] shows in the video, you can.

The device advertises some custom BLE services, but [Duck] didn’t want to use the vendor’s phone app, so he cracked the case open. Inside was a microcontroller with Bluetooth, an LCD driver, a sensor IC, and very little else.

The processor is an ARM Cortex M0, a PHY6222 with very low power consumption. The LCD is a very cheap panel with no drivers onboard. All the drive electronics are on the PCB. The sensor is a CHT8305C which uses I2C.

Luckily, the PHY6222 has a publically available SDK with English documentation. The PCB has two sets of UART pads and it is possible to flash the chip via one of the UARTs.

Eventually, [Duck] put a custom firmware on the box, but we were intrigued by the idea that for a buck you could get a little low-power ARM module with an LCD and a sensor. It seems like you could do more with this, although we are sure the LCD is not very general purpose, surely this little box could act as a panel meter, a countdown timer, or lots of other things with some custom firmware.

These are, of course, knock offs of the slightly more expensive Xiaomi sensors, and those are flashable, too. We aren’t sure how accurate either sensor is, but humidity measurement is a complex topic.

DIY Digital Caliper Measures Up

9 Noviembre 2024 at 00:00

You might wonder why [Kevin] wanted to build digital calipers when you can buy them for very little these days. But, then again, you are reading Hackaday, so we probably don’t need to explain it.

The motivation, in this case, was to learn to build the same mechanism the commercial ones use for use in precise positioning systems. We were especially happy to see that [Kevin’s] exploration took him to a Hackaday.io project which led to collaboration between him and [Mitko].

The theory behind the mechanism is simple but does get into some ugly-looking trigonometry. Electrically, you feed eight sine waves with different phases into the assembly and measure the phase of the signal you receive.

Pulse density modulation is sufficient for the driving signals. The math is a bit more complex, but nothing you can’t do with a modern CPU. To set the correct parameters, a PC-based test setup allowed different runs to determine the best parameters for the final implementation.

Of course, the whole thing still needs some packaging to use as either a practical pair of calipers or for unrelated positioning duty. But it does work and it should be straightforward to adapt it for any purpose.

We’ve looked inside calipers before. If you are only making measurements with calipers one way, you may be missing out.

Teaching a Pi Pico E-Ink Panel New Tricks

8 Noviembre 2024 at 09:00

We’ve noticed that adding electronic paper displays to projects is getting easier. [NerdCave] picked up a 4.2-inch E-ink panel but found its documentation a bit lacking when it came to using the display under MicroPython. Eventually he worked it out, and was kind enough to share with the rest of the class.

These paper-like displays draw little power and can hold static images. There were examples from the vendor of how to draw some simple objects and text, but [NerdCave] wanted to do graphics. There was C code to do it, but it wasn’t clear how to port it to Python.

The key was to use the image2cpp website (we’ve used it before, but you can also use GIMP). Instead of C code, though, you get the raw bytes out and place them in your Python code. Once you know the workflow, it isn’t that hard, and this is an inexpensive way to add a different kind of display to your projects. The same image conversion will help you work with other displays, too.

We aren’t sure what driver chip this particular display uses, but if you have one with the UC8151/IL0373, you can find some amazing MicroPython drivers for those chips.

M.2 Makes An Unusual Microcontroller Form Factor

Por: Jenny List
3 Noviembre 2024 at 12:00

When we think of an m.2 slot in our laptop or similar, it’s usually in the context of its PCI connectivity for high-speed applications such as solid state disks. It’s a connector that offers much more than that interface though, making it suitable for some unexpected add-ons. As an example [MagicWolfi] has produced an m.2 card which contains the equivalent of a Raspberry Pi Pico.

The board itself has the familiar m.2 edge connector at the bottom, and the RP2040 GPIO lines as postage-stamp indentations round the edges. On the m.2 front is uses the USB interface as well as a UART and the I2C lines, as well as some of the interfaces we’re less familiar with such as ALERT, WAKE, DISABLE1/2, LED 1/2, and VENDOR_DEFINED.

On one level this provides a handy internal microcontroller card with which you can do all the things you’d expect from a Pi Pico, but on another it provides the fascinating possibility of the Pico performing a watchdog or other function for the host device. We would be genuinely interested to hear more about the use of the m.2 slot in this way.

If you’d like to know more about m.2, we’ve taken a look at it in more depth.

An SAO for Hams

21 Octubre 2024 at 14:00

Generally speaking, the Hackaday Supercon badge will always have a place for SAO (rebranded as “Supercon add-ons”), and that makes sense. We did originate them, after all. This year, though, we’ve gone all in on SAO, and, in particular, we’ve asked to see more SAOs with communication capabilities. The standard has always had an I2C bus, but few people use them. I decided I wanted to set an example and cook up a badge for Supercon. Was it hard? Yes and no. I’ll share with you a little about the board’s genesis and the issues I found. At the end, I’ll make you a special offer, if you are going to Supercon.

The Idea

The front of the SAOGNR — the SAO connector is, of course, on the back

I’ve been a ham radio operator for a very long time. In fact, July was my 47th anniversary in the radio hobby. Well, that’s not true. It was my 47th year with a license. I had been listening to shortwave long before then. So, I wanted to do something with Morse code. You don’t have to know Morse code to get a license these days, but a lot of hams enjoy it.

I set out to do a simple board that would play some Morse code messages. But that’s just another blinking light LED with a buzzer on it, too. So, naturally, I decided it would also provide Morse code output for the I2C host. That is, the SAO could be used to convert ASCII to Morse code. Sounds simple, right? Sure.

Getting Started

I wanted to use a Raspberry Pi Pico but didn’t want to violate the SAO size requirements. Luckily, there’s an RP2040-Zero module that is quite tiny and looks more or less like a normal Pico. The two big differences are plusses: they have a reset button, and instead of a normal LED, they have a WS2812b-style LED.

Using that let me not worry about a lot of overhead on the board. Sure, it costs a few bucks more, so if you were mass-producing something, that’s not so good. But for this, it was perfect. I only had to add a speaker with a little transistor driver, which is probably unnecessary, four more WS2812B LEDs, and the SAO connector.

I was going to add a button, but I remembered from last year there is a way to use the BOOTSEL button on the module as a normal button, so I decided to cut a corner there. I could have shrunk the board, but I wanted some area for a protyping area and some cool silk screen, since I’m not artistic enough to come up with a nice outline for the board, so I kept the board full-size which is a lot of space.

The only strange thing is that the RP2040-Zero has parts on both sides, so it needs a cutout in the board. No problem. KiCAD didn’t have a good footprint for it that I could find, so I switched over to EasyEDA. They have handy integration with the parts you can get, too, so it is easy to price your board and even buy them already put together if you like.

While I waited for the boards, I decided to grab a similar Pico board and prototype the software. However, in the middle of this, I got a disturbing e-mail.

The Boards are Wrong?

The Chinese board house sent me a note: they were not sure the LEDs were connected properly. I checked, and I double-checked. They looked OK to me. I bravely asked them to build the boards as specified and went back to prototyping.

I’m not always a fan of Python, but we have a history of doing badges in Python so people can easily hack them. So I decided to stick to MicroPython. Getting the code and other features to work was a piece of cake. There is something surreal about using regular expressions to filter comments out of a file on a little microprocessor.

I2C Woe

Once I had the main features working, I set out to do the I2C when I realized an unpleasant fact. The Micropython library has I2C classes so you can host an I2C device. It does not have code that lets you be an I2C device yourself. CircuitPython apparently supports this, but I was in no mood to move the code over. Had I realized it going in, I might have made a different choice.

Luckily, an online forum had some code that directly manipulated the chip’s I2C registers and I was able to adapt that. If you are thinking of building an SAO with I2C capabilities, this is something to check before you go too far.

I stuck with the simple protocol that just lets me receive I2C commands because that’s all I needed, but there were examples of going further. For my project, I created the I2CTarget class. You tell the constructor which I2C bus you want to use, what pins you want to map to, and the I2C address you want to use. There are defaults for all of that.

Once it is running, you can check to see if data is available (call any()) and then read that data (get()). Don’t forget that reading data will block, so if you don’t want to block, check to see if anything is available first. The I2C hardware on the chip has a small FIFO, so that’s fine for this project.

I did create a subclass that allows an I2C object to act like a menu in the code. The menu object normally gets input from the user, but using this little trick lets the I2C commands fake user input.

The Boards Arrive

The board came in, as boards tend to do. I changed a few I/O pins in my code and… big sigh of relief, the LEDs were fine. A few tweaks on the code and the SAO was complete.

I left you all the files and documentation over on Hackaday.io. Maybe I went a little overboard with the documentation. You can decide. The source code is on GitHub, but you’ll find the link on the IO page.

Special Offer

Do you want one? Well, all the design files are there. Fire up your favorite way to etch boards or order them from your favorite board house. It wouldn’t be that hard to point-to-point wire one or put one on a breadboard except for the SAO connector, of course.

However, I have a deal for you. I have a limited number of these and will have them at Supercon. Find me — I’m easy to find since I mostly hang out at the soldering challenge table — and show me some code you propose to run that either uses the SAO or runs on the SAO. If I have any left, I’ll give you one, but when I’m out, I’m out. So, to be on the safe side, maybe make your own and bring it anyway.

I2C the Hard Way

21 Octubre 2024 at 11:00

[Igor] has an AS5600 magnetic rotary encoder chip on a breakout board. Normally, you’d think that was an easy device to work with since it has an I2C interface. But [Igor] wanted to do it the hard way. What’s the hard way? By hand. He directly manipulates the clock and data lines using some push buttons. You can see how it goes in the video below.

This is possible because the controlling device — in this case [Igor] — gets to set the clock rate, and there’s no reason it has to be regular. We have to admit that it never occurred to us to do this, but we have written “bit banged” I2C-like code before.

The practical value of this isn’t clear, but we were still impressed. Certainly, if you had to write code or build hardware to operate the protocol, this would tell you quickly if you understood the fundamentals. We wonder if his next trick will be RS232 via Morse code key.

If you want a deep dive into the world of I2C, we can help with that. This reminded us of the old “paperclip computer book” that showed how to make your own computer with oatmeal boxes and paperclips. You just had to do the work of the CPU yourself.

❌
❌