Thursday, June 22, 2017


At Aliexpress i ordered 5pcs/lot PAM8403 Super mini digital amplifier board 2 * 3W Class D digital amplifier board efficient 2.5 to 5V USB power supply for 0,87 euro.
That is about 18 euro cents for a stereo amplifier module! This module has no potentiometer to regulate the output volume.
There are also other PAM8403 modules available, some with potentiometer(s).
There are also PAM8403 modules with potentiometer but they are much more expensive ( 0,57 euro )
On one i soldered Dupont connectors for easy access to us it on a breadboard or other temporary experiments. On another i soldered wires to two cheap mini speakers and also some Dupont connectors.

Interesting very cheap
 amplifier !

Wednesday, June 21, 2017

My First Lora Gateway

RFM95 back LoRa breakout

As i like doing some projects with IoT i also wanted to experiment with LoRa.
Some time ago i ordered a cheap LoRa shield for my Arduino. Unfortunate i did not get it working. I could not find out if it was something with the code, the jumper settings, a hardware error or perhaps my shield could not reach a LoRa gateway in Almere.
Perhaps in another LoRa post in my blog you will read more about this shield.
RFM95 front LoRa breakout

When asking advice someone was so friendly to send me documentation to make a simple one channel test LoRa gateway with an RFM95 and a Wemos D1 mini.

On Aliexpress i found two RFM95 breakout boards for 13 Euro so i decided to order them. I have done several experiments and projects with different ESP8266 boards but until now i never used the Wemos version.
Between the  RFM95 and the  Wemos D1 mini (ESP8266) you need to make the some connections.
Wemos D1 mini
Wemos D1 mini
According to a descriptions i connected this:
RFM95 pinESP8266 pin

The Wemos D1 mini came with 2 sets of male pins, 2 sets of female pins and 2 sets of female with long male pins. I decided to build the circuit on a small prototype PCB board. (It is also possible to order a Wemos PCB for the RFM95 or connect them direct.)
I decided to solder the female with long male pins on the Wemos D1 mini. On the PCB i soldered the two sets of female pins so i could separate the ESP8266 from the circuit if needed. As the Wemos can be put in two ways in the connector of the PCB i marked the side of the Antenna.
The Lora RFM95 is not breadboard friendly. I soldered it direct on the prototype PCB next to female pins for the Wifi ESP8266 Wemos module. Each RFM95 pin (except the Antenna pin) is connected to a Dupont male pin. To the Antenna pin i soldered a 8,2 cm wire to use this as a first test antenna. (Perhaps after some testing i change this to an SMA connector as in the documentation.)
After this is soldered the wires between the RFM95 and the Wemos connector on the PCB as in the table above. (Most of these connections are made on the copper side of the PCB so you can not see them on the pictures in this blog article!) 
I added a button between D4 and ground to have a simple input button to test the ESP8266
The Wemos D1 mini already has a Reset button.
Next to the GND and 5V of the Wemos i added male pins to have easy access to GND and 5V and there is also a third pin connected to the 3V3. I only have tested my module by powering via USB
I tried to connect the Wemos to my computer using USB. At first it did not work as i used an USB power cable instead of an USB data cable. (I think i need to label my USB cables!).
After finding the right cable i tried to upload the Blinck sketch first to test the connection and the Wemos module.
I got the system message "Error board is unknown / (Package ESP8266 )" and solved this problem ( )
In the directory ' Users\<MyName>\Arduino15\packages\esp8266\hardware\esp8266 '  i needed to manual clean up old software. So i removed there everything and Blinck worked.

Now the 1ch Wemos gateway software. When installing this on my computer "Time" was already installed on my computer. As i did not know if this was the right version i decided to rename the old version.
Stupid as this did not work. When starting the Arduino software to upload it to my Wemos i got an error message that there where two versions of "Time" with a link to my renamed version.
So i moved my old "Time" version to another directory and this problem was solved.
Now i got the error message "Documents\Arduino\ESP-sc-gway30\ESP-sc-gway30.ino:67:92: fatal error: gBase64.h: No such file or directory"
Googled and installed another "base64" but this did not solve my problem.
Finally i found the latest 1ch gateway software ( Version 4. ) . This package included gbase64 and after adapting the configuration parameters it worked.
The error message "The management functions only work over _THINGPORT and not over _TTNPORT" also went away by adapting the parameters.
In the end i got a working 1 channel test LoRa gateway. The IP address of the Wemos ESP8266 gives a simple webpage to check and configure some parameters,
Some things i want to do with this device:
- testing this gateway with another LoRa device (my Arduino LoRa shield?),
- putting this device in an enclosure
- adding connector for another antenna
- adding one or more sensors (temperature) to this LoRa gateway
- adding a better power supply

