Splashboard V 2.0 IoT


#102

I’m sorry to waffle on about processors, but I’ve been doing a project similar to this one and have made a breadboard that shows the Atmega644 could work for Splashboard v.2, given the specs above. It has:

  1. An LCD 16x2 display connected in 4-bit mode.
  2. An Xbee
  3. An RGB status LED
  4. Power LED
  5. 4 relay outputs
  6. 4 IO pins, of which one is PWM capable
  7. 6 menu buttons
  8. RTC
  9. EEPROM
  10. SD Card
  11. Piezo Sounder
  12. An I2C and SPI bus.

I can provide more details if anyone’s interested.


#103

We are very much interested Oscar! Please you can share more details. possibly even pictures of your prototype


#104

Just a by the way,

I have looked into the sources shared above and here is the justification of the circuitry encompassing the AVR RESET pin connection in Oscar’s Design.

Image source: http://www.atmel.com/Images/Atmel-2521-AVR-Hardware-Design-Considerations_ApplicationNote_AVR042.pdf

The zener diode D1 limits the RESET voltage relative to ground from rising too high, protecting the AVR against high voltage ESD (electrostatic discharge > https://en.wikipedia.org/wiki/Electrostatic_discharge ) which may otherwise destroy the chip in highly noisy environments. The zener diode should be placed as close to the RESET pin as possible in the physical board layout for effective operation.

The 100nF capacitor forms an additional LPF(Low pass filter) that reinforces the AVR’s internal RESET pin LPF in attenuating noise and voltage spikes riding in the RESET line preventing unintended RESET


#105

Morning Michael, you know what they say about 1000 words… :slight_smile:
View 1:

Some parts defined:

Red: Power supplies: 5v (supply needs upgrade after the Bee was added) for most components, and 3v3 for SD Card.
Blue: Extra pins for IO
Green: STK500 Programmer.

A different angle:

Note: The jumper wires have mostly no meaning WRT to color. I just used what I had.
The purpose of the board is to test out remote sensors connected using CAN. First I’ll connect by XBee to make sure all is working then replace it with a CAN interface.


#106

This is Great Oscar! Nice work there


#107

Tell me if i’m right - I can see the Atmega644 at the center of your board, EEPROM at the immediate Right, the RTC chip at the top right with a coin battery backup, menu buttons, xbee shield, LCD & buzzer at the bottom. 3v3 voltage regulator at the top left, SD shield… i am however buffled by the IC to the Left of the Microcontroller- above the menu buttons. Is it the analog multiplexer / PISO shift Register?


#108

Hi. Thanks for your interest. You are completely correct! The IC you see is a SN74HC165N, a parallel-load shift register. I’m using it to mux the buttons.


#109

Clever design. so are you sharing the SPI line with the SD card? or how are you going about it? one time i had some serious problem with the splash board when i shared the SPI line between the SD module and the SIPO shift register 74HC595 having one control line to select either of them (HIGH /LOW). the Library for the SD card brought alot of problems, i had to use 2 pins instead to control the two devices on the SPI bus for things to run


#110

I’m using the I2C bus for the EEPROM (http://www.microchip.com/wwwproducts/en/24LC256) and RTC (https://datasheets.maximintegrated.com/en/ds/DS1307.pdf). With I2C, you can supposedly chain up to 128 devices.


#111

Thats Right, I suppose 128 because of the 7 bit address space (2^7) . All the devices in the bus must have a special ID to be uniquely addressed by. The microcontroller as the Master and the rest of the peripherals, slaves

Image source: https://en.wikipedia.org/wiki/I²C


#112

Y. http://www.nxp.com/documents/application_note/AN10216.pdf

About the SPI connections. I was assuming that the SD SPI chip will disconnect MISO when CS is high. Apparently, this is not a guaranteed behavior. A better design needs pull-up resistors on all CS lines, as well as tri-state buffers where needed. (http://www.nxp.com/documents/data_sheet/74HC_HCT1G125.pdf). Thanks for catching that, Michael!
Ref: http://www.dorkbotpdx.org/blog/paul/better_spi_bus_design_in_3_steps

But,… "The ability to connect several devices to the same SPI-bus is based on the fact that only one master and only one slave is active at the same time. The MISO, MOSI, and SCK lines of all the other slaves are tristated (configured as input pins of a high impedance with no pullup resistors enabled). A false implementation (e.g. if two slaves are activated at the same time) can cause a driver contention which can lead to a CMOS latchup state and must be avoided. Resistances of 1 to 10kΩ in series with the pins of the SPI can be used to prevent the system from latching up. However this affects the maximum usable data rate, depending on the loading capacitance on the SPI pins."
http://www.atmel.com/Images/Atmel-2585-Setup-and-Use-of-the-SPI_ApplicationNote_AVR151.pdf Page 6.


#113

Good information Oscar, Thank you. We are all getting sharpened quite well on professional Hardware design


#114

Lets talk about the sound alarm system

I suppose the transistor circuit makes up a digital signal( tone ) current amplifier. The maximum current per pin from the micro-controller is about 40mA. We can have more current through the speaker (greater sound output) through this configuration. (should of course lie within the speakers absolute ratings)

ANALYSIS: The DC current gain the circuit:-
Transistor Base current (5v-0.7v)/3.3k = 1.3mA (current source from the microcontroller output pin)
Looking up the 2N3904 transistor’s datasheet, page 2 https://www.sparkfun.com/datasheets/Components/2N3904.pdf , the DC gain falls in the range of 80-100

if we take 80, collector current that drives the speaker; 80*1.3mA = ~100mA --> current Amplification achieved.

So, Oscar, Kindly allow me to ask. Why do we have Diode D7? -i’m wondering whether it may be for suppressing the flyback EMF generated from the moving coil speaker, Hmmm. can you share the datasheet of the speaker.? Thanks


#115

Hi. The purpose of the diode is to prevent the back EMF as you have stated, given that it’s a coil driven component.
The data sheet for the part is:

http://www.cui.com/product/resource/cem-1203-42-.pdf.

The sheet indicated an average coil resistance of 42R ± 6R. This would create a current of 5V/42R = 119mA, which is too high for the pins of the uC.

While pg 316 the ATmega 644 Datasheet of indicates that the absolute maximum rating of DC Current per I/O pin is 40mA, it also states that

“Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage
to the device. This is a stress rating only and
functional operation of the device at these or
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions for extended periods may affect
device reliability.”

So I like to keep current draw per pin at 20-35 mA, thus to reduce the current, I would use a resistor of 220R. 5V/220 = 22mA, which is ideal to me. However to reduce the noise while I breadboard, I overspecc’ed R16 to lower the volume.


#116

Hey guys,

Some very exciting learning here!

We have a meetup scheduled tentatively for 15th Oct. Is this the right time to start procuring components and plan to build/breadboard at the meetup?

What do you think?


#117

Hi sande, It is a very right time for that. I suppose we are now able to make a final design of the splashboard V2.0 going by the review and agreements above, then we can generate a BOM for purchase.


#118

CV with a Just a quick suggestion and question. I think replacing the LM7805CV with an LM78S05 would easily solve the power and current draw issues. Would there be another solution instead of using screw terminal blocks incase the prototype has to be fitted in a tight area.


#119

Hi, Chege. welcome aboard!. And Thank you for the idea. Going through the IC datasheets I can clearly see that the difference between the two ICs is that LM78S05 has increased current capacity (2Amps >> datasheet: www.soemtron.org/downloads/disposals/l78s12cv.pdf) as compared to the initial 78L05 which supplies only upto 1.5Amps https://www.sparkfun.com/datasheets/Components/LM7805.pdf

Oscar above also suggested another type of regulator that is of a different kind. LM2576 is a 3Amps Switch mode regulator that is extremely efficient in operation as opposed to the linear regulators like 7805 and such. It wastes very little energy in form of heat. (we may not even need a heat sink)
datasheet: http://www.ti.com/lit/ds/symlink/lm2576.pdf

We can possibly agree on one of the two and apply it


#120

So now, I would request that all of us in this platform make the final design schematic based on the reviewed changes above… once done we can paste the snapshots of the SCHEMATIC here. use whatever software you are comfortable with. I personally have a taste for KiCad when it comes to PCB design >> http://kicad-pcb.org/

NOTE: we are doing only the schematic first. then we generate the BOM for ORDER as we transition together to PCB design


#121

It’s great to move forward! Please provide the project’s list of finalized components to facilitate schematic design. Please note that there is no Arduino IDE support for the ATmega644. The closest IDE for it was the Arduino derived IDE created by the Sanguino Project. Though, it is possible to add custom AVR chip configurations to Arduino.