Saturday, July 1, 2023

Cytron Robo Pico review


Cytron send me a new product, Robo Pico (link) together with Pico W (link2) for review and here are the essential summary. 

Unboxing & PCB layout

  • the box comes with Robo Pico purple board
  • 4 x grove cables to 4 female dupont
  • cute mini screw driver
  • nice purple soldermask PCB
This Printed Circuit Board (PCB) is well designed with CLEAN and CLEAR labels on front and back of PCB. All pins  are CLEARLY labeled without the need to refer to the documentations. I really ike the flexible power options to power up this board from USB, DC in and also Li-Ion battery + charging options al bult-in.

Flexible power options + battery charging

  • USB Micro from the Pico/Pico W
  • DC-in ( 3.6 - 6V ) ( green screw terminals )
  • single cell LiPO/Li-Ion battery ( ph2.0 connector )
  • Built-in 1-cell charger to charge the battery when USB is plugged in.
  • On / Off switch

Available Ports

  • 2 x 20 ways female headers for Pi Pico/W
  • 1 x reset button ( *** )
  • 2 x channel DC motor driver
  • 4 x servo motor ports
  • 4 x motor quick test buttons
  • 2 x user buttons
  • 7 x grove ports
  • 1 x maker port ( Qwiic / STEMMA QT / JST SH-4 ) 
  • 13 x LED indicators on all the non-power grove ports
  • 2 x RGB LED WS2812B/NeoPixels
  • 1 x piezo buzzer
  • on/off switch

Reviews & Sample Project

Being an Arduino site, I will do this review using Arduino framework with the following using the Raspberry Pi Pico / RP2040 by Earle Philhower ( arduino-pico ) and the documentation are located here

Since this comes with a Pico W with headers (link2), I decided to do a web controlled Servo + RGB LED using a slider.

I have hookup 2 x servo motors to GPIO14 and GPIO15 and a 18650 battery with a PH2.0 connector to the battery port.

This is the first time I m using the Pico W but I have been using Pico in my past project before. The amazing thing is ALL the past Wifi examples ( mostly from ESP32 ) JUST WORKS without any modifications to the source codes. If you are unsure which Pico to get, get the Pico W for future expandions.

The major differences between Pico and Pico W is that the Pico built-in LED is on GPIO25 where the Pico W have the GPIO25 driving the Wireless module.

I am utilizing the 8 blue LED ( above the 5 grove connectors ) as a left or right car signal indicator animations when the servo is turning to the left or right.

When the servo is turning left, the rows of blue LED will animate a left signal turn and then the servo is turning right, it will do the right signal animation.

The video for this review is located at

Here is the source code at

Compared to Maker Pi Pico

Robo Pico :

  • Have 2 x DC Motor drivers
  • Have 4 x Servo motors pins
  • Battery port and charging circuit 
  • 1 x Maker port ( Qwiic / STEMMA QT / JST SH-4 ) 

Maker Pi Pico :

  • SDcard slot
  • L/R audio output
  • 1 less WS2812B RGB LED

Summary Links

Contact Info 

Tuesday, February 21, 2023

Introduction to FPGA for Makers


For hobbyist and makers, exploring FPGA ( Field Programmable Gate Array ) is a major milestones as a maker. My experience with FPGA was when I was working for a web acceleration company that uses FPGA to accelerate web connections and DDoS prevention. 

My reasons to start exploring FPGA was when I was designing a hardware that requires me to support multiple hardware and sensors and ability to detect and use those hardware seemlessly.

As a maker, we always find the lowest cost method to get the best bang for the buck and secondly, it MUST be open source and not using any proprietary software as much as possible.

While exploring and searching for my FPGA, several FPGA brands appear quite often like Xilinx, Altera and Lattice. After much more digging, I found out that Lattice have very good support for open source hardware as they were the smallest of the 3 trios.

A few FPGA development boards caught my attention and one was really interesting ( and low cost too ), it was actually a LED Driver ( read more details in the link) called ColorLight 5A-75B with a Lattice ECP5 with 25k LUT, lots of pins, 2 x Gigabit Ethernet and external RAM. The reason I like this FPGA board is because during that time, I was also exploring and driving LED Panels with 64x64 pixels.

ColorLight 5A-75B

After some trial and errors, I managed to program the ColorLight to drive an actual 64x64 LED Panels. First time successfully program a FPGA.

ColorLight with LED Panels

The ColorLight was program using a FT2232 board that comes with 2 UART ports and commonly used in Lattice official development board.

FT2232 with ColorLight

One of the major drawback of this FPGA board - ColorLight was that it can ONLY have output ports and only 1 input port for the build-in button at the corner. that was because it was specially made to drive 5V LED Panels, 8 of them while accepting video input from the gigabit ethernet ports from the video server.

Many hardware hackers did a lot of hacking on this board like below :-

