ZAViouR Lives!

After a painful few days programming, trying to identify why I couldn’t do a simple thing like load SRAM with data, I found that I’d mis-typed one of the port names in the init routine. After editing the single character that was incorrect, it sprang into action!

I quickly modified the program to load a ‘proper’ Z80 routine and tried it out. It was a simple program, loading 50 bytes of RAM positioned just about the main code with a value. I first ran the AVR code to load the Z80, then manually switched off the /BUSRQ line (a modification I had to hardwire to the board) and reset the Z80. I then ran a read program on the AVR and the value I’d chosen was there in the SRAM! I changed the value a couple of times and re-ran the test to verify it was working.

;Z80 Test Program

DESTINATION_SIZE equ 50
.org 0000h
start:
LD HL, Storea                                    ; point to the source
LD DE, Storea + 1                              ; point to the destination
LD BC, DESTINATION_SIZE – 1      ; copying this many bytes
LD (HL), 170                                      ; put a value in the 1st pos
LDIR                                                  ; move 1 to 2, 2 to 3…
Finish:
NOP
NOP
NOP
NOP
JP Finish                                              ;Infinite Loop
Storea:
DEFS 50

end

The next step is to re-write the loading program entirely, in a more tidy manner, and test the Z80 properly when the two missing chips for the output port are delivered.

I’d like to say a big thank you to Bill Rowe who gave me some great advice and suggested ideas as I went along. I’m sure I will find his help invaluable in the future as I develop the ZAViouR Board.

For those who would like to follow the progress as it happens, I have a Hackaday.io page devoted to the project. You can find it at: Hacakday.io

 Here’s a quick video of me resetting the board twice. You can see the /M1 light flicker (once I get my hand out of the way!) and then go off and on as the Z80 resets.

In the video you can also see the hard-wired /BUSRQ switch which will be re-routed to the AVR in the next version of the board. The next version of the board will have improvements based on experiences with the current version. It will have 64Kb of SRAM and the address lines will be driven from the AVR via a port expander. This will free up plenty of AVR GPIOs for other tasks.



Posted in Uncategorized | Comments Off on ZAViouR Lives!

AVR/Z80 Hybrid

The AVR/Z80 Hybrid boards arrived yesterday. Excellent service as always from Hackvana, my preferred fabricator. I set about constructing the first board. I’ve not included the output port on the first one since I haven’t got the two relevant 74′ chips in stock but they are on order and not necessary for initial testing.

AVR-Z80 Hybrid v1.01 Assembled and Bare

AVR-Z80 Hybrid v1.01 Assembled and Bare

It went together pretty easily. I soldered the chip sockets first, then the capacitors and then followed with the rest of the components. The Z80 is an original Zilog chip, one of a few I own. Before inserting the AVR, Z80 & AMIC SRAM, I tested the 7404 oscillator and all was well. I then plugged in the AVR and tested it by loading the standard ‘Blink’ program via ICSP, OK so far. I added the Z80, still OK and then the SRAM – Ooops! Dead short (indicated by my PSU going into Constant Current). After a quizzical few moments I realised I had plugged it in backwards! Doh! Luckily, I have a number of this chip if this one has failed but I reversed it and all is well.

I have started writing some test code which I will publish when complete and working. At the moment, the code is getting the AVR ports set up for sending data over to the SRAM. I’m currently working out the best way to convert a Hex or Bin file into something that the Arduino IDE will accept as data in preparation for sending byte by byte over to the SRAM.



Posted in Construction, Programming | Tagged , , , , , , , , , , | Comments Off on AVR/Z80 Hybrid

Universal Regulator Board

I have just published my design for a Universal Regulator Board in the Non-AVR Projects section. The idea behind it was that I was using much the same power supply for the majority of my projects, a 7805 and associated components. I thought it would be a good idea to design a PCB that could be configured to accommodate any of the 78XX devices and also the 78(X)XX devices (i.e. 78L05).

Universal Regulator Board v1.0 Gerblook Front

Universal Regulator Board v1.0 Gerblook.org Front

It features a polarity protection diode on the input, an optional power LED fed from the output and a snap-off heatsink support. Having built and tested one I found the snap-off to be a little stronger than I had imagined! However, it’s still functional.

I have already begun designing a new version with capability for more regulation devices. This will be released once fabricated by my favorite PCB fabrication house, www.hackvana.com, and tested but to whet your appetite:

Universal Regulator Board v1.1 Eagle Preview

Universal Regulator Board v1.1 Eagle Preview

This new version will be configurable for 78(X)XX, LM1117T and LM317 Variable Voltage regulators.

