Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Sunday, March 27, 2016

SBC IoT

Single Board Computer for Internet of Things now are getting more popular since Raspberry Pi.  Now we can see even 64-bit SBC with less than $40 price tag!

Following is the list of SBCs I can think of:


MakerModelCPUPriceWebsiteMisc.
Raspberry-PiRPI1 Model A+BCM2835$25https://www.raspberrypi.org
Raspberry-PiRPI1 B+$35https://www.raspberrypi.org
Raspberry-PiRPI2 Model BBCM2836$35https://www.raspberrypi.org
Raspberry-PiRPI 3 Model B$35https://www.raspberrypi.org
Raspberry-PiZero$5https://www.raspberrypi.org
CHIPAllWinner R8 (ARM)$9http://www.allwinnertech.com
Pine64Cortex-A53 AllWinner A64$15 - $29http://www.pine64.com
FriendlyARMNanoPi 2 (I/O ports compatible with RPi)Quadcore A9$24.99http://www.friendlyarm.com
Texas InstrumentsARM TIVA LaunchPADARM Cortex M4F$12.99Datasheet
STM MicroelectronicsNUCLEO-F103RBARM Cortex M3$10.33Product InfoDev. Board is compatible with Arduino


I personally like the FriendlyARM as it is more open system than Raspberry Pi. Broadcom is known for being paranoid to reveal the details of their products as we can see from their datasheets. FriendlyARM is more community-friendly and provides a lot of stuff already. With the damn-cheap price and the board is ready out of the box (unlike Rpi which still needs flash card), this kit is very exciting, even more interesting than Arduino.

Wednesday, June 19, 2013

SPI on Arduino Nano v3.0

IC Package: 32 pin MLF



Arduino
Pin #
ATMEL 328P
 (MLF) pin#
ATMEL 328P
(PDIP) pin#
Label Function
D10 14 16 PB2 SS*
D11 15 17 PB3 MOSI
D12 16 18 PB4 MISO
D13 17 19 PB5 SCK


The problem is, according to Arduino Nano schematic, pin 13 is connected to LED through 330 ohm resistor in series.
To be able to use SPI correctly, we need to disconnect the LED.

Tuesday, June 18, 2013

Arduino Nano v3.0 with avr-dude



My order of two Arduino Nano-compatible v3.0 from eBay (shipped from China) just arrived. Also bought the USBASP USBISP AVR Programmer from eBay (about $3.0, from China too, see the picture on the left).


The good thing about this USBISP AVR programmer, besides the unbelievable price, I was told that it is  also compatible with avrdude, even Atmel AVR Studio (never tried it, thought)

But when I tried to program it with avr-dude, it always failed with various errors, such as:






avrdude: ser_recv(): programmer is not responding
avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer
or:
...
         Using Port                    : /dev/ttyUSB2
         Using Programmer              : avrisp
         Overriding Baud Rate          : 57600
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
...



I tried "-c arduino" without setting the baud-rate, I also tried different programmer type (stk500v2, etc.), nothing worked.  Turned out, the parameters combination I used was wrong.
In this case, the programmer should be "arduino" but the baudrate must be set to something (in this case, 57600).

The following is the correct one:


bash-4.2$ avrdude -c arduino -b 57600 -P /dev/ttyUSB2 -p atmega328p -vv -U flash:w:blink.hex

avrdude: Version 5.11, compiled on Sep  9 2011 at 16:00:41
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/etc/avrdude.conf"
         User configuration file is "/home/mlutfi/.avrduderc"

         Using Port                    : /dev/ttyUSB2
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "blink.hex"
avrdude: input file blink.hex auto detected as Intel Hex
avrdude: writing flash (1468 bytes):

Writing | ################################################## | 100% 0.41s

avrdude: 1468 bytes of flash written
avrdude: verifying flash memory against blink.hex:
avrdude: load data flash data from input file blink.hex:
avrdude: input file blink.hex auto detected as Intel Hex
avrdude: input file blink.hex contains 1468 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.30s

avrdude: verifying ...
avrdude: 1468 bytes of flash verified

avrdude: safemode: lfuse reads as 0
avrdude: safemode: hfuse reads as 0
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

Monday, May 27, 2013

MSP430 or PIC?

After sometime using LaunchPad, I was ready to buid my own board utilizing some msp430g2211 on breakout boards laying around on my workbench.  I was going to use the JTAG pins available to program them, but bumped with the overpriced USB-based JTAG programmers/debuggers available in the market.  Yes, I could use the LaunchPad to program these separate microcontrollers, but it's not a good and decent way.

I got a  msp430 BSL usb-to-serial programmer from eBay.  After reading the datasheet for msp430g2211, I realized these type of low-cost microcontrollers don't support BSL, either.  So the only way (other than wiring LauchPad to my protoboard) to in-circuit program the chips is to use a JTAG programmer.  That's a lame, as with PIC microcontrollers, I still could used my PicKit2 to program 44-pin 18Fxx chips.  Even AVR from Atmel could do the similar way using cheap programmer available on eBay or even BusPirate.

Well, sorry msp430, for now I am back to PIC as it has so many features I need (wide availability of PDIP footprints, wide I/O voltage (2 - 5 volt) and cheap programmer).  I am aware there are some open-source efforts to build this kind of programmer for msp430 (GoodFet is one of them, the pre-assembled board is sold at https://www.adafruit.com/products/1279#Technical%20Details)

Thursday, March 28, 2013

Raspberry Pi Rev 2.0 Pin headers

Got my new Raspberry Pi mode-B rev 2.0 yesterday.  After looking around the info about some new unpopulated through holes on it, finally I got all the info.  Here's the summary:

Silkscreen label: P2
It is a 1x8-pin connection for JTAG to the main SoC (Broadcom MCU).
Silkscreen label: P3
It is 1x7 pins to be used for JTAG header connected to the USB hub + ethernet chip.
Silkscreen Label: P5
2x4 pins.  It's for extra connection
Pin 1 (square solder plate): +5 V output
Pin 2: +3.3v
Pin 3: GPIO28 (can be configured as I2C's SDA)
Pin 4: GPIO29 (can be configured as I2C's SCL)
Pin 5: GPIO30 
Pin 6: GPIO31 
Pin 7 and 8: Ground

Silkscreen label: P6
1x2 pins.  For MCU reset (short them will reset the MCU)

By the way, here is the info about the board (I have no idea my the Hardware below shows BCM2708, not BCM28xx):

pi@raspberrypi ~ $ cat /proc/cpuinfo
Processor    : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS    : 464.48
Features    : swp half thumb fastmult vfp edsp java tls
CPU implementer    : 0x41
CPU architecture: 7
CPU variant    : 0x0
CPU part    : 0xb76
CPU revision    : 7

Hardware    : BCM2708
Revision    : 000e
Serial      : 00000000xxxxxxxx



Thursday, February 28, 2013

My SMT Soldering result

Using X-Tronic hot air iron station, I was able to solder some ssop ICs (mostly the tiny ms430 microcontrollers) to their breakout pcb. The ICs are free samples from Texas Instrements.

Not bad for such small devices. Look professional to me.





Monday, February 18, 2013

My new Workbench is ready


Finally, the SMT Soldering station "X-TRONIC 9020" I ordered from Amazon has arrived.  I did quick test on both hot air iron and the regular soldering iron.  Both now work fine.

Wednesday, February 13, 2013

New workbench for SMT works


My workbench (modification is still ongoing...waiting for the SMT solder tool to come.  My new multi-meter is not yet shown there).

Oscilloscope: 100 MHz Tektronix 2232 (spec) (bought it from eBay)
Digital Analyzer (bottom left): Tektronix 1241 (bought it from eBay)
Multi-meter: UT61C (with RS232C connection), and two others (older ones, not seen)
SMT Soldering station: X-Tronic 9020 XTS (not-seen).  Bought it from Amazon
Solder: Weller-SPG40 (on the bench) and SPG-100 (not seen as it is behind the lamp)
Power-supply: CircuitSpecialists CS11802X 0-18 V, 0-2A variable power supply
Vise: PANAVise
Small breadboard: TI msp430 LauchPad connected with my seven-segment circuit on breadboard
Board in the middle: PIC887A development board, measuring temperature and displaying it on the 16x2 LCD as well as sending the temperature to RS232.
Big breadboard: the old prototype of the same function as the PIC protoboard above.

Wishlist:
Digital Storage Oscilloscope with 100 MHz bandwidth
Higher frequency measurement for multi-tester (the UT61C freq. range is only 0-10 MHz, while UT61E has 0-220 MHz range)
Microscope 25-95x (this one looks cool for my bench, except I may not have space left)


Monday, January 28, 2013

Beckman 792 *** 661-1-R1K

It's a resistor array, each contains 1k resistor. The connection is:

Pin 16: common
Pin 1-15: individual resistor, each 1 kilo ohm.



Saturday, January 19, 2013

Roku 2 XS Internals





List of the chips inside:

  • BCM 59002 From Broadcom: Mobile Power Management Unit
  • SMC LAN 9512: Hi Speed USB 2.0 Hub and Ethernet controller
  • AKM 4430 ET: 3.3volt 2 bit Stereo Audio digital audio converter
  • BCM 4336 (inside the metal shield): Wireless LAN controller/transceiver
  • BCM 20702 (inside the metal shield): Bluetooth controller
  • TI 2051B:  Power distribution switch
  • Samsung K4P2G324EC: LPDDR2 RAM 2-Gigabit (512 MByte)
  • Hynix HY27UF082G2B NAND Flash (2Gbit - 256MB)
The CPU inside the SoC chip (BCM-4336), according to Broadcom website, is based on ARM Cortex-M3 architecture.  The chip integrates 802.11 a/b/g/n Wifi transceiver.