Monday, June 1, 2020

AppDressBook: Address Book app that synchronizes contacts using a custom API server

AppDressBook is an Address Book app that synchronizes contacts using a custom API server.
It is useful for companies or associations that's want to share contacts using a unique application.
They just have to build their own server that provides the contact list and eventually an authentication method, then the server url can be shared with people engaged and used in this app.

AppDressBook is Open Source and it's built using React Native.
It works both on Android and iOS. Although it's not yet published on Apple Store. You can find the Android app here at the Google Play Store.
The backend server itself it's pretty simple, in the Docs folder you can find all the json schemas for the routes you have to serve.
Ther's a simple test server written in node.js published with the application code, you can find it in the appdressbookapisample folder. I've implemented a C# server for my company. Building the API server is really a simple job. Contacts can be secured by username and password validation. Contacts can of course be synced according to the logged in user. You can even chose to deploy your contacts without authentication.

When the application is executed for the first time, the API server must be filled. Then that server is beeing asked for settings. If authentication is required user has to authenticate, if not contacts can be synced instantly.
Contacts list is cheked against the server each 10 minutes, using the hash of the list, this is to prevent bandwith consumption.
The application itself is simple, and customizable for your needs.


  • read risk disclaimer
  • excuse my bad english

Saturday, May 2, 2020

NRI G-13.mft parallel coin acceptor to Serial adapter