Another up and coming project is an AVR/Z80 Hybrid board. I’ve been a fan of the original Z80 microprocessor since the 80s when I used to program/hack and generally muck around with Sinclair Spectrums. For a goodly while now, I’ve had an itch to do some Z80 machine code programming just like in ‘The Old Days’ so I designed a board that accommodates a Z80 with 32Kb of SRAM, supervised by an Atmega1284.

Z80-Arduino Hybrid v1.01 Gerblook.org Front

Z80-Arduino Hybrid v1.01 Gerblook.org Front

The board includes a power light, an M1 indicator to show the Z80 running, reset switches for both the AVR and Z80 and an 8-bit output port for testing. This is very much a prototype and won’t be published on this site, however, if it proves to be successful, I have plans to double the SRAM and give the board a ‘proper’ expansion port. That design, if successful, will be published along with some sort of basic I/O expansion.

Initially, the AVR will have Z80 binary hard-coded into it so that when the board starts up, the AVR will suspend the Z80 with it’s /WAIT line, load the SRAM with the binary, assert the Z80’s /RESET line, drop the /WAIT and then drop the /RESET releasing the Z80 to run through the code in the SRAM. That’s the plan anyway.

Stay tuned…



Posted in Building, Construction, Design | Tagged , , , , , , , | Comments Off on Universal Regulator Board

ESP’ecially good!

The ESP8266 ESP-01/03 Flash/Proto v1.4 boards arrived today. I set about building one up to test it and it all checks out.

ESP-01-03 Flash-Prototype Board v1.4

ESP-01-03 Flash-Prototype Board v1.4

I used my usual SMD soldering technique of placing blobs of solder paste on each of the connections with a pointed tool and using an SMD rework station to melt the solder.

SMD Soldering by hand

SMD Soldering by hand

It’s not pretty but the PCB is readily cleaned with Acetone after all soldering is done (Read safety guidelines before using Acetone). My SMD soldering process is more fully explained in my earlier post: SMD Soldering Technique on my other website www.ProjectHAB.co.uk

The ESP8266 Flash/Proto boards were fabricated by the excellent Hackvana to their usual standard. Even the smallest silkscreen text is readable, even if I do need a magnifying glass to read it!

Having now tested the first board, I’m have published the design files on their own page: ESP8266 ESP-01/03 Flash Prototyping Board



Posted in Building, Construction, ESP8266 | Tagged , , , , , , | Comments Off on ESP’ecially good!

ESP8266 ESP01/03 Flash-Prototype Board

The ESP01/03 Flash-Prototype Boards arrived from the fabricator. Good quality boards in a reasonable time. Although not Hackvana (Sorry Mitch, I’ll be back for the next batch!).

ESP-01-03 Flash-Prototype Board v1.3

ESP-01-03 Flash-Prototype Board v1.3

Here you see two of the boards, one populated with an ESP-01 module, the other with an ESP-03 SMD module. Both work well but I have since found out that the ESP-03 module requires GPIO15 to be to be LOW during normal running or programing. Also, GPIO2 needs to be taken HIGH along with GPIO0 being taken LOW for programming. Hence the flying leads on the ESP-03 illustrated.

I am in the process of updating the board design to accommodate these changes and I’ve also taken the decision to make it fully SMD. This will make the board more compact and easier to use for IoT applications.

ESP-01-03 Flash-Prototype Board v1.4 SMD Gerblook

ESP-01-03 Flash-Prototype Board v1.4 SMD Gerblook




Posted in Design, ESP8266 | Tagged , , , , , , | Comments Off on ESP8266 ESP01/03 Flash-Prototype Board

Distractions (ESP8266 Flash Board)

Lately, I’ve been distracted from general AVR stuff by the now ubiquitous ESP8266. I purchased a few ESP-01 boards and an ESP-03 board a while before moving location and I’ve just got around to learning a little about them.

The first thing I did was rig up a small strip board PCB to aid in the programming. At first, I was powering the ESP module from the USB to Serial adaptor but I found that it wasn’t man enough. I modified the board to accept external power from my bench PSU and disconnected the +3.3V line from the adaptor.

ESP-01 Prototype Programming Rig

ESP-01 Prototype Programming Rig

This was just intended as a quick solution until I designed a proper PCB. Meanwhile, I discovered that you can use the Arduino IDE to program the ESP modules. I’m very familiar with the Arduino IDE so I installed the files required after downloading the latest Arduino software.

