A 7400 frequency counter, on perfboard

p-IMG_0405-600

jaeblog published a new build:

I like perfboard, especially the ones with plated trough holes. But I also like SMD components, and more and more fun IC’s are not available in DIP. So a while ago I designed some perfboard with 1.27mm pitch, making some SMD parts like SOIC stuff easy to prototype on it, and also mix THT and SMD stuff.
Looking for a nice little project to build on it, I came across a frequency counter made with 7400 logic, perhaps not the most efficient approach, but a fun one at that. I made a few changed to the design, partly because of some components I already had like the 74HC160 and 4543 (yes, not 7400 but still logic :P) and partly to improve on the design, for example by adding a 10Mhz oscillator instead of a NE555 as the clock source. The current end result looks like this, a case is ordered and a follow up post will be made when the project is nicely tucked away in a case.

More details on Just another electronics blog.

First look at JQ6500 modules

For some time, on different chinese webstores (for example Banggood) there is a module called JQ6500 for sale:

jq6500-001 jq6500-002

it’s often described as a voice sound module or as an MP3 player sound module.

Actually JQ6500 is the name of the main chip hosted on the module:

jq6500-003

The chip is manufactured by a Chinese company named JQ. A datasheet for the chip is also available, unfortunately only in Chinese (but Google Translate can help to understand what it contains).

On the other side of the PCB, the module houses two additional integrated circuits:

  • a 16Mbit flash memory (25L1606E)
  • a 3W audio amplifier (HXJ 8002)

When you connect the module to your computer via USB, it is detected as a CDROM drive. If you browse the content of the CD, you can find the MusicDownload.exe application that allows to upload audio files in the flash memory:

jq6500-rec-007

The software is in Chinese but its use is very simple: by moving to the second tab you can select the MP3 files to be uploaded. If you now move back to the initial tab, you can start the upload process clicking on the only available button. In the video at the end of this post you can see how it works…

You can control the JQ6500 chip in different ways. The easiest one is using external buttons connected to pins K1-2-3-4-5:

jq6500-004

When you press a button, the chip plays the corresponding audio file. For example if you press the button connected to pin K1, the chip plays the audio file named 001.mp3.

The onboard amplifier (HXJ 8002) is a mono IC and its output is connected to pin SPK+ and SPK-. You can therefore connect to those pins a small speaker. If you want a stereo audio, you can instead use pins ADL_L (left channel) and ADC_R (right channel) and connect them to an external amplifier.

Conclusions

This module is an excellent and inexpensive solution to add audio to your projects. The use of an internal flash memory has the advantage of not requiring SD cards or other media to store your audio files; in contrast its capacity (16Mbit = 2MByte) makes it more suitable to reproduce sound effects / guide voices than to make a music player.

In the next articles I will show you how to interface the module with Arduino … meanwhile here is a video showing my first tests:

 

 

 

App note: Fundamentals of operation and recent developments of class D amplifiers

an_maxim_AN3977

Good read about class D amplfiers from MAXIM Integrated. Link here (PDF)

A Class D amplifier’s high efficiency makes it ideal for portable and compact high-power applications. Traditional Class D amplifiers require an external lowpass filter to extract the audio signal from the pulse-width-modulated (PWM) output waveform. Many modern Class D amplifiers, however, utilize advanced modulation techniques that, in various applications, both eliminate the need for external filtering and reduce electromagnetic interference (EMI). Eliminating external filters not only reduces board-space requirements, but can also significantly reduce the cost of many portable/compact systems.

App note: Avoid overvoltage stresses by minimizing power supply pumping on single-ended output, class D audio amplifiers

an_maxim_AN4260

Here’s class D audio amplifier pumping remedy from MAXIM Integrated, power-supply pumping is a problem that occurs when playing low-frequency audio signals through a single-ended output. Link here (PDF)

This application note explains what power-supply pumping is and how it occurs in designs that employ a Class D audio amplifier with single-ended output loads. The article presents three design solutions that will reduce the problem. Mathematical equations show that use of power-supply capacitors greater than 1000µF greatly reduce the phenomenon.

Make a PCB from scratch using EasyEDA // Part 2 // Tutorial

This is the second part of my video on building a simple PCB using EasyEDA. This time we'll be taking a look at how to use a solder stencil, placing SMD components, soldering using kitchen equipment and how to fix up your mistakes. Continue reading Make a PCB from scratch using EasyEDA // Part 2 // Tutorial

The post Make a PCB from scratch using EasyEDA // Part 2 // Tutorial appeared first on MickMake.

Converting a Seeburg 3WA wallbox into a remote for a modern music player

p-seeburg_complete-600

Dr. Scott M. Baker wrote an article detailing how he converted a Seeburg 3WA wallbox into a media player for his homebuilt audio player:

