Skip to main content

Topics

This section allows you to view all Topics made by this member. Note that you can only see Topics made in areas you currently have access to.

Topics - frank26080115

1
Project logs / Simple 6x USB Charger with Current Monitor
This is a simple 6 port USB device charger with a individual current monitor on each port. The charging current is indicated using RGB LEDs. Blue means slow charge (under 250mA), green means 250mA to 750mA, red means over 750mA, and purple means over 1500mA (for tablets). This circuit involves an ATmega328P, INA169, and a OKR-T10-W12.



Full blog post on my website (including more pictures, schematic, code)

http://eleccelerator.com/simple-6x-usb- ... t-monitor/
2
Project logs / STM32F4 breakout board
I noticed the other LPC breakout board topic, I figure I could post mine



I really like the STM32 family of ARM microcontrollers. This breakout board is a narrow design that fits perfectly on a breadboard. Every pin is accessible. It has USB, a reset button, and a bootload button. The chip itself has a permanent USB bootloader that is activated by the bootload button. This means that no equipment is required to program this microcontroller, no expensive debugger, nothing at all except a USB cable.

design files are open source and can be downloaded, there is also a short video about the bootloader and more instructions: http://eleccelerator.com/stm32f4stamp-breakout-board/

I am also giving away blank PCBs to those interested (see "giveaway" on my page), Seeed makes more than I need, every single time
3
Project development, ideas, and suggestions / Nehebkau, Laptop Controlled Keyboard and Mouse
For fun, I designed a little USB device, actually it has two USB devices on a small board in the shape of a stick. Two USB capable microcontrollers are on this circuit. One will connect to the Raspberry Pi, and behave like a keyboard and mouse. The other will connect to my laptop. My laptop will run software that captures keystrokes and mouse events. The laptop will tell the microcontroller what to do, so when I press a key on my laptop, the Raspberry Pi thinks the same key is pressed. (and the same with the mouse)

Video: http://youtu.be/iXMBKlIrzQs



More info, pictures, and downloads at http://frank-zhao.com/index.php?page=nehebkau
4
Project development, ideas, and suggestions / Android ext. circuit, does not connect unless provided w/ 5V
My circuit involves an AVR microcontroller and a MAX3421E USB host interface IC. This IC is exactly the same one as what is used on the "USB Host Shield" and "Android Accessories Development Kit" for Arduino. The circuit is powered at 3.3V, not 5V, keep that in mind. The 3.3V supply comes from a LDO regulator that is actually connected to my Android smartphone's battery (I placed copper tape on the back of my battery, soldered to the terminals, the PCB has springed contacts that connect with the copper tape. The PCB is held to the battery securely because I 3D printed a phone case designed specifically for my PCB and phone. These steps are already done so it is too late to change the project approach regarding this).

Alright, so I've gotten code to work, I know the circuit works, the AVR is programmed, serial debug is working. I have a logic analyzer and checked that the MAX3421E is talking on the SPI bus and is initialized properly.

So I connect it to my smartphone. Keep in mind that since my circuit runs at 3.3V, with no possible source of 5V at this time. So even though GND, D+, and D- are connected to my smartphone, the 5V line is not connected.

The INT output of the MAX3421E does not show activity, meaning from the MAX3421E point of view, nothing has happened. I verified this by checking the D+ and D- USB signals. One of them should show a logic high indicating a connection (only one of D+ or D- depending on the USB speed classification), but none of them do.

Now I'm suspecting that I need to inject 5V into the 5V line to make the smartphone even bother to respond. When I connect it to a 5V external source, Android shows USB as connected, the battery as charging, and there is activity on the MAX3421E's INT signal and SPI bus. This confirms my suspicions. I did try injecting 3.3V instead but the phone does not respond to that.

I connect a DC/DC step-up converter circuit from the 3.3V supply to output 5V. It works and does successfully trick the smartphone into connecting via USB. But the step-up converter gets hot. It's rated for 200 mA, my 3.3V voltage regulator is rated for 300 mA. I did a measurement and the phone was pulling around 600 mA. This is unacceptable.

