Arduino nano and CJMCU board, 1 side PCB

Using only 1 side PCB, no wires and requiring minimum space.

Quadrature encoder pins go to Arduino Nano’s interrupt pins.

Digital side RST, A07, A04, A03 and A02 are not connected.

CJMCU motor board is the tipical ST VNH2SP30 chinese board (I’ve more posts about it)

I’ve put it vertically.



Snort in Debian 8 Jessie

DEbian Jessie doesn’t have a package for Snort so I’ve at least two options, compile from source and take it from testing. I don’t want to have broken packages so I won’t add testing to my sources list directly and I will only use it for specific packages, in this case snort.
It works and nothing is broken.

vim /etc/apt/apt.conf.d/99defaultrelease:

  APT::Default-Release "stable";

vim /etc/apt/sources.list.d/stable.list

  deb    stable main contrib non-free
  deb-src    stable main contrib non-free

  deb         stable/updates  main contrib non-free

vim /etc/apt/sources.list.d/testing.list

  deb    testing main contrib non-free
  deb-src    testing main contrib non-free

  deb         testing/updates  main contrib non-free

apt-get update

apt-cache -t testing search snort

  snort - flexible Network Intrusion Detection System
  snort-common - flexible Network Intrusion Detection System - common files
  snort-common-libraries - flexible Network Intrusion Detection System - libraries
  snort-doc - flexible Network Intrusion Detection System - documentation
  snort-rules-default - flexible Network Intrusion Detection System - ruleset

apt-get -t testing install snort


Now my Ansible code

- hosts: 
  gather_facts: yes


  - name: Copy defaultrelease for apt
      src: files/99defaultrelease
      dest: "/etc/apt/apt.conf.d/99defaultrelease"

  - file: dest=/etc/apt/sources.list.d/ state=directory

  - name: Copy stable and testing sources
      src: "files/{{ item }}"
      dest: "/etc/apt/sources.list.d/"
      - stable.list
      - testing.list

  - name: Update apt cache if needed.
    apt: update_cache=yes

  - name: Install Snort
      name={{ item }} 
      - snort
      - snort-common
      - snort-rules-default 

nvidia Jetson TK1 board dead

U-Boot SPL 2014.10-rc2-00001-g9f88c9e (Dec 01 2014 – 14:29:15)
[0000.000] [TegraBoot] (version UNDEF_BUILD)
[0000.004] Reset reason: power on reset
[0000.008] Processing in recovery mode
[0000.011] Established communication link with host
[0001.088] Downloaded bct successfully
[0001.093] No Battery Present
[0001.097] Sdram initialization is successful
[0001.111] Downloaded DTB successfully
[0001.138] No Battery Present
[0001.227] Downloaded bootloader successfully
[0001.231] CPU-bootloader entry address: 0x83d88000
[0001.235] BoardId: 375
[0001.238] Vpr Carveout Base=0x0f4600000 Size=0x00ba00000
[0001.243] Tsec Carveout Base=0x0f2600000 Size=0x002000000
[0001.248] Lp0 Carveout Base=0x0f25ff000 Size=0x000001000
[0001.253] Xusb Carveout Base=0x0f2300000 Size=0x000200000
[0001.258] Platform-DebugCarveout: 0
[0001.285] NvTbootI2cClearBus(): error code 0x00045004 Invalid register value in bus clear status register
[0001.294] NvTbootI2cDeviceWrite(): error code 0x00045004 I2c Open Failed
[0001.301] NvTbootI2c: Read failed for slave 0x80, offset 0x00 with error code 0x00045004
[0001.308] FAILURE in NvTbootConfigureCpu
[0001.312] Error is 45004

More info about the error 45004:

0x00045004, “The controller reports the error during transaction like fifo overrun, underrun”)

So basically it needs I2C to boot and it doesn’t work.



usb hub review



Bus 003 Device 030: ID 8564:1000

An unbranded Chinese 10 port usb hub

I plugged a usb stick on each port and used usb-devices to check how they're named.

Each written line is a port from 1 to 10

T: Bus=03 Lev=03 Prnt=09 Port=00 Cnt=01 Dev#= 14 Spd=12 MxCh= 0
T: Bus=03 Lev=03 Prnt=09 Port=01 Cnt=01 Dev#= 13 Spd=12 MxCh= 0

T: Bus=03 Lev=04 Prnt=10 Port=00 Cnt=01 Dev#= 16 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=10 Port=01 Cnt=01 Dev#= 17 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=10 Port=02 Cnt=01 Dev#= 18 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=10 Port=03 Cnt=01 Dev#= 19 Spd=12 MxCh= 0

T: Bus=03 Lev=04 Prnt=11 Port=00 Cnt=01 Dev#= 20 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=11 Port=01 Cnt=01 Dev#= 21 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=11 Port=02 Cnt=01 Dev#= 22 Spd=12 MxCh= 0
T: Bus=03 Lev=04 Prnt=11 Port=03 Cnt=01 Dev#= 23 Spd=12 MxCh= 0

It seems it has 3 hubs inside. one for ports one and two and the other two hubs and then another two hubs.

The red leds cannot be turned off without desoldering. The board is made of bakelite and is brittle but does well inside the plastic enclosure.

VNH2SP30 CJMCU single motor Arduino test code


Arduino Test Code

      EN (Diagnostic) and 
      CS (Current Sense would go to analog in)
      are not connected.
      GND to Arduino nano's GND
      +5V to Arduino nano's VIN

    int PWM  = 3;  
    int InA = 7;
    int InB = 8;
    int PWM_val = 64; // 25% = 64; 50% = 127; 75% = 191; 100% = 255

    void setup() {
      pinMode(InA, OUTPUT);
      pinMode(InB, OUTPUT);
      pinMode(PWM, OUTPUT);

    void loop() {
      // Turn CW ClockWise  
      digitalWrite(InA, HIGH);
      digitalWrite(InB, LOW);
      analogWrite(PWM, PWM_val);
      // Turn CCW Counter ClockWise
      digitalWrite(InA, LOW);
      digitalWrite(InB, HIGH);
      analogWrite(PWM, PWM_val);

This can work as a unitary test code for those cheap chinese boards. Their price is cheaper than the unitary chip price from ST.

Power consumption on the rover

lsusb -v

Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
MaxPower 100mA

An Arduino Nano also reports 100mA but according to the datasheet it requires less than 20mA in normal use and 50mA is more likely.

10 Arduino <= 60mA*10 = 600mA = 0.6A @5V
2 Usb Hub <= 100mA *2 = 200mA = 0.2A @ 5V
1 Jetson TK1 <= 2-3A @ 12V

All that has to be powered by a Poweradd Apollo Pro

— Output: 1 x USB 5V 2.1A + 1 x DC12V/16V/19V 3A
— Solar Charger: 15V 150mA (max)
— Size: 224.79 x 124.96 x 21.84 mm
— Weight: 489 g

I will tear apart the powerbank to see what is inside before choosing it.

Some people said it had 18650 cells inside.

The 18 represents the cell’s diameter, in millimeters.
The 65 represents the cell’s length
The 0 represents that the cell is round

its thickness is 21.84 mm so it might be possible.


The rover is supposed to carry a Kinect v1 and this one requires 12W @ 12V/1A