Wednesday, October 15, 2014

Slightly Revised TPCBoard

After the physical build of my TPCBoard, I noticed a couple of changes that needed to be made.  They are slight, but I think they are nice...





I am out of the latching DPDT switches as well as LM7805 voltage regulators. So I will have to make an order pretty soon!.

I will try to upload this project files to my Github space later today.


Sunday, October 12, 2014

Weekend Update

As the weekend draws to a close, I guess I should show some of my work to the world...

TCP Board

The "Trinket Pro Clone" board is this silly idea I had to take the basic Trinket Pro and blow it back up to Arduino size.  What does that give us? It gives us another avenue to pursue akin to the Metaboard project... a somewhat-compatible Arduino clone that can be built at home for a few dollars.

What the Trinket Pro's bootloader gives us is another way to program the device via USB without the need for an USB-to-TTL Serial chip.  This method does not require a jumper to enable the programming mode.  In previous Trinket-fashion, the reset button is pressed to put the device into programming mode for 10 seconds.  The red LED on pin 13 will pulse to indicate that the device is ready to program... as a USBtinyISP.

Well enough talking... here are the pics and diagrams...






I decided to layout the board based on some basic changes to the schematic to match that of the Trinket Pro.  I did not even breadboard it to see if it would work.  Luckily, after a few false starts, I now have a Trinket Pro clone... with a standard R3 Shield layout.

I have included my DPDT latched switch to toggle the two pins used for RX/TX between the USB and the shield header sockets.  I have kept this on the right side, extending beyond the normal edge.  Otherwise, with no jumper to mess with... there was no reason not to switch back to the "left-sided Arduino".  Besides, the room was needed by the ICSP pin header... which I found was actually used on some shields.





Saturday, October 4, 2014

R3 Compatible Shield Adapter Shield

As I had noted earlier, some of my testing shield would not work, because the Fiverino had no ICSP connector on the right side.


So instead of immediately re-designing the Fiverino, I decided to build a simple shield that would make the Fiverino "compatible".  Here is the result...



Which is a simple board in itself... but very useful...


Here you can see me using the SD Card Shield with the Fiverino... success!

Sunday, September 28, 2014

I'm Back

Well I know it has been a while, but I guess I should give some update news.  This will be kind of unorganized but oh well... 

Fiverino News


  • I have two built boards of version 16 and have been using those for testing various shield and other projects



  • I need to upload the KiCAD files for version 13 to my Github account
  • The board itself works for me rather well.
    • The data line switch works nicely to free up pins D2 and D4 for normal use.
      • This allow me to use both the Relay Shield and the LCD Keypad Shield
    • I found I could use my USB-BUB FTDI Breakout to communicate with the Fiverino via
      • Pins 1 & 2 (Hardware UART ie. normal Serial)
      • Any 2 pins (via SoftwareSerial)


Shield Testing

Relay Shield
This is the Seeedstudio Relay Shield v2.0 that I picked up from Radio Shack.



This shield made me realize that the ICSP header was actually part of the standard footprint and that I had a problem fitting it on the the Fiverino.  Here was the problem...


Fortunately I the Relay Shield did not actually USE the header... so I simply removed the passthrough header after some wrangling with a soldering iron and some solder wick.  Unfortunately this would not always work.  My two lastest shields.... an SD Card Shield and a TFT Touchscreen Shield appear to USE the ICSP Header.

SD Card Shield




TFT Touchscreen Shield



These two shield do not work with the Fiverino because of the use of the ICSP connector. So I will have to go back to work.

If you remember, Version 13 did include an ICSP header... but it was in the wrong place.  Version 16 almost has enough room for the header... but then there is the wiring to think about.  Which brings me to my next topic.


Adafruit Trinket Pro

This great little board is basically the Trinket sized up to the full ATMega328  processor like a full Arduino.  What is of interest to me is the double-sized bootloader that supports normal serial programmiing via an FTDI interface (cable/board) as well as programming directly through as V-USB interface!   Yes this is the same as the Metaboard/Fiverino!

The only significant differences I could see was


  1.  Different PIN assignments for the USB data lines
  2. A double-sized bootloader
