donderdag 11 juni 2020

USB Microscope NeoPixel picture

Some pictures of a neopixel taken with my USB Microscope

What is a NeoPixel:
A NeoPixel is a small color led light with 4 connections.
Two points need to be connected to the power ( plus and minus ) One other connection is for an input control signal and the fourth connection may be used as output to connect to the next NeoPixel.
This way a lot con NeoPixels can be connected like a chain. The photos in this post are from a set of pre-soldered neopixels on a pcb where you can break out a small round pcb with one neopixel and the connections. This round led pixels can be used together with a micro controller (arduino, esp, .. ) in projects.
(this picture is NOT from the USB microscope but taken with my smartphone
The first input needs to be connected to a micro controller. The micro controller can send send a signal and control each individual led separate to set the color and brightness.

woensdag 10 juni 2020

Microwave Radar Sensor RCWL-0516 -2- (led)

Motion detector with led 
This is the next post on this blog testing the RCWL-0516 sensor. This sensor uses a “microwave Doppler radar” technique to detect moving objects and has a sensitivity range of ~7 meters.
The sensor does NOT detect if someone is near , it can only detect movements!
A long time ago my first post was about using the Microwave Radar Sensor  RCWL-0516 with an Arduino Uno.
This cheap and interesting module has the following connections :
  • 3V3  - Output 3V3 Regulated DC (100 mA)  This is 3V3 Output NOT input !
  • GND - Ground 0 V
  • OUT - Microwave Radar sensor output ( HIGH (3.3 V) motion detected/LOW (0 V) idle)
  • VIN  - 4 to 28 volt input to power this module
  • CDS - This pin can be used to disable detection. You need not to connect it. (Low= Disabled)
A 9 Volt battery was used to power the module. Be aware that after powering the module there is a delay (10 seconds) before the sensor is active.
Besides the CDS pin it is also possible to solder a light detecting resistor ( LDR ) in to the two holes below the RCWL-0516 text/logo. (On the other side of the PCB it is in the top-left square). When there is light on the LDR the Microwave Radar Sensor will not give a signal on the OUT pin.

In this post i describe recent tests using this proximity sensor without a micro controller. The photo's with the Dupont wires on the sensor connectors where from the previous post. This time i soldered pins to a sensor.

1) In the first test i connected a "standard led" between the OUT and GND with a 220 ohm resistor. This is a simple configuration to test the sensor

2) As i also wanted to check if the circuit is on i also added a (red) led between GND and 3V3 

3) The next idea was using a laser led. The advantage of using a the laser is the very far distance of the laser beam can travel before projecting a dot. The laser light can travel further than standard WiFi, Bluetooth or 433MHz radio signal. On a distance of more than 40 meter you should be able to see if there was movement near the sensor. 
The disadvantage is that you need a line of sight and you can not check if the sensor is functioning as the laser is default off. I tested drivign a cheap laser led directly on the output. However it seemed not possible to drive directly a laser (at least not the small lasers i have) with this module. So direct driving a laser led was a failure. The laser led does light when connected between ground and 3V3 an option could be driving the laser indirect e.g. using a transistor, opto-coupler or relay.

4) I also wanted to do some tests to know if it is better leaving the CDS 'floting' or connect the CDS pin to a logic level.

A prototype perf board was used to create a development/test board for a real test environment. Using wires only would reduce space however it also would lose some flexibility. I did not want to order a PCB or use a breadboard.
Bottom right is the power connection. The switch is used to turn the battery power on/of. Jumpers where used to enable or disable parts of the circuit. I did not want to use a (more expensive) breadboard.
Different colors for the jumpers are used.
The red jumper is used to enable the 'power on' led
The yellow jumper is used to enable the yellow 'signal out' led (using a resistor) 
The white jumper can be used to connect CDS to GND.
Also additional pins an connectors where added to play and do (lateron) more experiments with this sensor.

The sensor pins from left to right (extended over the full lenght of the perfboard) are   
01 - CDS
02 - VIN 
03 - OUT
04 - GND
05 - 3V3  
It is possible to direct derive a led with a small resistor) between the output pin and ground without a micro controller.

A battery powered board with a circuit  to test the RCWL-0516 was created and could be used to test the sensor.

Direct driving a small laser led was not possible. Perhaps indirect using a relay, transistor opto-coupler this is possible.

First test showed that motion at about 3.5 meter could be detected using this circuit.

Currently i can not yet decide if it is better to leave the CDS pin floating or connecting it to a logic signal. Both options seem to work. More tests need to be done to decide what is better. 

maandag 8 juni 2020

Project 0