A bit of background. These Wallboxes were used as remotes in diners and other locations back in the 1950s. You put your nickel, dime, or quarter into the Wallbox, which racks up some credits. Then you select the song you want and the Wallbox sends a signal to the Jukebox, which adds your selection to the queue. Soon thereafter your music is playing through the diner. I’m too young to have experienced these in person when they were state of the art, but I do have an appreciation for antique and retro projects.
A new fad is to convert these wallboxes into remotes for your home audio system, be it Sonos or something else. I have my own homebuilt audio system, basically an augmented Pandora player, so my goal was to use the wallbox to control that.

See the full post on his blog here.

Check out the video after the break.

Traktorino, an open source DIY MIDI controller

Traktorino

Here’s an Arduino based open source MIDI controller by Musico Nerd, the Traktorino:

The Traktorino is a powerful low-cost DIY MIDI Controller. It is based in the Arduino platform and it comes in DIY kit, or assembled. In its core, there’s a shield that connects to an Arduino Uno, which uses open-source code, making it totally hackable.
The Traktorino is a MIDI class compliant device, designed for controlling Traktor. It has several features and custom made mappings, so you can take the most of the software. However, it can do much more than that. The Traktorino can control any software that accepts MIDI, like Ableton Live, Serato, FL Studio, Logic, etc

More info at musiconerd.com and on GitHub.

Check out the video after the break.

ESP32 (35) – BLE, scan response

In the previous posts I explained how to receive and send advertising packets based on the Bluetooth LE standard.

The payload (that is the amount of “useful” data) of those packets is at most 31 bytes. It isn’t much: if – for example – you want to include the device name, little place remains for other data.

The BLE standard allows peripherals to send additional data using the scan request – scan response process.

When a device receives an advertising packet, it can contact the transmitter by sending a scan request packet to request further information. When receiving a scan request package, the peripheral can respond with a scan response packet:

scan-response-001

Advertising and scan request packets have the same format; it’s therefore possible to transfer, using scan response, additional 31 bytes of data.

esp32

The esp framework offers two modes for configuring the content of a scan response packet: using the esp_ble_adv_data_t struct or creating a byte array (raw mode). These modes are similar to the ones used to configure advertising packets you learned in previous articles (struct and raw mode).

In the first case, you have to declare a second struct, in addition to the one related to the advertising packet, to define the content of the scan response packet:

static uint8_t manufacturer_data[6] = {0xE5,0x02,0x01,0x01,0x01,0x01};
static esp_ble_adv_data_t scan_rsp_data = {
  .set_scan_rsp = true,
  .manufacturer_len = 6,
  .p_manufacturer_data = manufacturer_data,
};

Very important is set to true the set_scan_rsp parameter. It’s indeed this parameter what tells the driver that this struct is related to the scan response packet.

You can then pass the new struct to the driver, with the same function used previously:

esp_ble_gap_config_adv_data(&scan_rsp_data);

The driver will call the callback function twice: one to indicate the successful configuration of the advertising packet and one for the configuration of the scan response one. The two events are different:

case ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT:
  [...]
case ESP_GAP_BLE_SCAN_RSP_DATA_SET_COMPLETE_EVT:
  [...]

You have to wait until both the events have triggered before starting the advertising process. In my example program (you can download the source code from my Github repository) I use two boolean variables:

bool adv_data_set = false;
bool scan_rsp_data_set = false;
[...]
case ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT:
  adv_data_set = true;
  if(scan_rsp_data_set) esp_ble_gap_start_advertising(&ble_adv_params); break;
 
case ESP_GAP_BLE_SCAN_RSP_DATA_SET_COMPLETE_EVT:
  scan_rsp_data_set = true;
  if(adv_data_set) esp_ble_gap_start_advertising(&ble_adv_params); break;

If you want to use the raw mode instead, you have to declare a byte array and fill it with the content of the payload of the packet. Then you can use a specific function of the framework to pass the array to the driver:

static uint8_t scan_rsp_raw_data[8] = {0x07,0xFF,0xE5,0x02,0x01,0x01,0x01,0x01};
[...]
esp_ble_gap_config_scan_rsp_data_raw(scan_rsp_raw_data, 8);

did you notice that the content of the scan response packet is the same in the two examples?

The driver will confirm the configuration of the packet with a dedicated event. Also in this case you have to wait for the end of both configurations (advertising and scan response):

case ESP_GAP_BLE_SCAN_RSP_DATA_RAW_SET_COMPLETE_EVT:
  scan_rsp_data_set = true;
  if(adv_data_set) esp_ble_gap_start_advertising(&ble_adv_params); break;
You can also mix the two modes in your program. For example you can configure the advertising packet using the struct and configure the scan response one using the raw mode.

Now with the nRF Connect app you can verify that your scan response packet is correctly received by your smartphone:

scan-response-002

In the following video I explain how I built the payload of the packet and how the program works: