Bourns Optical Rotary Encoder PCB

I purchased a Bourns ENA1J serial rotary optical encoder. This control has a nicely weighted shaft that uses ball bearings. It is rated for >= 10 million rotations. The ENA1J outputs beautiful square signals (unlike mechanical rotary encoders). I think I paid USD$35 for this premium part. You will find optical rotary encoders on high end radios like the Elecraft K3 and professional mixer boards.

I designed a pcb that takes the quadrature output of the ENA1J into INT0 and INT1 inputs of the  ATMEGA328P mcu. A pin header gives access to the I2C bus that allows this to be used as a satellite peripheral.

encoder pcb

Two timezone network (NTP) clock

I’ve been looking for a two time zone clock that display my time zone (pacific) and GMT. A lot of Amateur Radio operators use GMT for logging. I built this network aware clock using an Arduino Pro mini, two Sparkfun 7-segment displays, a I2C RTC, and an ENC28J60 cheap Ethernet PCB.

There is an Arduino library Ethercard for the ENC28J60 with built-in API’s for DHCP, DNS, and NTP. The clock goes fetches the current time from an NIST NTP server, and updates the RTC every hour (perhaps too frequent). The display time is always derived from the RTC. With a backup battery in the RTC, this thing can go for days or weeks without a NTP update.

The ENC28J60 draws about 180ma. In total, the units draws about 200ma current.

The Sparkfun 7-Segment displays are based on ATMEGA328’s. This design could be simplified using one of those instead of the Arduino Pro Mini.

NTP Clock - New Page

2tz clock

Arduino clock with network time

This weekend’s project is to pull out a [cheap] ethernet board that utilizes a ENC28J60, and build an NTP client that can display the time on a Sparkfun I2C 7-segment display. This is a building block for a future project that will integrate two displays (one that shows local time and the second for GMT) and use an RTC in addition to NTP.

I purchased the ENC28J60 board from Aliexpress at least a year ago. Getting DHCP to work correctly was the hardest part of this project. I never got DHCP to work correctly; in the end I resorted to using a static IP. It appears that the ENC28J60 does not like DHCP served up across a vlan boundary. I use multiple vlans in my house, and a Cisco L3 switch provides DHCP. The DHCP client gets an IP, but the final DHCPACK seems to get lost on both sides. Maybe I’ll pursue this further someday.

arduino NTP clock

blinkm

Got a RGB led: blinkm. These are cool. The kids liked them. Can’t imagine buying more than one because of the price.

Quality time with the Byvac BV4213

I found BV4213 on ebay back in early January. The 4WD dfrobot chasis has four discrete motors. All the commonly available Arduino motor shields only support two channels. The BV4213 is a solution to this. Each board is about 2.5cm square; it provides full PWM and directional motor control to two motors per board. You communicate with it using I2C. Using two of these boards, I have discrete control over all four motors and free up four pins on the primary Arudino (now a Mega…so it does not matter that much.)

A few days ago I finally got the test command on the BV4213 to return a test signal. It’s alive! Today I started writing direction and PWM commands to it. I have not yet figured out the behavior of PWM when you change its value. It seems to lag a bit. I’ll post some code when I get it cleaned up.