So what am I thinking?

Well if I use the Trinket Pro bootloader, I can get rid of the programming jumper.  That is one less reason to put all the logic on the right side of the Fiverino.  Could we move it back?


MISC News

I also went ahead and put together a simple RTC (Real-Time Clock) module for use with my boards.



It has made me think I would like to design a Fiverino-board compatible Data Logging Shield.  It would probably be better to wait until I just make the Fiverino closer to true R3 compatibility.


Monday, September 1, 2014

Labor Day Entry

It has been a while since my last post.  I guess I have been busy with other things, mostly stuff that I care not write about.

Here are some things I do want to talk about... 

Fiverino
(The Five-Dollar Arduino)

I have built a new version of my Metaboard Redux (Version 16) that has a few minor changes.

The most obvious change is the removal of the ICSP connector.  After some consideration it seemed superfluous for the purpose of the board.  What was added was Revision R3 compatibility of the shield headers.  This makes the Fiverino compatible with the latest shields.

Monday, August 11, 2014

Fiverino (Metaboard Redux Version 13) Final(?)

Just a quick post of my build over the weekend.  I now have Version 13 in the flesh!



So now I can do some full testing and development.  What are some projects that I could work on?

Thursday, August 7, 2014

Quick Update

While I wait to build Version 13, I will continue to revise the layout.  Here is the latest.


Some Thoughts:

  • Con: All the jumpers are required
  • Pro: Would be confusing to say some were "optional"
  • Only 7 or 8 really optional parts.  So why bother documenting them as optional?
    • ICSP Header (2x3 pin header)
    • Barrel Plug
    • Schottky Diode
    • 7805 Voltage Regulator
    • 10uF Capacitor
    • 220ohm resistor
    • 3mm LED
  • It's not that much different than version 11
  • I'd like the caps on the other side of the VR
  • There is no longer enough room for a big USB plug
  • I should mount one board with a small breadboard
  • I'm tired.


Tuesday, August 5, 2014

Version 11 and 13

I am currently working on the details for version 13 of the Fiverino...


I have marked the major reason for the revision.  As you can see, I have moved the reset button to the bottom left corner where it should be accessible... even with a shield installed.  I was having trouble reaching it in the last build (Version 11) and is probably my only problem with the board.


  • I was able to remove one jumper and minimize the lengths of the remaining ones.  There were also all made horizontal to keep the build clean.  
  • I did lose the Pin 13 LED all together and will have to clean up the schematic.  It just seemed excessive and simply a convenience.
  • I like the new position of the power LED.  It should be more visible and is close to the power circuit and the source jumper.
  • It was also essential that I keep the two 10uF caps (11mm high) as far away from the shield edge as possible.  They could prevent a shield from being able to be seated fully.

I'll have to cut some more copper clad blanks before I can build another prototype.  I'm a little tired of building right now so I will concentrate on using the boards for some projects that I have planned.

Monday, August 4, 2014

Evolution of a Board

Metaboard Redux Work

I have been working on my Metaboard Redux and it has been quite a challenge building a board that works well using the USBASP bootloader.  The primary challenge is handling the conflicts that arise from using digital pins 2 and 4.  Many shields will assume one or the other (or both) to be free.  There are two problems with this...

The first problem is that circuitry on a shield that uses pins 2 or 4 may cause communication issues, so before the device can be programmed, either the shield needs to be removed or anything using pins 2 or 4 should be disconnected.

The second problem is that the V-USB circuitry may cause the shield to fail because it is active even when there is no communications taking place.  This is a serious problem.  The Seeed Studios Relay Shield is one example of a shield that is incompatible with the normal Metaboard.

So to solve this problem, I am including a latching double-pole, double throw switch that can swap the two lines between the V-USB circuit and the two pin header slots.



While this makes for a simple solution, the wiring layout becomes more difficult.  It basically boils down to 4 jumpers that need to be added to break into the lines.


Coupled with the difficulty of the connections, I also had to place the switch outside of the area that would be covered by a shield.

The Right-Handed Arduino