Lots of details here ( your starting point at first link )

After ordering the chips listed by the tweet, I proceed to swap out the 74HC245 with the bi-directional chip. The part number is SN74CBT3245APW

With some hotair, I pasted some kapton take to protect the plastic parts, the 74HC245 come off easily. After cleaning up the pads, I proceed to solder the new FET to the pads. Lets try with some solderpaste as the pins are very small and close together.

After blowing hotair, those solderpaste becomes a big solder bridge and I use a wick to suck up all excess solder on the pins. The results was good but just too much work. For the second chip, I just directly apply solder and and wick all the excess solder on the pins.

Here is the results after soldering two chips to the board. 

*** The input voltage must be lowered using a diode to 4.3V from 5V

After a successful test that the pins can support both input and output, I switch to use icestudio from fpgawars to program the FPGA using a graphical flow based interface with apio.


Above is the final picture with 8-DIP switches pmod as input and 8-LED tristate pmod as output.

summary Links

Friday, June 18, 2021

Per-key RGB for SVT RGB Dumbpad

For the next SVT Dumbpad iteration, I was exploring to add per-key RGB to the 4x4 keys. Here is how it all started.

While doing some research on what LED are commonly used for per-key keyboards, I found this page on Hackaday new-part-day-sk6812-mini-e introducing this new part called SK6812-mini E. This part is unique as it is a surface mounted parts but half of it goes into the PCB cut-outs.

SK6812-mini e
SK6812-mini e dimensions

The timing was perfect as this part (SK6812-mini e) was available from Lazada at a much cheaper price than previously publish at almost 67% lower. I order them and quickly cut the square holes and soldered them once they arrived.

SK6812-mini e front side

SK6812-mini e back side

Thanks for a few other open source keyboard designs, I figured out how to make the cut-out for the footprint for this special parts. As the part is soldered from the back of the PCB but the LED is front facing, I m really really afraid to screw up the pinout. I had to label them clearly ( DI and DO ).

SK6812-mini footprint

After adding the per-key LED with cut-out holes, I do not I have not enough space for the 4 LED WS2812B LED strips and had to re-position all the diodes and use actual WS2812B surface mount parts instead. I only have areas on the top and bottom part of the PCB for the WS2812B LED for the underglow LED.

SVT RGB2 3D Render

As I have NOT added so many LEDs ( 16 + 8 ) to the keyboard before, I was a little nervous about the 5V power consumptions  and add a three way solder bridge to be able to choose between underglow LED, per-key LED or both of them together. To use back the same SVT Dumbpad  firmware, I wire the four LEDs similar as the underglow so I have six parallel LEDs, four facing the top ( per-key LED ) and two facing the bottom (underglow).

The rest of the keyboard remain unchanged but I enlarged the solder pads of the diodes for easy hand soldering. Once the design was done, I usually waited a few more days just in case I think of last minute fixes or new features to add.

SVT RGB2 Dumbpad PCB

Once the PCB arrived, I quickly soldered those per-key LED first without even soldering the rest of the keyboard components. I just use mini grabbers and ran Arduino FastLED to test those LEDs to ensure all the 16 + 8 LED is working fine.

I spend so much time focusing on the SK6812 footprint I neglect the footprint for WS2812B that I have used in my previous product before. It turns out the silkscreen was flipped 180 degree but luckily the wiring was correct, so I de-soldered all the 8 WS2812B and re-solder them 180 degree flipped.

de-soldered WS2812B

SVT RGB2 Dumbpad

Testing per-key RGB LED

Picture without casing

As I also ordered some frosted acrylic, it looks really good on the new per-key RGB LED with diffused RGB lights coming out from the side and bottom.

Monday, February 1, 2021

RGB SVT Hotswap and Improvements

RGB SVT hotswap

This is the part 3, further improvements to the keyboard. As I was designing the keyboard, the biggest hurdle for consumer is soldering as not everyone have a soldering iron and tools at home. 

Kailh hotswaps

With this reason, I decided to move away from a soldering solution to a hotswap solution using Kailh hotswap PCB socket. As I have already design the top PCB plates for holding the switches, I just need to change the footprint to a hotswap only. I also moved the diode to the bottom layer for easier soldering or repairs.

RGB Kailh hotswap
Kailh PCB Socket
PCB with Kailh hotswap soldered

For this version, I will most likely sell them pre-soldered and qmk firmware flashed instead of in a kit form, so the customer can get add switches only without any soldering needed.

Extra RGB LEDs

Another "extra" feature, if you look closely at the end of the WS2812B LED RGB strip, you can actually add more RGB LED and extend it beyond the keyboard.

Extend WS2812 RGB

Just solder a wire to the middle DATA pin and extend the RGB strip outside of the keyboard. Just make sure you supply enough 5V power if the WS2812 RGB strip is very long.

For the firmware side, the following need to be change to reflect the number of RGB LEDs installed.

#define RGBLED_NUM 4

Change this number to the additional number of LED you added to the end of the RGB strip.

Final keyboard picture with Kailh PCB hotswap sockets with top support plates on acrylic enclosure.

Summary Links

Monday, December 14, 2020

QMK flashing and coding the SVT RGB 4x4 dumbpad

After more a week, the two black PCB sent for fabrications was finally back. Time to do some SMD soldering and figuring out on how to program the keyboard to work.

The RGB SVT source codes at Summary Links below.

SVT RGB dumbpad (front)

SVT RGB dumbpad (back)

QMK firmware

The Quantum Mechanical Keyboard ( QMK ) is an open source community centered around developing computer input devices. ( Text copied directly from QMK site )

It support a few commonly used micro-controller like Atmel atmega32u4, Freescale Teensy  and STM32 families of micro-controllers. For my case, the Pro Micro uses the Atmel atmega32u4, a popular choice for Arduino that can emulate a keyboard / HID devices.

As I am just a fork of the dumbpad keyboard, I will also just need to modify the same keyboard by modifying the keymaps and config files only. The QMK does NOT use the Arduino IDE.

As my primary computer runs on Win 10 , I will choose the Windows development tools and downloaded the following software. 

  • QMK Toolbox
  • MSYS2
  • VSCode ( I already have this ) 

The MSYS2 installation was not as straight-forward as I expected but after a few trial and errors, installing and re-installing Python, I found the missing piece. Open a MinGW 64-bit Terminal, I repeat, a MinGW 64-bit Terminal.

Once everything was setup successfully, it is time to do some code editing.

git clone the qmk firmware from github.
Go to the keyboard/dumbpad folder and open the config.h file, edit it with your favorite text editor.

Figuring out the LED pins

As the pins are following the Atmel port pins instead of the Arduino digital pins, I have to map this according to the LED I connected to the Pro Micro.

I was using port B6 as LED0 and port B1 as LED1
LED2 at port B3 is shared between LED2 or RGB LED pin.

I also noticed there are two extra on-board LED at port B0 and port D5, let's configure them as well. As the Pro Micro is facing downwards, the two on-board LED, will only shine downwards and not very useful in every use.

Below are the config.h for the LEDs

/* LED layer indicators */

// Using external LED for layers indicator

 #define LAYER_INDICATOR_LED_0 B6 // Red

 #define LAYER_INDICATOR_LED_1 B1 // Blue or Green

 // On-board LED for debugging

    #define LAYER_INDICATOR_LED_2 B0

    #define LAYER_INDICATOR_LED_3 D5

The next pin are the most exciting one, the RGB pins as below, you need to state the pin number and the number of LEDs on the LED strip. As I run them in mirror mode ( Both LED strip will display the same patterns, I just indicate 4 as the number of LEDs )

    #define RGB_DI_PIN B3

    #ifdef RGB_DI_PIN

    #define RGBLED_NUM 4

The rest of the RGB animations / patterns can be customized according to your own needs. 

Rotary Encoder

The next pins to configure is the rotary encoder, the dumbpad keyboard support TWO rotary encoder, I got both encoder working but the final version, I will only use one encoder.

I m using ENCODER0 connected to port D4 and B2.
ENCODER1 (unsued) is connected to port port D0 and D1

/* Rotary encoder */
// D1, D0 is right encoder
// D4, B2 is left encoder
#define ENCODERS_PAD_A { D4 } 
#define ENCODERS_PAD_B { B2 }

Once all the config.h pin definition is done, I make a copy of the default keymap folder for my keyboard, I called it svt_numpad

Key Mappings

Edit the keymap.c file, the default already have all the keys mapped.

From here, you can change the keys according to the documentation from QMK here.

