vrijdag 20 november 2020

Found Emma 02 an RCA 1802 emulator

Just found Emma 02 , an 1802 Emulator that can emulates several RCA 1802 systems and could not resist trying a quick install, and it worked.

Internet home         https://www.emma02.hobby-site.com/
(Download             https://www.emma02.hobby-site.com/download.html )
Facebook               https://www.facebook.com/emma02.emu/
Github                    https://github.com/etxmato/emma_02

After the easy installation on my windows machine i did run it.
On the tab "Elf" i pushed at the [Start] button. (bottom left)In the green terminal screen 'For help type HELP.' at the >>> prompt type FOR NEW  or FOR OLD start a Forth.
(It is also possible to type FORTH , and the system wil ask OLD or NEW ) 

It is also possible to emulate other 1802 systems e.g. the COMX-35 (an RCA 1802 computer i never owned) that runs a Basic version.

donderdag 19 november 2020

FORTH on Arduino -3- (Funduino Joystick game shield)

Having eForth running on my Arduino testing some I/O is what i wanted. Some years ago i posted https://blog.jeronimus.net/2017/04/funduino-joystick-shield.html about an Arduino joystick / button shield. This cheap shield has a joystick some input buttons. (And some connection headers that i did not use in this test.)  
There are several versions of this board. I have the Funduino V1.A The shield gives your Arduino the functionality found on the old Nintendo controllers. It can be used for gaming or control hardware.
2 analog inputs and some digital Ideal to start with this this shield with eForth to do some simple input tests. 


The table below lists how the buttons are connected to the Arduino 

ArduinoButtonPort&bit
D2Key A UPPD2
D3Key B RIGHTPD3
D4Key C DOWNPD4
D5Key D LEFTPD5
D6Key E StartPD6
D7Key F SelectPD7
D8Analog buttonPB0
A0AnalogX JoystickAnalog0
A1AnalogY JoystickAnalog1


The ForthArduino1.pdf contains several I/O examples that can be tested with this board: 

For the analog ports
Paragraph 3.5 mentions
If you connect an external analog signal source to the A0 pin, then type the following commands to read its analog value:

27 C!    \ setup A0 as input pin, which is on PC-0 port
 1 28 C! \ turn on pull-up resister on A0 pin
40 7C C! \ setup reference and multiplexer inputs
C3 7A C! \ start conversion
78 ?     \ display results 78 = low byte 79 = high byte

Example for digital port  ( D8 PB0 button of joystick)

 0 24 C! \ make all Port B pins input
 1 25 C! \ turn on pull-up resistor for Line 8
23 C@  . \ read PINB port and show its contents

23 C@ . \ repeat with switch on and off

What i especially like about eForth on Arduino is that using the terminal you can interactively test and play with the system to adapt it to your own needs.
The AVR Family databook / ATmega328P datasheet contains detailed info about all the internal registers. Also the multiple functions of the pins are explained.
Also you can find the info that i summarized in the table below.


Data register

Data direction
 register
Input pin address

PortBPORTBDDRBPINB
D8
Analog button
0x05 (0x25)
0x04 (0x24)
0x03 (0x23)
PortCPORTC
DDRC
PINC

0x08 (0x28)0x07 (0x27)0x06 (0x26)
PortDPORTD
DDRD
PIND
D2-D7
Key A - F
0x0B (0x2B)0x0A (0x2A)0x09 (0x29)





For reading the other buttons you need to read portD.
 0 2B C! \ make all Port B pins input
FF 2A C! \ turn on pull-up resistor for all lines
29 C@ .  \ read PINB port and show its contents

Some simple words to play with the shield and print the output :
: .PD  0 2A C! FF 2B C! 29 C@ . ;              / Print PortD  ( Buttons)
: .PB  0 24 C!  1 25 C! 23 C@ . ;              / Print PortB ( Joystick button)
: .PX 27 C!  1 28 C! 40 7C C! C3 7A C! 78 ? ;  / Print Joystick X value
: .PY 27 C!  1 28 C! 41 7C C! C3 7A C! 78 ? ;  / Print Joystick Y value
: .JOY .PB .PX .PY ;                           / Print all Joystick values

I used short cryptic words like .PB. More descriptive would be .PrintPortB, For playing with the system it would require more typing more characters. 

In Forth it is also possible to change the output to binary to easy see the bits corresponding to each button:
2 BASE !   /  Set Binary output 
HEX        /  Set Hexadecimal output

Hope this Arduino Forth ( eForth) introductory blog article can be help others starting to use Forth on Arduino.

dinsdag 17 november 2020

FORTH on Arduino -2-

When i wrote FORTH on Arduino -1- i had some open questions. Now i have some answers and info how to proceed. I did not try it yet. However i like to post it as a short quick update about  eForth in my 'FORTH on Arduino' series.

- To trick the Arduino so it will start a special Forth word if no terminal input is received within a certain time or depending on a High or Low value on an Arduino pin to create a simple reconfigurable embedded Forth system. should be quite easy. In the book 'eForth and Zen' and especially the ForthArduino_1.pdf  ( Tao of Arduino ) by Dr. Chen-Hanson Ting is info how to create a turn key system that, after a reset or at power on starts with Forth word.
A quote from chapter  "3.6 Build a Turnkey Application" where a forth word APPL is created:

To turnkey this application so that it executes APPL command on booting-up, type the following commands:
' APPL 'BOOT ! \ store address of APPL in variable 'BOOT
$100 ERASE \ erase flash
$100 $100 WRITE \ save RAM $100-17F to flash $100-17F
$180 ERASE \ erase flash if this page is used
$180 $180 WRITE \ save RAM $180-1FF to flash $180-1FF

- Using I2C can be done in different way. i would like to use the Arduino library and interface this to Forth. This to also know how to use other Arduino libraries and code that already works in a 'plain Arduino environment'.  I am still looking for more info about this.
Another option is controlling the IO pins fir I2C direct from within Forth as e.g. explained in   https://arduino-forth.com/article/arduino_I2Cinterface


FORTH on Arduino -1-

 FORTH on Arduino

Before trying to install a Forth where changing the bootloader is needed i wanted to experiment with Forths that are more 'plug an play'.

First i tried Yaffaforth

After downloading unpacking it tried to compile it. Seemed that it also needed install FreeMemory. After installing this and spending more time than desired it still kept giveing error messages e.g. 'ip' was not declared in this scope .

As in the Yaffaforth information i found on internet a relative old Arduino version is used and the Yaffaforth is also relative old i decided to try stop and try another Forth for Arduino.

Therefore i moved to eforth of Dr. Ting . This Forth compiled without problems on my PC. Also uploading to the Arduino was easy.

The only issue that needed to be fixed was my terminal configuration. In the code i found the baud-rate and i needed to adjust some CR LF settings. It looks great however i did not yet had time to read all documentation to find a solution for the following issues:

- I want to use more IO including I2C within Forth on my Arduino.

- BUILD DOES> that later changed to CREATE DOES> is not available in eforth. I wanted to use this like i used it years on my RCA 1802 computer.

- How to trick the Arduino so it will start a special Forth word if no terminal input is received within a certain time or depending on a High or Low value on an Arduino pin. This to create a simple reconfigurable embedded Forth system.

So i still have a lot to learn and hope to post something about this process on this blog.. eforth seems a great Forth for Arduino. It was easy to install was for me worth the time spend and i want to investigate it further as you also seem to have access to all arduino libraries.

maandag 16 november 2020

EPROM programmer -2-

This is part 2 of my post about my EPROM programmer. I did not yet tested the EPROM programmer however i want to report that i have tested the I2C_EEPROM that i mounted on my board.

As i mentioned in my last post , having an EEPROM on a UV EPROM board is perhaps a little confusing. It think it can be a valuable add on. Use cases for the additional EEPROM can be;

  • using the EPROM programmer as stand alone device to write the same program to several EPROMs
  • reading several EPROMS to the EEPROM for later investigation
  • comparing EPROMs with EEPROM
  • creating an EPROM emulator
  • using a spare PCB of this programmer to add an I2C_EEPROM to a project (most PCB manufacturers (like JLCPCB send out multiple PCBs)
  • .........

I have recently tested an I2C EEPROM on my PCB and it works fine.
The first sketch used for testing is the sketch below (as found at several places on the internet) and some variants i created of it:
/*
* I2C EEPROM sketch
* this version for 24LC128
*/
#include <Wire.h>
const byte EEPROM_ID = 0x50; // I2C address for 24LC128 EEPROM
// first visible ASCII character '!' is number 33:
int thisByte = 33;
void setup()
{
Serial.begin(9600);Wire.begin();
Serial.println("Writing 1024 bytes to EEPROM");
for (int i=0; i < 1024; i++)
{
I2CEEPROM_Write(i, thisByte);
// go on to the next character
thisByte++;
if (thisByte == 126) // you could also use if (thisByte == '~')
thisByte = 33; // start over
}
Serial.println("Reading 1024 bytes from EEPROM");
int thisByte = 33;
for (int i=0; i < 1024; i++)
{
char c = I2CEEPROM_Read(i);
if( c != thisByte)
{
Serial.println("read error");
break;
}
else
{
Serial.print(c);
}
thisByte++;
if(thisByte == 126)
{
Serial.println();
thisByte = 33; // start over on a new line
}
}
Serial.println();
}
void loop()
{
}
// This function is similar to EEPROM.write()
void I2CEEPROM_Write( unsigned int address, byte data )
{
Wire.beginTransmission(EEPROM_ID);
Wire.write((int)highByte(address) );
Wire.write((int)lowByte(address) );
Wire.write(data);
Wire.endTransmission();
delay(5); // wait for the I2C EEPROM to complete the write cycle
}
// This function is similar to EEPROM.read()
byte I2CEEPROM_Read(unsigned int address )
{
byte data;
Wire.beginTransmission(EEPROM_ID);
Wire.write((int)highByte(address) );
Wire.write((int)lowByte(address) );
Wire.endTransmission();
Wire.requestFrom(EEPROM_ID,(byte)1);
while(Wire.available() == 0) // wait for data
;
data = Wire.read();
return data;
}

However i did first run an I2C scan program to check the ID of the EEPROM. And with the EEPROM connected i found indeed the ID value 0x50 as used in the script.
Reading writing to te EEPROM works fine. Next step to make EPROM programmer working is testing and writing code for the SN 74595 shift registers.


Meanwhile i am also working on a redesign of my EEPROM shield for multiple EEPROMs. I did not yet order my first design at e JLCPCB  as i had some ideas for improvements and features that i wanted to add. 
On my 'Arduino to do list' is also writing a a better memory dump program for these EEPROMs and also running Forth code on the Arduino Uno.

zaterdag 17 oktober 2020

My first computer and Forth

When I needed to select my career it was difficult to choose between chemistry and electronics. I decided to go for (analytical) chemistry and kept electronics as a hobby. In my last years at school computers were just coming. The last years i went to school there where 4 terminals (with one printer) connected (i expect via a phone line) to a computer somewhere else and we had to write some computer programs in Basic as exercise.   

There I became fascinated by computers, did know a little bit of electronics, and after finishing school I started working in a pharmaceutical company. 

I wanted to know more about the link between the electronics and computers. In the Popular Electronics Magazine i found an article about the 1802 microprocessor. That was the first article about a microprocessor where I at least thought that I understood something a little bit. Magazines spread interesting articles over multiple editions, so a month later i also needed to buy the next edition as, i expect for a business model, most interesting articles were spread over multiple editions. After this I did read articles about other microprocessors, however at that time a lot of it was very complicated for me.
As the desire to have a real computer for my own grew I started investigating options. I already had a programmable calculator. Buying a ready computer was, at that time, not an option. The only little affordable options were some microprocessor kits and I decided to buy an ELF II with an 1802 processor.

For me important features were that it had a graphic chip so you could create some (black and white) graphic output to display on a TV and the architecture and instruction set of the 1802 was easier for me to understand than that of other processors. I ordered a kit and after soldering I got the ELF II with its 256 byte (¼ k) ram, the graphic processor, a hexadecimal display, a hex keyboard working and started leaning more.

Very soon I also needed the expansion board with a 256 byte containing a small monitor program. The most important in the 256 byte rom was a program to read and write memory to an audio cassette recorder using simple hardware interfaces on this board.

Some of the 256 byte memory was also used as memory for graphics on the TV. 256 byte (¼ K) is not much so I kept looking at the slowly decreasing price of additional memory.
At some point I decided not to for the 4K ram memory board and made a big jump by buying a 64K ram board with 48K ram. I expect it was around that time that my boss told me that it was a little crazy that I had a computer. However he understood it as i was only living during the weekends with my parents a little more than 200 km away from my work. From Monday till Friday I lived in a small room near my work and could enjoy my computer.

And with the huge amount of memory it became possible using programming languages on the ELF II 1802 processor. However often the programming languages used a terminal on the RS232 interface and that was, after already spending more than a month's salary on my computer, above my budget. However i did buy a kit for an ASCII keyboard over the parallel port. 

There was Chip8, Pilot and from a magazine i did type over a terminal program using the video chip using black and white characters. I could not use Basic as this language needed an external terminal on the RS232 port and there was no info or source code about its internal working.

And then there came Forth. I got a cassette tape and a print of the 1802 programming code for Forth also using the RS232 interface. However the standard Forth interface uses only 3 important routines. ?KEY and KEY to check and get input from the keyboard and EMIT to output one character. Making ?KEY and KEY work was not that difficult and in my first Forth experiments i used the hexadecimal display with a button to go to the next character after reading the HEX Ascii value and decoding it to the ASCII value.

My plan was interfacing Forth with the 1802 terminal program as that seemed possible as the source code of these two programs was available. This was my first real big IT project and I am still proud that I, on my own, could make this work.

The first,and easiest step was to move the terminal program (and video memory) to another part in memory. After that came the bigger challenge. The 1802 processor has 16, almost identical, registers of 16 byte. Each of these registers can be assigned as a program counter, stack pointer, a pointer somewhere in memory or to store a bite in the high or low part. These registers are also used in the Forth implementation for the 1802 processor.
However these 16 registers ( 0 to F) are almost identical, not completely!
R0 was (also) used for DMA, direct memory access for the graphical display chip.
After a hardware interrupt (also used for the video display) R1 became the program counter and R2 became (assembler) stack pointer. Also some of the registers were used in the terminal display program.
As these registers were also used in the 1802 Forth code i needed to change this in the Forth code. Nowadays this would be easy. At that time I did not have a working assembler. Only the hex keyboard, a hexadecimal display, a simple monitor program in the rom to inspect and change a hex address using the limited I/O. And after making changes I needed to store my work on an audio cassette tape to continue on another day.  Printing a version with changes was not possible as a printer was not available. So i used a paper notebook to keep track of changes to do and done.

The video display worked using the interrupt code and DMA (direct memory access). Every time to display memory data on the TV screen the video chip gave an interrupt.. It did set R0 to the beginning of the video memory and some other housekeeping. As Forth and the Terminal program used the registers. Also a small assembler program that saved and retrieved some of the 16 registers in memory when going from Forth to the Terminal display program and vice versa was added.

After many evenings of work the changes in the code where ready and the Forth ok prompt appeared on my black and white television and my adventure could continue on a higher level. 

donderdag 8 oktober 2020

EPROM programmer -1-

I have several old UV erasable EPROMs that i want to use.
The UV EPROM ereaser orderd on AliExpress for using the EPROMS came sooner than expected. Now i also have received the PCB that i designed for the programmer and soldered some components on it.
For the programmer i wanted to use an Arduino and an external power supply for the programming voltage. The datalines will be directly connected to Arduino pins. For the address bus using a counter (or bigger an Arduino with more pins) would be the most easy solution. I want also to read data and select addresses without the need to count. In this first test circuit i want to use an Arduino Uno and a shift register to output the address.

As the PCB had some open space and there where also some unused lines from the Arduino and the shift register. I decided to add some useful (optional) bonus items on the PCB.

  • Pushbuttons (reset and an extra)
  • Leds
  • Buzzer
  • Voltage divider with two resistors to measure the programming voltage with an Arduino analog input port.
  • EEPROM (additional storage)
    Having an EEPROM on a UV EPROM board is perhaps a little confusing. It think it can be a valuable add on. Use cases can be; using the EPROM programmer as stand alone device to write the same program to several EPROMs, reading several EPROMS to the EEPROM for later investigation, comparing EPROMs, creating an EPROM emulator etc.

 


The first item i want to test on this PCB is the EEPROM. I hope soon on my blog will appear a post about this.
Testing of the UV EPROM i want to do after having more (programming) experience with the shift registers.
A project currently in progress is a special Arduino shield PCB to test and play with shift registers (and leds) This is a separate project i want to do before real EPROM programming. I ordered my EPROM programmer PCB at JLCPCB with the cheapest (slow) shipping service together with some other PCBs including the shift register test shield. With JLCBP (and some other PCB manufacturers) you currently get multiple PCBs for a very low price.

A project i want to do is a EEPROM test shield. I already designed this test shield however first i want to test my EEPROMs (using this EPROM shield) before ordering the EEPROM test shield.

There are also some other finished projects i want to publish on my blog. I hope you visit by blog again soon, and by that time there is also a post about my first EEPROM test results. 



dinsdag 6 oktober 2020

Metal detector -2-

 After building the metal detector kit from the first blog post i received another DIY kit from Aliexpress for a metal detector. From this version i ordered (and received) two. Until now i only assembled one) . I did not (yet) find the circuit used in this version however as it contains other parts as than the first kit the circuit must be different.

The kit contains more transistors than needed so after building an testing i now have some extra transistors. An instruction manual or schematic was not included. Information which components to place where was on the PCB



I included a photo of the front and back of the PCB.

After assembling i powered the metal detector using 3 1.5 AA batteries (= 4.5V). This metal detector seems to work better than the one in my Metal detector -1- blog post. This second metal detector only has a buzzer. not an led. See picture below. It only gives a signal when metal is near the PCB. (It is possible to create a (false) signal by moving the batteries and battery wires near the detection coil. The pot meter can be used to adjust the sensitivity.

I have found a circuit for a metal detector using a 555 timer and i have some of these 555 times i stock.
Perhaps, some time, i also build a metal detector using the 555. However i  am also working on other projects and received some PCBs and other components for these project. And for now i have a nice working metal detector so i want to give priority for these other projects. 


zondag 4 oktober 2020

Metal detector -1-

Recently i did buy this cheap DIY metal detector kit at Aliexpress.

Here some pictures of the parts ant the assembly. Soldering the components was not very difficult. As i wanted to use the power screw terminals in another project i soldered two Dupont pins instead for the power. In fact is was a three pin male Dupont pin where i removed the middle pin. The two outer pins where at exact the right distance on the PCB.




Below the circuit diagram for this metal detector found on the internet 


I did build and tested the device powering it with 3 1.5 volt batteries (=4.5V) on the Dupont pins. My device continuous gives a signal that changes a when near metal. Changing the pot meter gives a change in the sensibility.This metal detector continuous gives a sound. Don't know if this is due to an error or intentionally. I did not do much troubleshooting to see if it was due to an error made during building and if i could improve it as i don't like it.

This is part -1- of my post about a metal detectors as i also ordered another cheap metal detector and i want to compare them.

maandag 28 september 2020

EEPROMshield

The PCB design of my EEPROM test/development shield is ready. 
Hope to post soon (after receiving the PCB), more details and test results of this Arduino shield on this blog.
This PCB is a breadboard friendly Arduino shield for multiple EEPROMs.  September 2020 the final design (using EasyEDA ) for the first version this board was ready. However i decided to wait for ordering  this PCB until i tested an EEPROMs. 

zondag 30 augustus 2020

Mailbag 29 augustus 2020

Below new mailbag items.
As they are often needed for small projects some switches. On the photo you can see the foam package for protection during the transport.

 
As for less than 5 euro's it is possible to buy a small weighing scale on AliExpress For long time i had this on my wish list and some weeks ago I decided to buy one (300g/0.01g.). Not only can it become quite handy for counting electronic parts, I also hope to find time for chemistry or physics experiments. I expect it is more easy to use than the old analytical balance i have. When i started doing chemistry experiments many years ago i did never dream i could buy this instruments below 5 euros. I hope to do a full review including testing with some weights. What i already can say, it is small and looks nice. The front already had some scratches (see photo) and i had some trouble opening the back for placing the two AAA batteries. The 0.01 gram display looks stable during weighing 
 
Below some gloves to protect my hands. I was very happy with some other gloves i used before. However after some time working in the garden holes started to appear and I could not find the same one so i decided to try this gloves from China / Aliexpress.   

maandag 17 augustus 2020

EPROM eraser (UV)

Received an UV EPROM eraser from china so i can wipe the content some old classic memory chips that i still have so i can use them in future projects.  On the top right is the on/off switch. The 'rotating knob' on the top left is a mechanical timer to set the UV exposure time.
Here a picture where you can see the bottom. I don't know what is the original idea of the hole in the little drawer. When i switch the device on i can see some of the light inside this compartment where the EPROMS need to be placed.
The device came sooner than expected. I expected an EU power plug, however that is easy to fix. The 220Volt seems, according to the description no problem.
I don't have the electronic circuit ready to program and test the EPROM chips. Also there are some other activities and projects that have more priority. However at least now i have all the components to use EPROM memory. Perhaps i can even us it with some other UV experiments.
 

donderdag 13 augustus 2020

Digital Testpen

 A week ago i received a cheap digital test-pen from china. I already mentioned in my mailbag post that i would post something about two small cheap upgrades. 

This cheap device can be used to test digital signals. it contains of a pcb with a wire as test pin and Dupont cables and comes in a sealed plastic bag. There exist several schematics to build these kind of devices yourself. However this was a cheap (almost) finished product on AliExpress.
I did two little cheap hacks to enjoy the use of this device even more. However first a photo of the back of the pcb to get a complete visual impression of the device.

As not all points always have Dupont connections i added male Dupont pins to small alligator clips. Using this alligator clips attached to the wires the testpen can also be used if no Dupont pins with power are available in the circuit you want to test. 
After soldering i even decided to remove the plastic of the male pin.
The second easy and cheap hack is using transparent heat shrink over the PCB to protect it. It can be done very easy and adds protection to the test pen pcb circuit. All you need to do is cut some transparent heat shrink tube at the appropriate size. Put it over the pcb and shrink it with a hot air gun.
If you want even more protection you can use a hot glue gun to first add a glue layer. For my use of this device i expect the heat shrink tube will be sufficient. 
Below you see the result: 


woensdag 12 augustus 2020

Mailbag_09aug2020

 Some days ago i received some interesting items from Aliexpress / China. Time for another mailbag blog post!

UV detection card


I did see this item in a YouTube video. It is a cheap card an can be used to detect UV light. I did not yet test it, however it seems useful to have for my experiments with UV leds and lamps and other experiments with optics, The mall picture show the backside of this card.

Digital test pen

On Aliexpress i found this cheap digital signal test-pen to test 5 and 3 volt digital signals.  I hope to post soon on my blog some hacks/little improvements.

Pen with conductive ink


In several articles and YouTube videos people experiments with electrical conductive ink are presented.
It looks that you can easy draw your electronic circuit on paper and glue with conductive glue your components. I found this conductive ink on Aliexpress and decided to give it a try.
I did not yet full tested the product. Perhaps i did buy a to cheap conductive ink pen as it was more difficult than expected. Before the ink started flowing i had to shake the pen and to move the pen over the paper several times. When shaping the pen you hear a little ball (?) moving in the ink reservoir.
After trying to write suddenly ink starts to come out of the pen. With my multi-meter i measured the resistance and it was not conductive. To get a conductive line i had to write the same line several times and dry the ink with my heater that i normally use for heat-shrink tube. (First I did not yet use it for real electronic experiments.

Lamp holder

This are cheap lamp holders for GU10 lamps. I ordered some as i want to replace some halogen lamps with GU10 led lamps. At the local hardware stores (Praxis or Gamma) i could not find lamp withe the same diameter as the current halogen lamps.

Temperature sensors

These three legged items perhaps look as transistor. However they are cheap smart temperature sensors (DS18B20 ) .Two wires are for the plus (+) and minus (-) and one wire is used for data transmission to a micro-controller.  Several of these sensors can be placed in parallel and the temperature of each sensor can be read individual as all sensor have an unique address.


Hand drill

This little tool is something i should have bought sooner. In the few days i have it now i used it several times. It has a little drill chuck for little drills. This way i can easy make little holes e.g. in plastic and do not need to use a fast rotating electrical dill or Dremel or punch a holes with other tools.


dinsdag 21 juli 2020

LCD

Received two LCD displays from China.
Plan is to use them with my FPGA('s).
Therefore soldered Dupont connector pins (See pictures below).
Expect that for playing with these displays and posting something about it will take more time than the soldering....

LCD 1602


LCD 12864



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  
Results: 
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.