If you were observant, you would have noticed the odd placement of the communication and power circuitry on the right side as opposed to the standard left.  I have decided that using the standard left-sided format is not the best placement for the Metaboard because of the need to access the programming jumper, the reset button and now the data line switch.  On the left side this pretty much means you have to remove any shield in order to program the device.  While in the long run this is not a show-stopping problem, you just have to keep removing and replacing the shield for each iteration.  With the right-sided solution and the data line switch, there is no longer a need to manually disconnect anything to re-program the device.




Miscellaneous

A couple of notes...

  • There are no mounting holes
  • Optional features
    • ICSP header
    • D13 LED
    • Power LED
    • Power Circuit

Thursday, July 24, 2014

Mid-Week Update

I'm still here... just a little tired.  I have not had much going on.  I haven't felt like programming and none of the hardware projects are that inspiring at the moment.  I have mustered some effort to rework my version of the Metaboard.





Which is quite a bit different than the weekend version.  I have managed all the desired changes and have cleaned and revised the traces several times.  I could only get by to a point and then I had to use wire jumpers.  Trying to keep them to a minimum was my goal but unfortunately to get all the features, I had to use several.

At a minimum 7 jumpers are required for the board to function.  5 more are required for full functionality.  By that, I mean I have designed the board with optional components.  For instance, the power LED and pin 13 LED and their associated resistors can be totally omitted and the board will still function.  The same goes for the ICSP header and the power supply itself.

As it stands, the parts cost is hovering around $5 dollars.

PartQtyPriceCharge
ATMega328P13.503.50
28 pin socket10.110.11
10 pin socket header10.110.11
8 pin socket header20.090.18
6 pin socket header10.080.08
16 mhz crystal10.100.10
22pF ceramic capacitors20.010.02
Zener Diode 3.6V20.040.08
68ohm resistors20.010.02
1.5Kohm resistor10.010.01
Latching DPDT10.080.08
USB Connector10.260.26
100nF ceramic capacitor10.010.01
Tactile pushbutton10.040.04
LM7805 Voltage Regulator10.230.23
10uF capacitors20.020.04
Schottky Diode10.060.06
Barrel Jack10.160.16
Red LED10.010.01
Green LED10.010.01
220ohm resistors20.010.02
5.13
(optional)-0.53
4.60

These prices are from Tayda Electronics which are the best I can find anywhere.  Of course you have to buy 10 of some items (resistors), but even then were talking just pennies.

So I will call this my little Fiverino... to honor the endless stream of stupid derivative names of a... stupid name.  Think of it as the big brother to the OSI microcontroller.






Sunday, July 20, 2014

Mid-Weekend Update

Well as Saturday comes to a close, I have some time too put down my thoughts.  

I have spent some time with my Metaboard Redux design... putting in the missing power supply.  Here is the first revision...



It's not that different, so I have held off on constructing it just yet.  Here are some outstanding issues...

  • Placement of the programming jumper.  It can be moved closer to the chip and freeing up the area by the USB connector.
  • Lowering the reset button to be aligned with the component array.
  • Both power sources are routed through the two filtering capacitors.
    • I have not had any problems not using the filtering caps
    • I could the make the power supply completely independent and therefore optional
  • The two LED are optional (done).
  • The Reset signal is not wired in the headers (oh well!?!)
  • Nice to have an ICSP header in the empty space (optional of course)
  • Data disconnect for the two USB data pins
So I still have some work to do!





Sunday, July 13, 2014

Metaboard Redux 1.0

Well as I look for new projects to work on, I have the time to work on stuff that I have been planning.  One of those projects was building a Metaboard... an Arduino clone that is very interesting to me.  It is similar to the series of Attiny85 micro-controllers I have been building, except that it uses the USBAsp protocol for programming.  So here is my version of the Metaboard...



Thursday, July 10, 2014

Wednesday, July 9, 2014

Light Alarm Sketch

I have been playing around with the Sound-Sensor board and finally have a simple "light alarm" working.