Sometimes very small project can be useful. This is one of the smallest projects made with two led preferable with different color.
Playing with a low current, low current circuit i wanted to add some leds.  To simply check the signals and deciding how to add the leds I soldered two leds in opposite direction. By using two different color leds (red and yellow) immediate see the polarity even from a distance or in the dark during the test phase of the circuit. This as leds are polarity sensitive.
It is possible to add a resistor, however for a temporary test in a low power low current circuit this is not needed. 

donderdag 14 mei 2020

Dual frequency RFID reader -2-

To test my dual frequency RFID reader added some Dupont connectors on the other side of the provided cable.
To make easy changes i decided to add one pin connectors to all the wires. All cables have different colors, however i also wanted to put them quick in the same order as on the connector. So i put all the wires in the right order through an 8 pin Dupont housing. The plastic 8 pin housing can be put on any position as it can move free and is only for quick putting the wires in the right order.
(In fact it is a complete Dupont housing, i did cut of a small part of the housing where the holes for the wires are smaller.)
Hope this little hack will prevent mixing up the wires.
I already did a quick test of the Led with a small 1.5V coin cell. When putting the 1.5V coin cell directly on the leads of the led it lights up. Connecting 1.5V to combinations of wires like VCC (Red),  LED (Orange) and GND (Black) did not light the led.
A next step will be testing the RFID sensors, the led and buzzer. For the final part i need to decide if i will use an Arduino or an ESP module and where exactly i want to place this reader.

dinsdag 12 mei 2020

Dual frequency RFID reader -1-

For RFID experiments i also have a cheap dual frequency RFID reader with enclosure from my old mailbag. Bottom side of the enclosure is open. The size is about 7,5cm * 11,5 cm. A resin protects the components and a connector with wires (30 cm) is included.
It contains not only a 25Khz and 13.56MHZ  RFID reader. Also a led and buzzer is inside this enclosure.
For the RC522 RDIF reader there are several examples on the internet. For this reader i did not yet find much instructions. Also i and did not yet test the module.

Website of manufacturer ( Chinese)

Website with use example (Only RFID not using buzzer or led test)
The page contains links for code and more info to

Additional info on this page
Google translation of some text on this page about temperature sensibility
Special Note
     1. If the product with a temperature resistance of 60 degrees is placed in the gate, the direct sunlight at noon in summer will seriously affect the IC card reading function. The product with a temperature resistance of 80 degrees can work stably.
     2. The sensitivity of card swiping of temperature-resistant 80-degree products is higher than that of 60-degree products.
     3. It is recommended to use the pedestrian gate only, which has good adaptability to the metal environment.
    4. The default stock color of the product is carbon black. If you need white, please communicate with customer service if there is stock.
  5. The temperature-resistant 60-degree dual-frequency read head has been discontinued and needs to be ordered.
Due to the (poor translated) text above i expect better to keep the module out of direct sunlight if possible.

According the internet the following cards can be used:

 13.56MHZ /
 ISO14443 TYPE A

  1. NXP_Mifare1k
  2. NXP_Mifare4k
  3. NXP_Mifare mini
  4. Ultralight (C)
  5. Mifare  PlusX(S)
  6. Desfire  D21  D41  D81 
  7. NTAG203(F)
  1. EM4100
  2. EM4200
  3. JT120 (??)

A Chinese mini manual was included when delivered from AliExpress. In this first post about this module only some info, pictures and a first try to translate the manual using google translate. Hope it will be soon possible to make a next post about this module with some results.

donderdag 7 mei 2020

COVID-19 data -5-

Short post on my blog to share a link to Github files containing Dutch Covid-19 data.
Not tested  / full checked however looks reliable and up to date ( 7/7/2020)
COVID-19 disease count cases in The Netherlands by RIVM, LCPS and NICE

zaterdag 28 maart 2020

COVID-19 data -3-


The filenames of Novel Coronavirus (COVID-19) Cases, provided by JHU CSSE on Github ( ) as posted in my first blog post are changed. The csv files (on 28 March 2020) are:

Therefore i needed to adapt my Google spreadsheet.
As now also data from oversea parts of The Netherlands ( Aruba, Curacao, Sint Maarten) are in the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE) overview became available i also needed to do some additional updates.

dinsdag 17 maart 2020

Keyboard with Leds for Arduino

4X4 Matrix Keyboard For Arduino Array Module 16 Key Push Buttons Tastatur Switch Keypad Panel 4*4 Tasten 8LEDs Accessory DIY Kit
This module is advertised for Arduino, however i had plans to use it for FPGA experiments.
Just when i did think i needed to build something like this on a board as there could be a big delay in delivery due to the current situation in the world i received it this AliExpress item in my mailbag.
Small where where included, i just needed to screw them in position.