Having gotten interested in the ESP modules, I did some searching and one of the websites I came across was www.openhomeautomation.net Here was documented a way of logging Temperature and Humidity from a DHT11 unit connected directly to the ESP-01 module. You can see a DHT11 in the previous image in the top left of the PCB. I duly followed the instructions on the Cloud Temp/Humid Logger page and lo and behold, I had Temperature and Humidity values displayed on Freeboard (May not be up to date or accurate).

Although I had made the prototype configurable for programming and reading from the DHT11, I really wanted a dedicated board I could use, and one that would allow me to utilise the ESP-03 module that has lots of GPIO pins broken out. I set to work designing a board in Eagle.

ESP8266 Flash Board v.1.3 Eagle Preview

ESP8266 Flash Board v.1.3 Eagle Preview

This is the result. A general purpose board able to accommodate either the ESP-01 or ESP-03 modules. The power source is selectable from either the USB to Serial input header or a Micro USB connector/standard 0.1 pitch header. In the latter case, the voltage is regulated to 3.3V by the LM1117T device. The board also features a 3.3V zener diode on the RX pin of the modules to prevent over voltages over serial, a reset switch, power indicator LED and GPIO header.

Once the boards have arrived from the fabricator and I have checked them over, the design files will be available on a dedicated page licenced under Creative Commons Attribution – Share Alike v4.0 for anyone to use as they see fit.



Posted in Uncategorized | Comments Off on Distractions (ESP8266 Flash Board)

New minDUINO Variant.

Way back last year, before all the hassle that moving location entails, I started to design a minDUINO variant to work with the UKHASNet mesh network. Finally, having gotten settled down, to a degree, in my new location on the south coast of England, I have been able to continue.

I have designated the new board as minDUINO v1.6b. The major difference to the previous boards is that it runs on 3.3v rather than 5.0v. It utilises an LM-1117T regulator. Apart from that, it’s pretty much the same as versions 1.5, 1.6 & 1.7 apart from the additional resistor network, an ESP8266 WiFi module and an RFM69HW module for radio duties.

MinDuino v1.6b UKHASNet Node

MinDuino v1.6b UKHASNet Node

The RFM69HW is integrated on to the main board and the ESP8266 plugs into the header at the top of the board next to it’s associated component C10. Being based on the minDUINO, it retains all the programming and GPIO headers. I have added a header to access the RFM69HW’s GPIO ports as well. JP9 gives access to monitor the supply voltage pre regulator by connecting Vin to ADC0 on the ‘328 micro-controller and JP5 connects an optional indicator LED to D10 which the previous versions were hard-wired for. On the latest iteration of the board (not shown), there are also two through-hole test points to monitor the regulated voltage.

I have found it useful in the past to let a design sit for a while so that my brain can view it afresh and spot any glaring mistakes. My intention is to do so before having some PCBs fabricated by Hackvana. Eventually, the design will be published on the main minDUINO page under the Creative Commons Attribution Share Alike licence v4.0 for anyone to utilise as they see fit.

 

Posted in Uncategorized | Comments Off on New minDUINO Variant.

To Tweet Too Who

ProjectAVR now has a Twitter account. The truth is that it was getting a little confusing tweeting from the Project_HAB account about Project_AVR stuff. It needed to have it’s own account for organisation sake. Hopefully now, tweets from both accounts will make more sense.

ProjectAVR Twitter Icon

ProjectAVR Twitter Icon

Posted in Design, Social Networking | Tagged , , , , , , | Comments Off on To Tweet Too Who

Summer Developments

It’s been busy at ProjectAVR. I’ve been squirreling away, making up minDUINO kits for the Scouts JOTA event. They are almost finished now. Just a few last minute additions on back-order. The assembly instructions are complete with included circuit diagram and components key.

minDUINO Kits

minDUINO Kits

I managed to find the perfect sized boxes on eBay and print up some natty labels. I wanted to give the impression they were commercial kits.

A special mention has to go to RS Components who have shown outstanding generosity in not only sponsoring the components for the minDUINO kits, but also in supplying five soldering kits for the Scouts to use. These will be invaluable for building the kits but also for their ongoing education in electronics.

Meanwhile, ProjectHAB (still me!) has been working on a High Altitude Balloon payload to demonstrate to the Scouts for their JOTA event on October 19th. Hopefully the conditions will be right for a launch and tracking. I’m going to attempt to get the balloon to ‘Float’. This is when the ascent is slow enough not to rupture the balloon and maintain a steady altitude once it reaches a point of buoyancy. I’ll make an announcement for the launch closer to the time on this blog and on the UKHAS Google Group.

Several amazing achievements have been made in HAB (High Altitude Ballooning) recently. One HAB enthusiast, Leo Bodnar, has circumnavigated the globe with two different balloons, what’s more, they both orbited twice! Leo uses a clever combination of solar powered tracker modules and his own home-made envelopes (balloons) to do this.

