Arduino-ish development board

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Arduino-ish development board

Post by dlh »

For the past couple of days I've been exploring the world of Arduino clones of which there seem to be nearly as many as there are distributions of Linux.

Never-the-less, I'm thinking of designing yet another Arduino form factor board but this one will use a ZX-328n which opens up the world of "shields" developed for Arduinos, clones (and clowns) for ZBasic users.

Preliminary thoughts are to socket the ZX-328n, perhaps with two crystals (& jumpers) so it could also be used with the Mega328P and Arduino code.

I'll use a USB-serial chip (again with jumpers for ATN) and get +5V from the USB bus. But, with a connector for an external 3.3V SMPS to supply any "shields" that use 3.3V.

I'm hoping to keep the cost as low as possible so it's attractive as a beginner type system to learn on as well as a way for the experts here to test some of the more esoteric shields. I've already designed a couple of ethernet shields that will work with it.

I thought I'd call it the Zardino.

Is this of interest to anyone?
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Re: Arduino-ish development board

Post by spamiam »

dlh wrote:Never-the-less, I'm thinking of designing yet another Arduino form factor board but this one will use a ZX-328n which opens up the world of "shields" developed for Arduinos, clones (and clowns) for ZBasic users.

Preliminary thoughts are to socket the ZX-328n, perhaps with two crystals (& jumpers) so it could also be used with the Mega328P and Arduino code.

I'll use a USB-serial chip (again with jumpers for ATN) and get +5V from the USB bus. But, with a connector for an external 3.3V SMPS to supply any "shields" that use 3.3V.
This sounds like a good idea, but you might have been scooped my Oakmicros to a degree. They have a 328n with USB. Not in a "shield" form factor, though. Don't see much value to 2 xtals. 14.7MHz seems fine to me. Doubt the oakmicros can source 3.3v....

How would yours be different from a regular arduino clone? You can reprogram an arduino CPU so you can use a different bootloader. Or you can use the arduino bootloader and give it a program that was not generated by the arduino programming language (AFAIK).

-Tony
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

1. I know very little about the Arduino which is partly why I'd like something I can understand for accessing the myriad shields out there. In just a couple of days I've come across 2-3 I'd really like to try. I'm 70 years old and in crappy health so I'm not eager to tackle a new environment/language.

2. The Arduino UNO uses 16MHz and I saw some discussion that it needed to be 16 or 8. Beyond that, see the first sentence of paragraph 1. Don suggested a socketed crystal but I worry about having none - especially after the Tasmanian Devil (aka as my 3 year old great-grandson) visits.

3. I'm not sure how it will be different from a regular Arduino clone nor do I know what regular means in this context. Like most open source projects it seems to be devolving towards chaos with many clones, not all of which adhere to Arduino pinouts etc. Of course, I'm proposing to add to that. :wink:

4. There's an Arduino clone http://www.ciseco.co.uk/content/?p=1563 that uses PIC and PICAXE. I also work with PICs so I might even try to adapt it to accept 28-pin PICs.

5. Hmmm, I wonder whether we could just change the UNO crystal and plug in a ZX328N? http://arduino.cc/en/uploads/Main/ArduinoUnoFront.jpg

6. What do you think of the name Zardino? :?:

PS: Hmmm, again. The UNO board is the first I've seen of what appear to be multiple resistors packaged into an 8 lead SMT package, saving lots of space. Any idea where to find such a critter?
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

One reason that Arduino may need 16MHz is that they are using an Atmel MCU as the USB-serial converter. That may need 16MHz.

A quick (confused) scan of the ATMega8U2 seems to indicate it needs 8 or 16 so I guess my quick fix isn't going to work.
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

dlh wrote:One reason that Arduino may need 16MHz is that they are using an Atmel MCU as the USB-serial converter. That may need 16MHz.
The crystal for the AVR-USB is separate from the crystal used for the mega328; they could be different. The Arduino code, however, is written specifically for 16MHz (although perhaps 8MHz on the original mega8-based Arduino). The mega328P is capable of running at 20MHz but that frequency is very difficult to adapt to in the Arduino code.
- Don Kinzer
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

dkinzer wrote:The Arduino code, however, is written specifically for 16MHz.
So all my efforts to convert my Arduino Uno have been wasted? :lol: I don't actually have a UNO but I can only see one crystal in the picture - I guess that little thingy next to the 328 with all the leads is an SMT crystal?. I also cannot find a schematic of that Uno, only ones that use SMT. I guess it's back to my original plan.
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

dlh wrote:So all my efforts to convert my Arduino Uno have been wasted?
Not at all. It would be fairly easy to convert the board for a ZX-328n. The latest Arduino Uno contains two AVR chips, one for the USB port and one for the Arduino.

The big crystal marked 16MHz is for the USB port. The Arduino ATMega328P has a resonator just above pins 9 and 10. There is room and holes for a regular 14.7456 MHz crystal. With a little bit of work it would possible to unsolder the resonator and replace it with a low profile through-hole crystal and two 27pF SMD caps e.g. Mouser 815-ABL-14.7456-B2.

I definitely recommend a crystal over a resonator for better accuracy. That is why they have to use a crystal for the USB part.
Mike Perks
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

mikep wrote:Not at all. It would be fairly easy to convert the board for a ZX-328n.

The big crystal marked 16MHz is for the USB port. The Arduino ATMega328P has a resonator just above pins 9 and 10. There is room and holes for a regular 14.7456 MHz crystal. With a little bit of work it would possible to unsolder the resonator and replace it with a low profile through-hole crystal and two 27pF SMD caps e.g. Mouser 815-ABL-14.7456-B2.

I definitely recommend a crystal over a resonator for better accuracy. That is why they have to use a crystal for the USB part.
Thanks, Mike.

Actually, I was being a bit crypto-ironic hoping to entice people to look at the link I provided to my very own vanity-Arduino clone design. :lol: I had come to the same conclusion and even ordered a Uno last night to try to figure out the crystal replacement details (the photo is too blurry for this detail) which you have now generously provided.

The only difficulty I see is configuring the Mega8U2 for the USB/voltage setup which from a quick look at the latest non-328P Uno schematic appears to be done via SPI. There's also the ATN issue but that might be solvable using the ZX API commands.

If these are solvable, I think this makes a superior approach to evaluating/developing shields as well as general ZX development/testing.

Well, there is another problem. I have a major project which has been on hold since Tibbo withdrew the EM202 three years ago, leaving me with about 100 mostly assembled PCBs that were a dead loss. About a year ago, they finally released a replacement (EM500) and just yesterday finally released a firmware upgrade to let it control their GA1000 WiFi card. I would like to spend my (perhaps short) time on that and on finalizing a couple of ethernet shield designs (one using the EM500/GA1000/SPI flash chip and one supporting three different ConnectOne modules - 2 WiFi, 1 NoFi).

@Don: Could downloading to this native code device be done via ICSP?
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

I got the irony but decided to reply in any case.

It looks to me that the Uno defaults to 5V from the USB (or external supply) so that shouldn't be a problem. There is a 3.3V regulator but it is limited to 50mA.

The reset circuitry looks like it should work. The only difference between the ZBasic and Arduino circuitry is the addition of an inverting transistor. The Oak Micros ZX-338nu circuit is ZBasic compatible and the exact same board (but different crystal) works with the Arduino (see Oak Micros om328p). The reset signal should work as the ZBasic host actually sends several pulses on the ATN line.

The hardest part is going to be unsoldering the resonator and then unfilling the solder bridges across the two holes for the through-hole crystal. Flux and desolder braid will help here. A hot air soldering station will make it easier to unsolder the resonator.
Mike Perks
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