Through research, I read that I should not place DC/DC converters in parallel. So I have no way of simply increasing the current rating by placing anything in parallel.

I cannot use a bigger battery due to the 3D printed case.

I cannot constantly have an external source of 5V, the final device must be portable.

I know USB devices has to "negotiate" a charge current, in the USB descriptors, it tells the host whether or not it is self or bus powered, and how much current is required. Is there any way to tell the device to not take so much current?

From my knowledge of circuit theory I think there are no practical devices that can maintain 5V and yet still impose a limit on current without dropping voltage, such a device would break Ohm's law. But if I am wrong, please let me know.

Or... is this something that is controlled by the Android OS or a component of the Android OS?

I am using "microbridge" from http://code.google.com/p/microbridge/ which pretends to be a ADB server's TCP connection. I am running Android 2.3.3 I cannot use ADK since it is not supported. Yes I know ICS supports ADK but NO I cannot upgrade to ICS so that's not an option. I did try various ways of hacking ADK into 2.3.3 but had no success.

Another option is to simply get a new DC/DC converter with higher capacity and connect it to the phone's battery, in theory it should work but this is really inefficient. I want to leave this as the last option because it does involve more hardware hacking as opposed to a clean software solution.

EDIT, Progress
bNumConfigurations is only 1, which means I can't really tell the phone to use another current setting through software, and bMaxPower is reported to be 500mA
5
Project logs / Reflow Soldering Toaster Oven




As I get more serious into my electronics hobby, I need to work with more SMD components. Some component packages are very difficult or impossible to solder with a traditional soldering iron. To solve this problem, I decided to hack a toaster oven to become a reflow soldering oven.

Basically, to perform reflow soldering, solder paste is placed on a printed circuit board, and the components to be soldered is placed on top of the solder paste. When the oven heats the solder paste past the melting temperature, the solder paste melts and solders the component to the circuit board.

To control the oven's temperature, I created my own reflow toaster oven controller circuit. This circuit uses an ATmega32U4 microcontroller to monitor the oven's temperature using a thermocouple and AD595AQ, and then control the oven's heating element using a solid state relay. The controller features USB logging/debugging, USB bootloading, a graphic LCD display, and 3 buttons. The firmware features tweaking for all settings, manual temperature control, manual heating element control, and automatic temperature profile control (with a nice temperature history graph display). This circuit will plug into a wall outlet, and the oven will plug into this circuit, while the solid state relay basically acts as a switch between the wall outlet and the oven's heating element. Safety is the main design objective (but some things were limited by cost), and ease of use is the second objective.

Video, Pics, and More Instructions at Instructables: http://www.instructables.com/id/Hack-a- ... Soldering/
8
General discussion / how to select heatsink for solid state relay
I have a solid state relay that's rated for 220VAC and 25A, it'll be used to switch on/off a toaster oven's heating element. The toaster oven uses 1500 watts.
Here is the relay: http://search.digikey.com/scripts/DkSea ... =CC1006-ND

Digikey has a few heatsinks listed on that page with various "thermal resistance" measured in degrees C per watt

Or I can fold up some aluminum sheets to make my own heatsink