I did nit yet test it, however it seems an interesting small and cheap module to add some buttons and led's to projects or for development.

  • 16 keys in a 4*4 matrix
  • 4 keys connected to ground and with 1k resistors to VCC
  • 8 leds with 1k resistors and connected to VCC


(Photos taken with my phone, Schematic diagrams / circuits copied from AliExpress)

zaterdag 14 maart 2020

FPGA First steps -4- Cyclone IV (photos)

Some more photo's  of my Cyclone IV FPGA board.

donderdag 12 maart 2020

FPGA First steps -3- / Cyclone IV

Update about my FPGA adventures.
I also received my second FPGA experimenting board with a Cyclone IV
The Cyclone II board is a nice development board with a lot of IO pins. To do real experimenting and leaning how to use FPGAs you need to add some additional hardware as the button and led on the board. I did this using a breadboard, some Dupont wires leds resistors and buttons. I also have plans to make a pcbs with some hardware for this board.
The Cyclon IV board has more on board IO. (Displays, buttons, leds, buzzer, dip-switches, video a ps2 keyboard and several pins. Below a photo of my Cyclone IV board in action,
On the left is the USB blaster connected to the board for programming. It is possible to power the FPGA board using the power connector on the topleft. (On the photo below the USB cable of the USB Blaster. I used the alternative method with an USB cable (connector above the 7 segment display).
The software worked when i selected Cyclone IV GX and EP4CE6E22. Also i include a video from my YouTube channel. You see a 4 digit counter. After a few seconds i loaded a new FPGA program / configuration file using the USB Blaster. (the demo program led_test.sof )

woensdag 11 maart 2020

FPGA First steps -2- (General procedure & Resetting the screen)

As mentioned in my previous blog post i started experimenting with a Cyclone ii FPGA. There are several steps involved. It can look complicated. Therefore before diving into details i will explain the big picture in this blogpost.

  •  Install the software
  •  Create the FPGA logic
  •  Connect inputs and outputs to physical ports (Pin Planner)
  •  Compiling the created logic
  •  Upload the project to the FPGA  (Program) 
  •  Test the project in the FPGA

Install Software:
To use my Cyclone ii FPGA
i installed Quartus ii  version 13.1 software on my computer (Windows 10)
and the USB blaster software
Quartus is a big program so downloading and installing will take a long time. It is more a interface connecting different parts for managing the FPGA. As it are different modules sometimes saving before switching to another module is needed.

Create the FPGA logic
To create the FPGA logic there are several options in the Quartus ii package e.g.
Graphical interface
As the graphical interface looks intuitive and i found a YouTube instruction about it. Therefore i started my first experiments with this.

Connect inputs and outputs to physical ports (Pin Planner)
To connect the logical inputs and outputs a part in Quartus named Pin Planner can be used.
Before this can be done the logical inputs and outputs needs to be present. These logical ports can be created easy by compiling the design. This first compilation will not output something that will work as at that moment the physical outputs are not included in the compilation.
However it will prepare the logical ports for the Pin Planner. In the Pin Planner these ports can be manual assigned to to physical ports.
After the assignment of the physical ports another compilation needs to be done to include information about the physical ports.

Compiling the created logic
Compiling is relative simple and can be started different ways:
Using the menu 
Processing - Start Compilation
The button with a triangle
The compilation can give Errors when the compilation was not successful. Otherwise there can (and will) be Warnings. 

Upload the project to the FPGA  (Program) 
To upload the result to the FPGA ("Programming") there are two options
Store it temporary 
Store it permanent
When storing it permanent it can be overwritten later by storing something else. The difference is that the settings are erased after powering the system down when storing it temporary. 

Test the project in the FPGA
Details how to test depends on the created logic.
It is also possible to test the created FPGA logic before uploading using a simulator.
This simulator requires some configuration.

An important file with links to the software Handbook and other resources is can be found in Quartus ii under
     Readme File

During testing it you can easy change the displayed screen in Quartus II
It is possible to reset the windows to the setting during installation without repeating the installation process.
See for two options to do this:

Using a menu option in the Quartus II Graphical User Interface (GUI):
Choose Tools and then select Toolbars.
Click the Toolbars tab.
Click Reset All.
Click OK.

Using a Windows Command (DOS) Prompt:
Close the Quartus II software.
Open a Windows command prompt or DOS window (Start -> Programs -> Command Prompt).
At a command prompt, change directory (using the cd command) to the Quartus installation directory/bin.
Type the following: quartus -reset_desktop

During my experiments/testing/learning i needed to use the second option (using the Windows Command prompt as i did not find another way to get the screen back in a reasonable status.

dinsdag 10 maart 2020

COVID-19 data -2-

After my first post about COVID-19 data i did find another interesting data source
Nextstrain is an open-source project to harness the scientific and public health potential of pathogen genome data. They provide a continually-updated view of publicly available data alongside powerful analytic and visualization tools for use by the community. Their goal is to aid epidemiological understanding and improve outbreak response.

It contains interesting graphs about COVID-19 and the different genomes found in the samples. This nCoV data was generously shared to Nexstrain via GISAID.  From the data on GISAID nCoV genomes are not included as part of that repo as many of them are protected by the terms of GISAID sharing. Also due to some sharing agreements not everything is made public.
As i only see a limited number of cases not all the data about all cases is available. I don't know if this is due to the time needed for analysis or perhaps not in all cases genome data will be analysed and/or shared. However in the Nexstrain github page you can find interesting data to use in your own graphs. Also an api for the data and json seem to be available on the Nextstrain website.
The data can be imported in your spreadsheet using =IMPORTDATA(<url>) as mentioned in my first post about COVID-19 data.

Constant current load

In my electronic toolbox i did not yet have a nice constant current load.
(Almost) finished constant current load in my enclosure.
This simple device that can be used to check power supplies was a long time missing for my electronic experiments and projects. When i needed a (dummy) power load for testing or development i used a 12V car lamp or some high current resistors. I did also buy a simple very cheap USB discharge device with two resistors on Aliexpress. A constant current load was for a long time on my wish list. When i did see the video on the YouTube channel of learnelectonics i was impressed by the small relative cheap constant current load module with a color display. According to the video description the manufacturer is TKXEC and the model is WEL3005.
I did order one and even in this period with Chinese new year and other things that could cause delays did receive it relative fast. The price without enclosure is below 20 euro's. As i already had an enclosure that i could use i did not order it. 

Items needed

Items is used for this project:

  • Constant current load module (see below)
  • Enclosure
  • Power supply for the module (
    • I used an 9 volt battery,
    •  with a switch and a battery holder clip snap on connector to connect the 9 volt battery 
    • and a tie-wrap to fixate the battery in the enclosure )
  • Binding posts / Banana clips female
  • Some wires
You can find a photo of the (almost) finished constant current load in my enclosure in the beginning of this blog post.

I tested the device with another 9 volt battery. (So i needed 2 x 9 volt batteries with battery holder clip snap on connectors). See result at end of this post.

Also some simple tools are needed to make this project. (Screwdriver, something to make fitting holes in the enclose [dremel] and a soldering iron if you want or need to solder the connections)

The module description

(Text and photos from AliExpress)

1, can display voltage, current, power, ampere-hour, watt-hour, discharge time, internal resistance, temperature
2, can set the discharge current, constant current discharge
3, discharge safety, discharge time automatic statistics
4, can be suspended, can accumulate discharge data
5, fan intelligent temperature control, more than 45 degrees fan start
6, a variety of protection mechanisms, anti-reverse protection, over-current protection, under-voltage protection, over-power protection, over-heat protection

Product parameters:

Supply voltage: 6V-30V
Measuring voltage: 0-30V
Discharge current: 0A-5A continuously adjustable
Discharge power: up to 30W (Note: Do not use super power!!)
Working temperature: -10~+75 degrees
Resolution: voltage 0.01V, current 0.001A
Accuracy: voltage 1% ± 1 word, current 1% ± 1 word
Undervoltage protection: Yes (1.5-30V)
Over power protection: Yes (1-30W)
Overheat protection: Yes (more than 45 degrees fan start, overheat protection is 75 degrees)
Input anti-reverse: Yes
Wiring method: small screen printing B+B- for measuring voltage, large screen printing B+B- for measuring current
Fan: 4010 double roller fan, speed 8000
Module size: length 79mm width 43mm height 70mm
Opening size: length 76mm width 39mm
Weight: 95g

LOCK: Under non-discharge, press the LOCK button to measure the internal resistance of the battery and automatically disconnect for three seconds. Measuring internal resistance (please use four-terminal wiring method)

Setting instructions:
P1: Press the P1 key to switch to the interface shown below: (Note: long press the P1 key to clear the test data, short press the code switch to pause)

P2: Press the P2 button to switch to the interface shown below:
SET: Press the SET button to switch to the interface shown below: After entering the SET menu interface, rotate the "Encoding Switch" to adjust the data, and then "Code Switch" to switch the coarse adjustment and fine adjustment data, and then connect the SET button again. Menu items can be switched.


As mentioned in the "learnelectronics" video and some comments about the product a strange thing is that you need to remove the fan (and also pull out the top pcb) to connect the wires using a screwdriver.
I did fit the module in a small (metal) enclosure. On the front panel i added two female banana plugs for the load and an on of switch for switching the power to the module on or off. The power supply needed is 6-30V. I powered it using a 9 volt battery and it seems to work oke. 
Unfortunate the required current for powering the device is not mentioned. I also did not measured the power consumption myself (with and without the fan running and with different voltage inputs. 
When power connectors i ordered in China come i want to add these power connectors on the backside of the box. This way i can use another power supply than the 9 volt battery that i placed temporary in the box.  
I tested it using a second 9 volt battery and after some experimenting it worked well when setting the current below 0.900 A and the voltage limit at 1.5 Volt. I higher current will try to drain the battery fast and turns the load off after a few seconds as the voltage will drop rapidly. After the module has switched off the load you can see the battery voltage rise again.
When i revered the polarity of the 9 volt battery  that i was testing the display the display showed an input voltage above 30 volts.  This is as the module has an anti-reverse protection to protected against this connection of the load with switched polarity.

maandag 9 maart 2020

SDR# Radio on Windows 10

Recently i installed SDR# Radio software on my Windows 10 computer.

What is SDR?

Software-defined radio (SDR) is a radio communication system where components that have been traditionally implemented in hardware (e.g. mixers, filters, amplifiers, modulators/demodulators, detectors, etc.) are instead implemented by means of software on a personal computer or embedded system.
While the concept of SDR is not new, the rapidly evolving capabilities of digital electronics render  practical many processes which were once only theoretically possible.

What is needed for SDR?

To use SDR you need 3 things

1) SDR Dongle
I have an RT820T dongle  ( DVB-T+DAB+FM  USB2.0 dongle ) Most documentation i found is not about the RT820T but about the R820T dongle, however my dongle worked fine.

2) Antenna
With the SDR dongels most times comes a small antenna. This will work fine for the first experiments and testing the SDR dongle.
However the SDR can process frequencies in a broad frequency range. For good reception the antenna needs to be matched to the frequency.
The antenna that came with my dongele works resonable in the FM range but can not replace a real good antenna suitable for a specific frequency, frequency range.     
 The optimal antenna will depend on the frequency and project you are interested in.

3) A computer (with audio sound output and USB input) running the SDR Software.
With the dongle came a cd with software to receive some audio and TV signals.
A quick investigation on internet shows that it is not advised to install this software as it will interferes with SDR# software.
I installed the SDR# ( SDRSharp ) software and it worked fine. However i epect with a better antenna, or a better location for my antenna a lit can be improved.

Advantages of SDR over traditional radio?

A lot of the receiver is replaced by software. This makes that it can be used over a very wide frequency range and also use  different modulation modes (FM , AM , SSB and TV) by software settings.
As limited hardware is needed it is relative cheap. A simple SDR USB dongle can be bought for around 20 euro. There are more expensive and advanced devices available however a cheap dongle will be sufficient to do a lot of experiments. For advanced experiments perhaps better use a part of your budget for your antenna.
SDR can be used to check radio frequencies e.g. 433MHz radio remote controls for switching lamps, garage doors, car, WiFi and more.
It seems SDR data can also be shared over the (local) network. There us also software that can be installed on Android or on a Raspberry Pi.

Installing SDR#

Installing SDR# ( SDRSharp) is not extreme difficult. However it is (currently) not just plug and play.
Installing the (limited) software that comes with the dongle even makes it more difficult to full use the dongle with a program like SDR#
Therefore i decided to post this summary how to install SDR# on Windows 10 on my blog.

Steps involved are
- Download and extract the software.
- Run some installation scripts (also to install the USB driver).
- Then test and start using SDR#.

The complete installation instructions can be found on

Go to and find the downloads button on the top menu.
Next to the "SDR Software Package" heading click on the download button to download
Extract (unzip) to a folder on your PC. (Important! Many people who have issues forget this step! Do not run the files from within the zip file or the following steps will fail). (Also, do not extract into a folder within the Program Files directory, or installation may fail as these folders are often automatically made read only by Windows).

Run install-rtlsdr.bat

Plug in the dongle. (Do not install any of the software that it came with !! )

In the folder where you extracted the sdrsharp files find the file called zadig.exe.
Right click this file and select "Run as administrator".
The program Zadig to add your USB device starts.

In Zadig, go to "Options->List All Devices" and make sure this option is checked. If you are using Windows 10, in some cases you may need to also uncheck "Ignore Hubs or Composite Parents".
Select "Bulk-In, Interface (Interface 0)" from the drop down list.

To install the WinUSB driver, ensure that WinUSB is selected
Click Replace Driver

Open SDRSharp.exe and set the "Source" drop down box to 'RTL-SDR (USB)'. This "Source" tab is on the top left.

Press the Play button (the right facing triangle). Your RTL-SDR software radio should now be set up and ready to use! If everything has worked you should be able to start tuning to frequencies.

Two important FAQ i copied also to this blog post as i never know how log the original resources will stay available:

Remote control
Some sellers opt to include the remote control that is used for changing TV channels. It is only useful for when the dongle is used for its original purpose - as a DVB-T HDTV receiver. The remote control has no purpose when the dongle is used as an SDR.
(I did not check/test if the remote sends radio or IR signals.)

The original purpose of the dongle was for DVB-T TV, and it can still do this. But please note that the DVB-T drivers and the SDR drivers are different, and they cannot both be installed at the same time. You can download the DVB-T drivers here. It is recommend using Prog-DVB as the TV software. 
(For me this was a little disappointment. I did not tested DVB-T on this Windows 10 system yet.)

User guide

As many things can be (wrong) configured using SDR radio read  to make full use of the device.
Also on YouTube instructional videos can be found.


For me using SDR# in the FM band worked with the included antenna after running install-rtlsdr.bat and Zadig. To find radio stations or scan a frequency range some fine-tuning of the RF gain was needed.
As already mentioned in some articles found on he internet VHF antennas like the provide antenna do not pick up HF signals very well.
It would be interesting to experiment also with some other antenna's.

The post on helped me a lot!

vrijdag 6 maart 2020

Shopping trolley lock

I always wondered how these gatekeeper shopping trolley locks work.
After watching Dave Jones EEVblog #1287 i decided to post some photo's of the trolley lock system of a shop in The Netherlands, Almere.
The lock mechanism in Dave's video is inside one wheel. The system in this shop uses a red block mounted near a wheel.

The range for the trolley is indicated by a red line on the street.
It is amazing to see how far a way is the limit for a trolley this relative small shop.
According to Dave's video there should be a wire with an active signal at this red line.

Some years ago i had a trolley with a locked wheel and a shop employee unlocked it. Recently i noticed this device and also include
a photo of it.

It contains a link to interesting the website of the company Rocateq who makes  this device.
I also did some searches on internet and found a user manual a download page of the company
with several interesting documents.
and YouTube is this video of the company

In the documentation two frequencies are mentioned
Frequency for locking & unlocking is 8.13KHz.
Frequency for mute is 318.06MHz

maandag 2 maart 2020

Car 12V interface

As (most) electronic projects need some power source i decided to create some tools for projects regarding power.
A long time ago i made a lab regulated power supply using a B3603 power and current regulator having a plus and minus banana-plug outlets. I also made some cables and connectors.
Recently i 'hacked' a car cigarette lighter socket containing 3 car power sockets and two USB connectors. I just cut the connection cable between the socket and the plug.

To the cables of the plug i added crocodile clips so i can use it to power projects from a car cigarette socket.

To the cigarette lighter socket cables i added banana clips. I also added a small box with a small DC voltage meter and female banana plug sockets. I can put the banana plugs in a 12 volt source. Check the voltage and use it on the sockets, the cigarette sockets or the USB power connector.
The reason that i added a small cheap voltmeter is that i not only want to use my lab power supply as voltage input. I also want to test batteries and other power sources perhaps with buck/boost convertors.

zaterdag 29 februari 2020


Found interesting cheap product on Aliexpress "Vampire Teeth Fangs"
A kind of white plastic/gel that easy can be given a shape in hot water.
It is sold to make temporary Vampire Teeth or other artificial false teeth. (So it should be non toxic as you can put it in your mouth.)
However it looks an interesting product to make other small plastic items. According to the description this gel can also be reused.
(There is no instruction how to clean it)

Instruction from the sellers website:
  • 100% high quality.
  • Quantity: 15g
  • Size: about 4mm
  • Using Instruction of Tooth Solid Gel
  • 1, Prepare a cup of boiling water and pour the amount of about 15 pieces of gel (for one piece of fangs)
  • 2, Stir in the cup and then get it out when it goes to be transparent
  • 3, Make the gel cooled for about 5 seconds after taking it out of the cup. And then put the gel in into the fangs’ slot so that you can glue the fangs to your own teeth, using your hands to squeeze the gel to both the gaps between teeth and the inner side of your teeth. This can make all of this to be a complete and compatible tooth socket.
  • 4, Get the tooth socket out and cool it for some minutes till the gel become white.
  • 5, Repeat these steps for another fangs. Please note that these teeth sockets can be used for several times.
  • Kindly Note: Please do not drink hot drinks when wearing the teeth sockets. Please be careful
  • when you are making the teeth sockets, do not be scalded!

Package content:

1x 15g Temporary Tooth Repair Kit Teeth And Gaps FalseTeeth Solid Glue(Not Including Fangs Dentures)

Q4 2019 i did buy it (together with some products from the same seller) for 1.20 € at (shipping from China). According to the sellers information it can be bought for about half the price in US. However it was not possible to ship it to where i live.
The volume/quantity was less than expected however sufficient to do some experiments creating small plastic objects.
As i do not have any reliable toxicity information i have some hesitations to use it for making false teeth and/or put it in a mouth. So any use like this will be at your own risk!

vrijdag 28 februari 2020

COVID-19 data -1-

With the current corona virus outbreak reliable data about occurrences is important.

In response to this ongoing public health emergency, the Johns Hopkins University, developed an interactive web-based dashboard (static snapshot shown above) hosted by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University, to visualize and track reported cases in real-time. The dashboard, first shared publicly on January 22, illustrates the location and number of confirmed COVID-19 cases, deaths and recoveries for all affected countries. It was developed to provide researchers, public health authorities and the general public with a user-friendly tool to track the outbreak as it unfolds. Further, all the data collected and displayed is made freely available, initially as google sheets, now in a GitHub repository, along with the feature layers of the dashboard, which are now included in the ESRI Living Atlas.
This is the data repository for the 2019 Novel Coronavirus Visual Dashboard operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CCSE). Also, Supported by ESRI Living Atlas Team and the Johns Hopkins University Applied Physics Lab (JHU APL).
The website and its contents herein, including all data, mapping, and analysis (“Website”), copyright 2020 Johns Hopkins University, all rights reserved, is provided to the public strictly for educational and academic research purposes. The Website relies upon publicly available data from multiple sources, that do not always agree. The Johns Hopkins University hereby disclaims any and all representations and warranties with respect to the Website, including accuracy, fitness for use, and merchantability. Reliance on the Website for medical guidance or use of the Website in commerce is strictly prohibited.