dlh wrote:There's also the ATN issue but that might be solvable using the ZX API commands.
The Arduino Uno Reference Design contains circuitry to reset the mega328 on a transition of an output pin of the AVR USB chip. It is even annotated as "DTR". I suspect that this circuitry is compatible with the ZX ATN protocol.
dlh wrote:Could downloading to this native code device be done via ICSP?
The Arduino Uno Reference Design contains two 2x3 ICSP headers, one for the AVR USB chip and one for the mega328P. Each can be used to program the Flash of the respective chips. Note, however, that the first step in programming a device's Flash memory is to erase the entire chip thus losing the previous content including a bootloader, if present. That fact would prevent one from programming ZBasic-generated code into the mega328P. Further, the ZBasic compiler does not produce an output file that is compatible with ICSP programmers (i.e. a .hex file).
- Don Kinzer
spamiam
Posts: 739
Joined: 13 November 2005, 6:39 AM

Post by spamiam »

dlh wrote:PS: Hmmm, again. The UNO board is the first I've seen of what appear to be multiple resistors packaged into an 8 lead SMT package, saving lots of space. Any idea where to find such a critter?
It is called a resistor array. They may or may not be more cost effective than discrete resistors, and may or may not be more compact. Find them at Digikey, e.g. RAVF164DJT1K00CT-ND

As for designing your own Arduino-like device. Well, go for it! But I'd look for an existing device to buy, especially if I don't have a specific pin-out that you are looking for.

I have been looking for a reason to use the Arduino programming language, but have never found a good reason not to use the ZBasic language. That is unless I was planning on using plain old C. Maybe I am overly simplistic, but I have had no good reason to use any other device other than the Elba and Oak Micro devices. That is unless I was making my own special-purpose PCB with a plain old AVR on it (most recently a bench power supply controller: 5A/24V)

You should first determine what hardware you NEED, and what hardware you would LIKE. Then look at the existing devices and see if any of themn are close to what you want. When you look at the price of making your own, then you will buy one of the existing devices.

-Tony
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

spamiam wrote:As for designing your own Arduino-like device. Well, go for it! But I'd look for an existing device to buy, especially if I don't have a specific pin-out that you are looking for.
Well, that discussion is now mute given how simple it appears to convert the Arduino UNO to use a ZX-328n.

I also see no need to learn a new language so a Zuardinon appears to be the way to go.

When my UNO arrives I'll see whether the mods are beyond the skill-set and tool-set of a partially paralyzed, partially spastic but completely geezer.

Hmmm, wonder whether I can add OLEDs to change the artwork based on clock frequency. :lol:Here's yet another option. Had I seen it first I might not have ordered the UNO.
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

dlh wrote:... that discussion is now mute given how simple it appears to convert the Arduino UNO to use a ZX-328n.
I received my UNO and it turns out to be much more difficult than the discussion here indicated. The current (?) board UNO R2 has the surface mount resonator but there are no through holes that might accomodate a crystal nor any way to add caps as there is only a single SMT resistor across the resonator. Aside from the scarcity of Lilliputians to actually do the disassembly/assembly, I see no way to make this a DIY project accessible to all.

I have a Xino Atmel board coming. If it doesn't look fairly simple in terms of power and downloading circuitry, I think I'm back to doing my own. I can get 10 boards for about $65 plus S&H (if the CircuitMart special is still on) so it's not a major expense.
mikep
Posts: 796
Joined: 24 September 2005, 15:54 PM

Post by mikep »

Post a photgraph. I could probably do it with a cylinder crystal if necessary.
Mike Perks
dlh
Posts: 395
Joined: 15 December 2006, 12:12 PM
Location: ~Cincinnati

Post by dlh »

mikep wrote:Post a photgraph. I could probably do it with a cylinder crystal if necessary.
I don't have a camera at hand so a photo will have to wait. However, I'm really not looking for a one-off solution but for a general method that might help Don sell more ZX-328n chips.

I bought the UNO from Microcontroller Pros. Based on the on their site, I was expecting what was, apparently, the R1 version. Had I known then what I know now I would have bought the Arduino Duemilanove http://nkc-electronics.amazonwebstore. ... g_shopping which looks to be more-or-less what I was considering designing myself. It uses FTDI for USB and changing the crystal looks straightforward.
Post Reply