/*
  Light Alarm Delayed
  Version 1.0
  2014-07-01 J.G. Wezensky
  
  This sketch will use the light sensor to detect changes in lighting and sound an alarm
  if it changes beyond a pre-determined threshold.  The user can reset the accepted 
  value by clicking the button in the middle.  Then the user will have ten seconds before 
  the alarm is armed.
*/

const int LDR_PIN = 0;
const int SPEAKER_PIN = 3;
const int BUTTON_PIN = 1;

const long DEBOUNCE_DELAY = 40;
const int DEADBAND = 40;
const int ARM_DELAY_SEC = 10;

int lightSetting = 0;
boolean alarmSet = false;
boolean alarmTripped = false;

// tracks the left button
int buttonState;
int lastButtonState = HIGH;
long lastDebounceTime = 0;

float freq = 300;
const float freq_max = 500;
const float freq_min = 300;
float offset = 25;

void setup()
{
  // watch for pin to go to GND
  pinMode(BUTTON_PIN, INPUT);
  digitalWrite(BUTTON_PIN, HIGH);

  // use sound to indicate button press
  pinMode(SPEAKER_PIN, OUTPUT);  
}

void loop()
{
  // check the left button for a mode change
  int reading = digitalRead(BUTTON_PIN);
  if (reading != lastButtonState)
  {
    if (reading == LOW)
      Pressed();
    lastDebounceTime = millis();
  } 
  if ((millis() - lastDebounceTime) > DEBOUNCE_DELAY)
    buttonState = reading;
  lastButtonState = reading;
  
  int light = analogRead(LDR_PIN);  
  if (abs(light - lightSetting) > DEADBAND)
    alarmTripped = true;
  
  if (alarmTripped)
    Buzz();
  else
    noTone(SPEAKER_PIN);
}

// -----------------------------------------------------------------------------
// Processes the press of the primary button
// -----------------------------------------------------------------------------
void Pressed()
{
  int i;
  for (i=0; i<ARM_DELAY_SEC; i++)
  {
    Beep();
    delay(1000);
  }
  lightSetting = analogRead(LDR_PIN);
  alarmTripped = false;
}

// -----------------------------------------------------------------------------
// Audio feedback for button press
// -----------------------------------------------------------------------------
void Beep()
{
  tone(SPEAKER_PIN, 440, 50);
}

void Buzz()
{
  tone(SPEAKER_PIN, freq, 25);
  freq += offset;
  if (freq > freq_max || freq < freq_min)
    offset = -offset;  

}

You should be able to just copy and paste from above.  

Here is how you work it.  After you have programmed the above sketch into your Fidget, replace the Comm board with the Sensor-Sound Board.



Then connect the battery.  It should take a few seconds before the buzzer begins going off.  Now click the button in the middle.  The buzzing should change to a beep every second.  You have ten seconds to put the alarm in a box, drawer or some other enclosure before it becomes armed.  After that, if the light hitting the sensor changes... the buzzer will go off again.  To turn off the alarm, simply unplug the power.


Next Steps

So what's next?  I have a shipment of parts due Thursday that should contain the last batch of Attiny85 chips.  I have two extra and I think I may make two more ELF Tags.  For whom?  I don't know.  Maybe nobody.

Anyway, I have all these USB connectors and sound buzzers.  What should I do with them?  I guess I should consider what other parts I have as well.  Like these...


  • Light-Dependent Resistors
  • 5V-110V Relays
  • Real-Time Clock
  • LM386 OP-Amps

Oh well, at least I am not out a bunch of money!  

Fidget News

I created a new "starter" video for those guys that got a Fidget Micro-controller.


It's not very good at all, but at least it will help the guys get started.

OSI News

I also designed a new comm board for the OSI MIcro-controller.  Here it is compared to the old one...




The differences to note:

  1. Using a through hole version of the USB Mini connector
  2. Added a disconnect for the USB data lines
Although the disconnects make the board more complex to put together, it adds a valuable utility... allowing USB to just power the board.  This is great because you don't have to have a battery handy to develop and test sketches.  I use a Double-Pole Double-Throw latching switch but leave a set of poles open (using it effectively as a Double-Pole Single-Throw switch). Gee I hope that makes sense.