I also have a small fan (about 1" in diameter) that I can add to my design.

My questions are: Do I need a heat sink? If I do, how do I calculate the required "thermal resistance" I need using my specifications? Do I need that small cooling fan?
9
Project logs / ThingSpeak Contest
Hey guys, you might get a kick out of this

Quote
To celebrate our 300th ThingSpeak channel, we are announcing, “The Easiest Contest Ever”.

All you have to do is build a project using a ThingSpeak web service, take a photo (if it applies), and writeup a description / how-to on your blog, Instructables, or email us the details. We are giving away 20 gift certificates to SparkFun valued at $50 each.

http://community.thingspeak.com/2011/04 ... test-ever/

I have my entry here
Temperature Monitor: Using mbed, DS1620, and ThingSpeak
http://frank.circleofcurrent.com/thingspeak_mbed_tut1/

10
General discussion / Eagle CAD, Pad Name = Net Name Question
I made a bunch of parts in a library, I named some pins VCC, VDD, VIO, GND, and those are all pins marked as "pwr". When I placed the part into my schematic and then my board, they become automatically connected. I don't want this to happen as some devices are 5V and some are 3.3V. I don't want to rename the pins because they are supposed to match what's printed on the part exactly.

How do I tell Eagle to not automatically create nets for pin names?
12
Project logs / My mbed Base Station
Does anybody here use the mbed? I got one recently and it's really great for trying out ARM. The DRM on it is pretty bad though, and the online compiler isn't the greatest. However you can till build binaries using GNU offline if you really need to.

In the spirit of "I made this for myself but somebody else might want one"...



details and source files at

http://mbed.org/users/frank26080115/not ... e-station/
13
Bus Blaster JTAG debugger / Trouble Using OpenOCD for AT91SAM7XC512
I'm stumped on how to use OpenOCD and Bus Blaster to write to my AT91SAM7XC512

The document "using open source tools for at91sam7s cross development" appears to be very outdated as many of the commands have different parameters now. Many of the command names appears to have changed as well. Many guides I found are completely useless, since many of the commands they have used no longer exist, such as "jtag_device".

Running this in a cfg
Code: [Select]
interface ft2232
ft2232_device_desc "Dual RS232-HS"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0x6010

jtag_khz 30000

results in
Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x7f1f1f1f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x7f1f1f1f (mfg: 0x78f, part: 0xf1f1, ver: 0x7)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

and if I tie JTAGSEL to enable boundary scan

Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Warn : There are no enabled taps.  AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x0b63207f ..."
Warn : AUTO auto0.tap - use "... -irlen 2"
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Info : JTAG tap: auto0.tap tap/device found: 0x0b63207f (mfg: 0x03f, part: 0xb632, ver: 0x0)
Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

Note, my target is powered and appears to be responding, as I am able to see its identifiers
Also notice the line "Error: auto0.tap: IR capture error; saw 0x0003 not 0x0001"

From the OpenOCD manual says "The bit pattern loaded by the TAP into the JTAG shift register on entry to the ir capture state, such as 0x01. JTAG requires the two LSBs of this value to be 01."

So I added the line

Code: [Select]
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x7f1f1f1f
or if the jumper is in
Code: [Select]
jtag newtap at91samx512 cpu -irlen 4 -ircapture 0x1 -irmask 0x1 -expected-id 0x0b63207f

and then got

Code: [Select]
Open On-Chip Debugger 0.4.0 (2010-02-22-19:05)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.berlios.de/doc/doxygen/bugs.html
30000 kHz
Warn : at91samx512.cpu: nonstandard IR mask
Info : max TCK change to: 30000 kHz
Info : clock speed 30000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Warn : jtag initialization failed; try 'jtag init' again.
Warn : gdb services need one or more targets defined

I double checked the power, and also even tried 2000 kHz instead of 30000 kHz

Also note that I am specifying at91sam7x512 instead of at91sam7xc512 because OpenOCD told me I should (I forgot when I got an warning, but it did tell me to use x instead of xc)

it got the ID just fine at 30000 kHz, I think the speed and connections and power are all fine. I can still use SAM-BA with the TST and ERASE pins.

Can anybody help me simply write a .bin file into my AT91SAM7XC512?
14
Bus Blaster JTAG debugger / Longest JTAG Cable Possible?
Hey I got my V1, awesome. I got some flat cable and connectors and I'm wondering how long I can make the flat cable before running into problems?

How do I calculate this? In our power system class, we covered inductance and admittance of 3 phase transmission lines, I'm not sure if that kind of stuff will apply here.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01612460312session_write_close ( )...(null):0
20.01642591904ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01642592680Database_MySQL->query( ).../DatabaseHandler.php:119
40.06272731416Database_MySQL->error( ).../Db-mysql.class.php:273