Saturday, June 17, 2017

Cables USB / Power cable

In my waste i found an old USB power connector cable.
The connection cables (2 cables) where very short but still could soldered.
You can find more and more devices using an USB powered cable. I expected the USB connector could be used to make a power cable (e.g. to connect to my regulated power supply from a previous post.
I searched on the internet to find out the connections. On is this picture:
USB: Ground / Data+ / Data- / Power (5VDC)
( This, and more info can also be found on wikipedia  )
With my multi-meter i checked the connections to find out which of the two wires is the power + and which is the ground - wire.
I soldered two wires (Red to power + and black to ground - ) to the connector and used heat shrink tube to insulate the wire. Each wire is insulated separate and after this heat shrink is for botch wires.
On the other side of the cable i added two banana plugs.
After checking the connections and checking for possible shortcuts with this my multimeter the USB power adapter cable was ready.

To use it with a (B3603) regulated power supply set the voltage to +5V and a (protective) limited max current.
I am very happy with this USB adapter. Perhaps when i will make a new lab power supply i will  include a fixed 5V output with USB connector.

Monday, June 12, 2017

USB Logic Analyzer

On Aliexpress i ordered a cheap USB Logic Analyze 24M 8CH, MCU ARM FPGA DSP debug tool
( Current price 4,22 euro (June 2017) , In March 2017 i payed 4,43 ).

Plugging it in my computer i noticed two leds (red PWR and green CH1 ) and my computer detected an unknown USB device.
I had downloaded the latest version Logic+Setup+1.2.14.exe This program did not work for me! I fired up the program in Windows Vista and nothing seems to happen. (Perhaps to the old Windows Vista version).
On internet i found this article
with a link to Logic+Setup+1.1.30.exe
I this version  mentioned in this article worked!. It started a windows installer and after a few minutes i had
 a nice program usable with my logic analyzer.

On my device is printed CH1 to CH8 The software interface is mentioning Channel 0 to 7. CH1 is Channel 0, CH2 is Channel 1 and so on.
In the software the channels have a color coding. It can help if you use testcables matching this color scheme. (I ordered separate 10PCS test hook clips from the same seller. )

A simple testing run gave a straight line, also with the time set to 10 second and 1MS/s
During another test run i used a 1.5 volt battery and touched between GND and CH1
This gave my first interesting signal(s) to look at !
After this i tested my analyzer with some other signals (e.g. Signals on arduino led cube)
Later i discovered that, with the USB logic analyzer disconnected the software capture does a simulated capture and also gives an interesting ("test") signal.
The software does not only visualize the signal but has also interesting features to measure, analyze and decode signals.

Conclusion i finally have added an interesting device to my toolbox that i should have added earlier ! 

Friday, June 9, 2017

Presenter / Laser pointer IOT DIY (6)

A i needed to repair my ESP8266 Wifi IOT laser presenter .
The battery's did not fit inside the case i used in my first version. I glued the battery pack for 3 AA batteries on the back of this box. Now, after a few months the glue became to old and dry (or i had used the laser presenter to much) and the battery pack separated from the box. I do not remember exactly the glue i used in this first version. (Some plastic glue?)
I glued it again with hot glue. Hope this time it will last longer !!

Wednesday, June 7, 2017

Power supply with B3603

An old 24V DC 1.5 A (laptop) power supply is changed to a bench power supply unit (PSU) with a cheap MingHe B3603 DC-DC buck regulator from Aliexpress. ( Ordered may 2017 ; Euro 6,17 +shipping Euro 1,66 = total Euro 7,82 )
The MingHe B3603 is a constant voltage, constant current step down (or buck) power supply. with a four digit display, 3 leds and 4 push buttons.
It accepts inputs from 6 to 40 Vdc and provides outputs from 0 to 36 (40) Vdc and can give 0-2 A without cooling and 3 A with cooling. It is a buck step down regulator. The input voltage need over output voltage more than 1.5 V (i will not exceed the input voltage)

My old laptop power supply is 24 Volt, so it should work to 24-1,5 = 22,5 Volt.
The connector to the laptop on the old power supply i use for providing the 24V was cut off (some years ago). On the mains side is a 3 pin power input. After providing my 220V main i measured the output and marked the + wire with red tape.

In my version of the MingHe B3603 i did not find the bad soldering as mentioned on The ground wire from the mains input on the old laptop power supply is direct connected to the - (ground minus) output. (It is always good to do first some measurements and testing!) I do not want one of the power output lines direct connected to the power earth. This can give strange loopbacks in your circuits. Therefore i decided not to connect the ground of the input power!
As enclosure i built a wooden box open at front ant back..Some plastic from a plastic box was used to create a front panel by adding some holes.
First i remove the 4 screws at corners of the PCB from the B3603 module.
At the inside of the box i hot glued some screws to attach the B3603 module PCB. (I did not like additional unneeded screws on the outside.) I placed the B3603 module with some nuts on the screws.
The output of the B3603 was connected to a pair of banana plug terminals on the front panel.
A power switch was added to disconnect the power supply from main power .

The four buttons under the display are ( from left to right)  
[SET]  [DOWN] [UP]  [OKE]
The three leds at the right side of the display are (from top to bottom)
CV LED – Green - Constant Voltage mode.
CC LED – Yellow - Constant Current mode.
OUT LED  – Red - On when supplying power.

Some power output calculations of my configuration
1,5 A * 24 Volt = 36 Watt (Input power)
36 Watt equals:
2 A at 18 Volt
3 A at 12 Volt (3 A is the limit of the B3603 regulator !! )
6 A at 6 Volt (3 A is the limit of the B3603 regulator !! )
7,2 A at 5Volt (3 A is the limit of the B3603 regulator !! ) 

How to operate the B3603 module can be found in the manual (see link below) and on several webpages and youtube channels.
An abstract can be found in the remaining of this blog article.

  • Dot at 00.00  Voltage  in Volt  ( Limit set point / real time output)
  • Dot at 0.000 Current in Ampere ( Limit set point / real time output)
  • First character in display C    Amp Hours (accumulated since being turned on.)
  • First character in display P Power in Watts real time
  • SA .. & LO .. Save and load to storage (only if Function 1 enabled).
  • ---- Confirms saving setting
  • Navigation to various setup menus and memory menus..
CV LED –  Constant Voltage mode.   Output voltage is at set value set, current is varying.
CC LED – Constant Current mode.    Current limit has been reached and voltage is varying.
OUT LED  – When lit, the power supply On and supplying power.  When off,  its output is off.

  • If OUT LED is on, pressing the set button will turn the B3603 off.
  • If OUT LED is off,  pressing the set button will cause the display to cycle between the voltage and current set points.
  • Warning: Long pressing set can output high voltage, it gives calibration menu
  • If the OUT LED is off, pressing the OK button will turn the power supply on.
  • If the OUT LED is on and display is showing a fixed value,  a quick press will cycle to the next value.
  • If the OUT LED is on,  pressing the OK button for more than a second will cause the display to enter a mode where it automatically cycles between the various power supply values or will cause the display to enter a mode where is displays a fixed value.
  • Power up the module while pressing this button = Feature select menu ( F0,F1,F2)
  • A quick single press, will increase the value by one digit.
  • Holding the button down will cause the value to increase rapidly.
The set points can be changed with the power output on or off.
  • A quick single press, will decrease the value by one digit.
  • Holding the button down will cause the value to decrease rapidly.
Set points can be decreased with the power output on or off.

Calibration menu.
Read the calibration manual first! Long pressing the ‘Set Button’. gives the calibration Menu.  
This also outputs 30 volt (if > 30 volt applied to input, or otherwise your input voltage) that can damage an attached circuit.
To calibrate you need an input power of 31-36 Volt and a load bigger than 1.2 A.
User Selectable Features
Access the Functions Menu by applying power with the ‘OK Button’ pressed.  
With the ‘OK Button’ still pressed after power is applied the display will cycle between three values that represent the three user configurable options.
The values are ‘–0-‘,  ‘–1-‘,  and ‘–2-‘.
Function 0 – Choose whether or not the output is enabled when power is supplied to the step down converter.
Function 1 – Whether or not to display power and amp hours. ( and memory mode on)
Function 2 – Whether or not to cycle between values as a power up option.
Releasing the ‘OK Button’ on of these values will toggle the user selectable state.

Storage locations
The module also has 10 storage locations ( 0-9) to store preset voltage/current values.
Function 1 on needs to be turned on to use storage.
When pressing set LO-0 or SA-0 options to load or save to storage are enabled in the menu. With ARROW UP (or DOWN) you can select a storage location and do it by pressing OK.