The NRI G-13.mft by Crane ( is a versatile and high secure coin validator.
It can be programmed using the propretary WinEMP software and PC interface, or event it has some DIP Switch that can be used to program the device.
Unluckily it does not come with a UART interface. But it features a "machine tester" I/O interface we can use to track the inserted coins.

On page 50/51 of the Technical Documentation for NRI G-13.mft G-13.mft parallel Standard, Casino and AMU Models (from Version /4) 05.05 Hns/WP/ds Edition 1.2 BA.G13MFTPAR4-GB, we find the specification for the interface we could use.

For the G-13.mft standard/Casino model – vending machine 10pin interface, we notice that
PIN 1 is the GND while PIN 2 the VCC, we can use those pin to power the device on.
Moreover, if we scope on the PIN3,4,7,8,9,10 we may notice that as the datasheet said, the signal is active low when a coin is inserted on the specific line.

Because those PIN also inhibit a signal line we can even instruct the coin acceptor to disable a specific coin line. This will not be the case we are investigating here, I'm only interested in getting the coin signal.
For this reason I just connect the output of the Coin signal line, with a pullup resistor to our microcontroller.
That's easy, now it's just a pin reading matter, with a bit of debounching.

The schematics itself is simple. The main microcontroller is an ATmega8. The UART to USB adapter chip is the Silab CP2102, attached to a microUsb port.

For this project I've also design the PCB, which i prototype using a chinese PCBA service. We are able to build the final board after 3 prototype, that's because I'm not a pro in the PCB design, but I've to start somewhere. Then the company I work request 100 boards production from the chinese company. It was the first time that I try the PCBA service of a company, think this was a good experience, to start with a small and simple board like this one.

Code, Schematics and PCB

  • read risk disclaimer
  • excuse my bad english

Friday, April 3, 2020

3 kind of Ruby Amp: Standard, Bassman and Hiwatt with distortion mod

I've introduced you the Ruby Amp here when I was talking about my bass amplifier 1W amp.
The Ruby Amp is a small guitar amplifier built around the LM386 IC.

This time i present you 3 kind of Ruby Amps from my collection.

Then the first one, it's a standard one, straight like the one of the site with a gain control.

Second one is a Bassman mod one, with a distortion switch that pump up the LM386 gain to it's limit. It was built on a PC speaker case.

Last one, the third, like the previous, was built on a PC speaker case, but this time it's an Hiwatt mod, again it cames with distortion switch.

All those you see above, I've built using a PCB board I've design.

Then some bonus pictures of the first one I've built. It's a standard one without gain pot. It was built on a prototyping board, it was 2010.

Most of them runs on a 9v supply voltage, some on 12v.
A personal note on the supply, if you are using a high to low voltage transformer and a rectifier to get your supply voltage, use big caps or even better a voltage regulator like the LM7809 if you want to avoid noise from your power line.

As you can see, I've always use salvaged parts, even that, they sound pretty well to my ears.
I've built others, always using recovered case and parts.
Although I've never use those amps in a record they sounds good, are simple to build and portable, so if you need one small amp at your friend house or during a BBQ, those are the amps.

  • read risk disclaimer
  • excuse my bad english

Monday, March 2, 2020

D03: the "LESA Boogie" guitar amplifier

I've built this guitar amplifier from a 50's turntable with speakers.
This turntable was built by LESA (Laboratori Elettrotecnici Società Anonima), which sounds like Electrotechnical Laboratories of an Anonymous Company.

It happens that this turntable was left in an house with water leaks, the water was running just over the turntable, luckly speakers was intacts.
Because i like the turntable front and the speakers case, i decide to build a small guitar amplifier our of that piece.

As a side note to this project, the main PCB of this turntable contains some germanium transistor that I've use to build this Germanium Fuzz guitar pedal:
Stage one was the building of the case.

I've glued and screwed two speakers, a hole between the two speakers was drilled for the cables.
Then on top of the speaker I drill some holes for potentiometers and panel devices.
On the back panel I put the power plug with fuse and power button.
Once I was sure that the case was correctly built it was time for the interesting stage, the electronic.
I've a +-13V 80VA transformer that I salvage from an old HiFi system, so I can build something with dual rail supply.

The design reference I use are the schematics of the following amplifiers:
  • Marshall MG10
  • Fender Frontmain 10g
  • Vox Pathfinder 10
The power stage is pretty simple, just a bridge rectifier, capacitors, two resistors used for voltage reduction, and two zener diode for the +V and -V of the opamps.
The preamplifier uses a TL072 opamp, the input stage rectify the guitar high impedance and gain the signal of 8.9.

The second stage is the overdrive channel, which is also TL072 based. This channel is enabled by the bypass selector, that is simply a DPDT switch.
The gain of the overdriver in my construction is fixed, cause I do not want to drill an hole for a gain potentiometer, instead I want to use one button of the original amplifier.
So in my design I can switch between a crunch/soft gain overdrive to an overdrive/high gain.
It would be easy to mod this amp adding the gain potentiometer for a more accurate setting.
You could simply add a 1M pot instead of the gain fixed resistors.

The tone stack it's based on the Fender 6G5 circuit with some little mods.
The signal then goes to a PT2399 based reverb. It's rectified by the TL072 that fits the signal for the amplifier board.

The reverb board has two trimmers, one for the feedback signal, the other for the delay time. Adjusting the trim the reverb sounds change. The two trimmer are in parallel with two resistors, a switch on the amplifier select which resistor is enabled, this way I can select between two different reverb styles.

The amplifier is based on the TDA2030A IC. It's basically the datasheet sample with some fleavours and signal filtering additions.

Speakers are obviously old. They comes with a woofer and a tweeter, joined togeter using a single capacitor filter. The original speaker impedance was 3.2ohm. In order to connect the amplifier board to the speaker I've wire the two speaker using a single filtering capacitor.

The amplifier sounds and looks pretty good to my hear and eyes.
Furthermore it's a LESA and I have an apartment in Lesa (, a town on the Major Lake. Guess where this amplifier is built for?

  • read risk disclaimer
  • excuse my bad english

Monday, February 3, 2020

AVR Brushless motor driver PWM scheme samples

A three-phase brushless motor it is usually drive by six-state commutation step sequence.
The commutation sequence drive the motor coils in order to make it spin.
The picture above represent a standard commutation scheme, each line is the motor coil status.

Given a 360 degree commution space, each commuation happens takes a 60 degree space.
A coil it is usually driven by mosfet bridge.
The coil can be drive on or off, but we can also drive it in PWM.
The PWM scheme is the way the power gates bridge is controlled in order to drive each motor coil.

In the AVR bldc driver here:

I've implemented 4 PWM scheme.

H PWM L ON: PWM is performed on the ON channel

H ON L PWW: PWM is performed on the OFF channel

H PWM ON: PWM is performed on UWV channels every 60degrees, starting from U ON-ON

H ON PWM: PWM is performed on UWV channels every 60degrees, starting from V OFF-NULL

See above the signal sample recordered using a CD-ROM motor.

H PWM L ON sample

H ON L PWW sample

H PWM ON sample

H ON PWM sample

  • read risk disclaimer
  • excuse my bad english

Saturday, January 4, 2020

An ATmega brushless sensored motor driver v02

Brushless electric motor (BLDC motors) are synchronous motors that are powered by a DC electric source via an integrated inverter/switching power supply, which produces an AC electric signal to drive the motor. Hall sensored motors uses hall effect sensors or a rotary encoder to directly measure the rotor's position.
For an introduction to BLDC motors, you can take look at my sensored motor driver post, here:

This library implements a brushless sensorled motor dirver for AVR ATmega.

Take this library:

This is exacly the same library as the previous linked, so, for further information on this library please look at the link above.
There are just a few difference due to the hall sensor presence. The motor position this time it is discovered using hall sensors insted of using the the ZC crossing detection.
When we get the hall sensor status, we can select the next hall sensor status we expect after the step emission. The hall sensor status expected to current status is defined in the bldc.h file.
The picture below reports the commutation step agains the next status expected.

Once again, this is a simple implementation of a sensored driver, there are improvements that can be made to make this driver works even better. The purpose of this implementation is to offer a simple yet hackable way to run a bldc sensored motor.

  • find the source code for this project on the sensorless post linked above

  • read risk disclaimer
  • excuse my bad english