RGB stuff here

        BASE LAYER
   |             |    7    |    8    |    9    |  Bkspc  |
   |             |---------|---------|---------|---------|
   |             |    4    |    5    |    6    |  +      |
   |             |---------|---------|---------|---------|
   |             |    1    |    2    |    3    |  -      |
   | Play/Pause  | TT(_SUB)|    0    |    .    |  =      |
                   KC_P7,    KC_P8,  KC_P9,   KC_BSPC, 
                   KC_P4,    KC_P5,  KC_P6,   KC_KP_PLUS, 
                   KC_P1,    KC_P2,  KC_P3,   KC_KP_MINUS, 
    KC_MPLY,       TT(_SUB), KC_P0,  KC_PDOT, KC_EQL
        SUB LAYER
   |             |         |RGB_M_SW | RGB_M_T | Numlock |
   |             |---------|---------|---------|---------|
   |             |         | RGB_M_B | RGB_M_R | RGB_MOD |
   |             |---------|---------|---------|---------|
   |             |         | RGB_HUI | RGB_HUD | RGB RMOD|
   |  MO(_DBG)   |         | RGB_VAI | RGB_VAD | RGB_TOG |
  [_SUB] = LAYOUT(
                 _______,     RGB_M_SW,    RGB_M_T,     KC_NLCK, 
                 _______,     RGB_M_B,     RGB_M_R,     RGB_MOD, 
                 _______,     RGB_HUI,     RGB_HUD,     RGB_RMOD, 
    MO(_DBG),    _______,     RGB_VAI,     RGB_VAD,      RGB_TOG
   |             |         |         |         |  Reset  |
   |             |---------|---------|---------|---------|
   |             |         |         |         |         |
   |             |---------|---------|---------|---------|
   |             |         |         |         |         |
   |             |         |         |         |         |
  [_DBG] = LAYOUT(                 
                 _______,     _______,     _______,      RESET, 
                 _______,     _______,     _______,      _______, 
                 _______,     _______,     _______,      _______, 
    _______,     _______,     _______,     _______,      _______

Summary Links

 Part 3 with additional modifications to support hotswap keys.


Sunday, November 22, 2020

Building a 4x4 mechanical keyboard with RGB and rotary encoder

Introduction ( Part 1 of 4 )

While browsing the local fb mechanical keyboard group, one member was doing a group buy on an interesting qmk firmware numpad called dumbpad from imchipwood. I always wanted a programmable numeric pad and a rotary encoder for multi function use.

SVT RGB dumbpad

Fork of Dumbpad

After doing some searching and looking at the nice pictures of this numpad, I decided to make my own version by forking the dumbpad. Unfortunately, it was designed in EagleCAD, a PCB design software I used to use long ago but switched over to KiCAD for most of my recent PCB designs.

With the KiCAD import tool, I imported the entire design to Kicad and start my journey in designing this simple keyboard.
Here are some initial enhancements I planned add to this 4x4 keyboard :-
  • RGB backlit using WS2812B
  • SMD components for PCB Assembly ( diodes, LEDs, resistors, buttons, caps )
  • Large solder pads so it does not peal off easily

The decision for using SMD components was so that I can send the entire keyboard for a PCB assembly services where you order all your components and PCB and the factory will do everything and send you back the completed PCB with all the components fully soldered. Another reason was because, once you go surface mount devices (SMD), you will NEVER go back to Through-Hole (TH) parts.

3-pin vs 5-pin

As I researched further, I noticed, without a top plates, the cherry mx style switches will need a 5-pins version for stability instead of the more commonly available 3-pins switch version sold locally. Most keyboard have a plate for stability and take some of the stress from the pressing force. Read more here on why use a plate.

3D drawings

I also added 3D models in KiCAD of the Cherry-MX switch and EC11 rotary encoder for matching the holes and visualizing the dimensions.

Large solder pads

Back to the drawing board, I made more and more changes, the only thing remain the same as the original was probably the position of the switch. I also added the 2 x RGB LED Strips using WS2812 LED strips.

I edited all the footprints and made it bigger for all the soldering pads. The above is a cherry-mx + rotary combo switch.

PCB Plates

Once I made the top PCB plates, more design changes are needed :-
  • Pro Micro cannot fit between the PCB and top plates with only 5mm clearance
  • Reset buttons need to be placed at the bottom
  • Experimenting a FR4 only without copper pour and soldermask so the LED at the bottom PCB can shine through it

Had to go research on various PCB face plates design from and reading various post on different types of design for this.

SVT RGB Plates

I finalized with this design and added more mounting point in case I need support from the PCB to the top plates. The Pro Micro, the micro-controller used in this design was swapped to the bottom and all the pins were swapped. I had to re-route everything again.

SVT RGB bottom layer

Just had enough space for two RGB LED strips with 4 x WS2812 each in between middle and bottom row.

I also added an jumper option for the 3rd LED to choose between LED or underglow RGB.

So far, it all schematics and PCB design without knowing will the QMK software even will work with the RGB LED underglow I just added.

Once the PCB was done, I have to do those boring stuff like ordering SMD parts ( 1N4148, Arduino Pro Micro, EC11 Rotary Encoder , knobs and other parts )

I check and re-check several times and held my breath and sent both the PCBs to the Seeed Studio Fusion Services

In summary here are the enhancements I have added to the original dumbpad :-

  • Added 2 x RGB LED strips for LED underglow
  • Switched all components to SMD
  • Large solder pads for switches
  • Flipped the Pro Micro
  • PCB Plates to hold the switches
  • LED shining through PCB plates
  • Enlarge all pads for the Cherry-MX-Encoder footprints
  • A few extra M3 mounting holes

Continue in Part 2 once I received back the PCB and started coding the SVT RGB dumbpad on QMK firmware

Summary Links


Related Posts Plugin for WordPress, Blogger...