The data on github is available as .csv files. In this blog post i will explain how his data can be imported easy in a google spreadsheet. The data than can be used to create your own graphs or make special calculations.
In github you can view the *.csv data and the button [raw] opens a page with the raw csv file. Using the URL in the google spreadsheet function fills the spreadsheet with the github data.
 Currently there are 3 important time-series data files:

A simple recipe to get this data in your own google spreadsheet:

Create a spreadsheet with 3 pages.
Rename these pages to Confirmed, Deaths and Recovered.
Place cel A1 of each of this pages the link to the corresponding raw data. (See above)
Put in each of this three pages in another cell (e.g. in A3  this formula:


Each time this function gets executed it will grab the data from github.
So when the github data gets updated new data will appear automatic in your spreadsheet and can be used to create custom graphs, do custom calculations or use a special script in your spreadsheet.
This also uses some bandwidth an gives addition load. If you want to present this data give credits to Johns Hopkins University, respect their use policy and for a high traffic website better do not use this data direct as shown in this example. Grab periodical fresh data and use a local copy (e.g. with wget command in a cronjob.)

(Update 10 March 2020 : I added -1- in the title and added the COVID-19 label as i decided to do another post about COVID-19 data  perhaps more posts will follow. )

(Important (27 March 2020) see also as files in Github changed! )

ATTiny Charlieplex 4 RGB leds

Experimented using 4 charlieplexed RGB leds on a attiny85.
This experiment was done some time ago, and due to the result (watch video below) i hesitated to post it as at that time it was not complete successful.  There are several excellent resource that explain charlieplexing. Therefor i will not try to explain it in detail. In short as leds only light up when the current flows in one direction you can control more leds to a circuit.
I used the code below.


void setup() {              
  // charlieplex 4 RGB leds 0 1 2 3
  // initialize the digital pin as an output.

// the loop routine runs over and over again forever:
void loop() {
 int mydelay = 1000;

  LEDon(3, 2);  // 1R
  LEDon(3, 0);  // 1G
  LEDon(3, 1);  // 1B

  LEDon(0, 1);  // 2R
  delay( mydelay );
  LEDon(0, 3);  // 2G
  delay( mydelay );
  LEDon(0, 2);  // 2B
  delay( mydelay );

  LEDon(1, 0);  // 3R
  LEDon(1, 2);  // 3G
  LEDon(1, 3);  // 3B

  LEDon(2, 3);  // 4R
  LEDon(2, 1);  // 4G
  LEDon(2, 0);  // 4B

void LEDon( int gnd, int vin) {
  pinMode(0, INPUT);
  pinMode(1, INPUT);
  pinMode(2, INPUT);
  pinMode(3, INPUT);
//  pinMode(4, INPUT);
//  pinMode(5, INPUT);

  pinMode(vin, OUTPUT);
  pinMode(gnd, OUTPUT);
  digitalWrite(vin, HIGH);
  digitalWrite(gnd, LOW);


When you watch the video you seen some unwanted / unexpected flashes of an RGB led.
This is due to the fact that the attiny85 has an on-board led connected to one of the pins. This interferes with the charlieplexing. To remove this unwanted behavior of the RGB led you need to remove this led.
My first idea was to first make a recording of the correct behaving RGB leds before posting everything on my blog. I did not yet made a video recording after modifying an attiny85. However i later made a custom PCB for charlieplexing. I now decided to post it withe the error due to the led and make later a posting about that PCB where you can see the correct functioning of the RGB leds.

donderdag 6 februari 2020

FPGA first steps -1-

My last blog post was more than a month ago. However this does not mean that i did not projects or learned new things. For a long time i wanted to do something with FPGAs but never found a good way to start.
Recently i did some research how to start with board below 22 euro from AliExpress. I found some boards. e.g. the EP2C5T144 and EP4CE6E22C8N Altera FPGA Cyclone ii and iv development boards. These boards also need an USB blaster (that only a cost a few euros). They are not the newest boards but offer a cheap way to start.

Sooner than expected i received EP2C5T144 Altera Cyclone ii development board from China. This blog post is a short introduction also to log results of some of my experiments until now.
The Cylone ii is an older FPGA that is not supported anymore in the newest software only Quartus II version 13.1 (servicepack p1 version 13) or lower can be used. There is a free version of the software. Registration for download is required. The software can be a bit confusing as it has many options. The free version is sufficient to use the FPGA. Some options only work in the payed version.
There are warning not to use directory or file names with spaces.
The development board came together with an USB blaster. The 4 Dupont connectors 2*14 pin where not yet soldered.
On circuit diagram i found for this board is an IS61LV25616-10T memory chip. As mentioned in the text in the article i found this is more the explanation how to connect the chip as it is not on the development board. Perhaps if i ever make an expansion board ( JLCPB ) for this FPGA i will add this to the board as these chips are still available.
The board has two connection points for the USB blaster:
JTAG one close to the 2*14 pins for temporary programming using an *.sof file.
AS close to the edge of the PCB for more permanent programming using a *.pof file.
The board has a power led and 3 leds connected to the FPGA
Led D2 = PIN_3
Led D4 = PIN_7
Led D5 = PIN_9
For input there is one push button "key" connected to PIN144
Soon i discovered the FPGA is not powered over the USB blaster and needs a separate 5V power source. Fortunately i could temporary cannibalize a 5V power adapter with the right connection while waiting for a power adapter from China.
Replicating and adapting some simple experimenting with this FPGA i also discovered a little issue. Perhaps i do not configure the i/o the right way. Touching the push button with my finger (without really pushing) also had effect on the leds. I only could work reliable with the logic when using a pen or some other con conduction material to push the button This issue was not reported in the articles i read.
The one input pin also limits the possibilities for experiments so i decided to solder the Dupont pins. As i was soldering i also did put a 2 pin Dupont connector on P8 to easy access to the 5V power. I could resist my temptation to solder (more Arduino style) female in stead of male 2*14 pins. So i am still compatible with other FPGA owners.
This way it was easy to connect more buttons. Also input is more comfortable without issue when touching the button. I found a YouTube video with information where 5 buttons wired to pin 40 - 44 and the other side the button connected to ground. This is not explained in the video, however the next FPGA video of this YouTuber is explained that this connection to ground will give inverse logic (1 is default 0 = pushing the button). I did not repeated his experiment but used this configuration with graphical creating some logic in the Quartis ii. It did not work and i also could not find the setting for internally configuring a resistor for the input pin. Finally i changed the button connection from ground and connected it to VCC (3V3 pin 28 on P2). After this change my circuits did work.
However the leds also dimmed when i touched a ground connection with my hand. Even some times the leds reacted when moving my hand near the wires, especial when leds where not included in a circuit.
In an next blog post i will try to explain in more detail how to start using this interesting FPGA the software to create a project.
It is possible to start cheap with FPGA using an EP2C5T144
You also need a USB blaster and a 5V power supply and perhaps a soldering iron if headers are not soldered yet.
Use the free software Quartus II version 13.1 (or below) as the higher versions do not support the Cyclone ii anymore. Do not use space character.
It is nice to also have some buttons and Dupont wires as this board only has one push button for input.