B64 - Flightpath

B64 – Flightpath on Spacenear.us

B-64 Solar Payload

B-64 Solar Payload (Image Leo Bodnar)

Although I don’t expect to circumnavigate the globe with my Scout demonstration, I would like to get into a float and perhaps, be tracked into near Europe.

Another project I have become interested in is UKHASNet. This is an amateur sensor network. It is hoped to use the technology for tracking balloons too so it makes a nice crossover point. I have built two ‘nodes’ so far. One is a gateway and is connected to my main PC. It also samples temperature and sends that information into the system, as well as listening and repeating any other nodes it ‘hears’.

UKHASNet Node CFORD1

UKHASNet Node CFORD1

CFORD1, my first node, is based upon an 8-pin LPC810 programmable microcontroller and was designed by James Coxon. The firmware samples the temperature from the RFM69HW transmitter module and together with some other telemetry, it sends that via a serial link to the CR2012 module which converts the serial information to USB. This in turn is received by a Python script running in PythonWIN and then sent to the UKHASNet server.

My second node, CFORD2 designed by Phil Crump, is an ATMEGA328 based design which I’m more at home with (although the LPC180 was a breeze to program). I have made CFORD2 autonomous by providing a Lithium Polymer rechargeable battery fed with solar power from a panel affixed to a window as suggested by Phil.

UKHASNet Node CFORD2

UKHASNet Node CFORD2

This node, in common with CFORD1, samples temperature but also the voltage of the battery input to the node. Currently, both nodes are not calibrated so the readings may be very inaccurate but the interesting thing to observe is the trends and how they repeat day after day.

Just like the HAB Tracker CHEAPO, I decided to develop Phil’s circuit a little and add a breakout for the ATMEGA328 pins, a dedicated Temperature/Humidity sensor and include a GPS to avoid having to hard-code the Lat/Lon co-ordinates. I also chose to make the PCB in SMD to keep the boards small. I will be getting these PCBs fabricated in the near future.

UKHASNet GPS Node v1.1

UKHASNet GPS Node v1.1 Gerblook Preview

Phil’s firmware should run on this board with no change since it is much the same circuit that he designed. It just has a few extras which I will add code for at a later date. I have also designed a daughter board for minDUINO v1.6 boards to expand them into sensor nodes with a simple add-on.

minDUINO v1.6 UKHASNet Daughter Board

minDUINO v1.6 UKHASNet Daughter Board

Again, these are based on Phil’s circuit but the daughter board has no GPS on board. I will decide whether to get these fabricated after testing the full GPS Sensor node PCBs. At this point, I will also publish all the design files for the GPS Sensor Node.

 

 

 

 

Posted in Building, Design, UKHASNet | Tagged , , , , , , , , | Comments Off on Summer Developments

JOTA – 2014

This year, I’ve been invited to the Scouts JOTA/JOTI event on October 18 & 19th. JOTA (Jamboree on the Air) & JOTI (Jamboree on the Internet) organises Scouts all over the world to communicate via radio and the internet.

JOTA 2014 Flyer

JOTA/JOTI 2014 Flyer

Primarily, I was invited to launch a High Altitude Balloon for the Scouts to track and receive telemetry but I suggested that it might also be a good idea to get the Scouts to assemble a minDUINO to take home with them to aid their education in electronic engineering. It will also give them an introduction into microcontrollers and how they are programmed. I decided the minDUINO v1.6 was the best board to make a kit out of since it can be used as a general board, a programming board or for prototyping, with an inexpensive additional breadboard.

minDUINO v1.6 Powered

minDUINO v1.6

Making fifty kits of parts is a fairly costly proposition so I looked for a likely sponsor. The company I chose was RS Components. This is a very well established organisation, renowned for it’s quality products and first class customer service. I was extremely pleased to get a swift reply to my initial inquiry:

“We are always interested in supporting the Engineers of the future, especially in promoting an interest on Electronics. The Jamboree sounds very interesting and is something that we could possibly help with.”

I have since supplied RS Components with a full list of parts for the minDUINO v1.6 and they have them on order. I have also ordered the PCBs which are being fabricated by Hackvana as I type this article.

I am very much looking forward to making the kits up and especially looking forward to assisting the Scouts in building their minDUINOs. This is the sort of opportunity I would have relished as a young lad myself and I’m very happy to be contributing to the countries up and coming engineer base.

RS Components Banner

RS Components – New Products

Posted in Building, Events | Tagged , , , , , , , , , | Comments Off on JOTA – 2014