Skip to main content

Messages

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

Messages - NsN

1
Project logs / Some old and new dirty boards
I finally had some time to pay attention to some dirty boards I got.

One set is already a few months old, but there seem to be shortages of Atmega32u4s, so I only got around now:


This was from fairly early on, when there were some problems with the silkscreen being offset. The board itself is for an automatic flash / camera trigger, based on sound and light input. I'm trying to make it fairly Arduino compatible, so it can easily be re-purposed as interval / delay / laser tripwire/ etc. trigger. It has the standard Sick of Beige 50x50 dimensions.

The second one just arrived 1.5 weeks ago, along with a few neat goodies:


I tried to fit a couple of smaller projects on this.

Counterclockwise from the upper left:

A basic Attiny25/45/85 breakout board
Basically just an additional capacitor and reset pull-up, plus a header for madworms great programming adapter. In the footprint of a standard 8-pin DIP.

An attiny based I2C Infrared emitter / sender
Since most IR libraries make heavy use of timer interrupts, I've found it difficult to use them on the same microcontrollers with other timing critical libraries, like for example V-USB. I hope that this will be a simple way to add IR to any more complex project.

A bluetooth breakout board
A breakout board for this BLE modules from dealextreme.
I also toyed around with a different way to add pinheaders. In some very limited circumstances It could be beneficial to use rectangle headers as SMD instead of THT. It makes the board slightly smaller and frees space on the other side.

An USB cable quality tester
This was the main project for the PCB order.
Since USB has become the defacto charging standard for most mobile devices, I wanted a quick way to test old or cheap USB cables. This device will check for connectivity and shorts on the different USB signals, and the resistance of the power lines.

After a successful test it will show the maximum current (based on the allowable voltage drop) in rough categories of 0.5A, 1A and 2A. It will also show if a cable is charge only (data lines unconnected). The device has the SoB 5031 dimensions.

I hadn't really had time to write the necessary code for all of these yet (I have a previous version of the camera trigger), but hopefully I will be able to update this post in a few weeks.


2
General discussion / Re: DirtyPCBs.com updates
Just wanted to quickly check:

A combined layout like this one is allowed on the cheapest level, right?



No v-scoring or row of holes, just a meandering outline, to make separating the boards afterwards a bit easier.
4
CPLD programmable logic / Looking for working SVF upload tool
So I tried an Arduino with JtagWhisperer, and after sending the first 32 bytes it just seems to timeout.

Then I tried the OpenScheme SVF Player. Opening the interface, starting the bitbang mode and processing the svf file seem to work great. And I even get a "Complete - Programming successful" pop up, but the code on the CPLD doesn't seem to change.

Unfortunately I don't have a Bus Pirate. But I have a few Arduinos (with Atmega186, Atmega328, Atmega32u4), some FTDI converters from Sparkfun. An STM32F4Discovery, an LPCXpresso, a XMOS startkit, both MSP430 and C2000 launchpads, a XMC 1100 Go, an Open Bench Logic Sniffer and some assorted individual AVR and MSP430 ICs.

Can I use any of these boards to try and upload the svf file onto my XC9572XL breakout board?

As an alternative I'm considering using my Logic Sniffer as a simple dev-board, but I expect that I would need it as a sniffer during development.
6
Project development, ideas, and suggestions / Re: Two LEDs and an input on one pin: suggestions?
Second try, this time with a bit more sleep. It is still just a rough sketch, the values would probably need some adjusting.



The idea is to increase the voltage drop over the LEDs. Maybe it would work just by switching to a different color.

I did a very messy spice simulation.:



The important questions are:

- How big can this circuit be / at what point would it be easier to change something else to get a free pin.
- How much energy would be too much to waste.
- At which currents do your LEDs start to light up.
7
Project development, ideas, and suggestions / Re: Two LEDs and an input on one pin: suggestions?
I think this should work:



Use either the internal or an external pull-up for the button. As long as the pull-up is in the range of ~10kOhm, the wasted energy should be relatively low. A high resistance pull-up is also necessary to avoid LED1 from lighting up.

You should be able to detect the button just like normal, the same goes for the LEDs. Check the button, set the LEDs, wait for ~100ms. Reading the button should be so quick, that it shouldn't be noticeable.

The big flaw with this is, that there is a lot of energy wasted in R3 when the button is pressed. You have to fiddle with the resistance values carefully, to make sure that:

- The button can be read over the pull-ups
- The LEDs still light up
- The combined current won't exceed the maximum for the microcontroller.

R3 is necessary to avoid a short circuit when you try to light LED1, while the button is pressed.
8
General discussion / Re: Best cheap PCB service
My mini review:

I didn't have any project ready to try out the service, so I used an older design for my business card. While 1.6mm is far to thick for a real business card, the board has some neat features to test the service.

I got 15 boards back, 3 of those had some significant issue. But since I was left with 12 good boards, I'm fine with that. I figure the board house could just have kept those 3 boards and I would have been quite happy to get 12 boards instead of 10.



The soldermask and silkscreen look quite ok to me, there are a few small specks (1-2 on average) of silkscreen randomly scattered around, but not as bad as I would have expected.


(I manually adjusted the silkscreen to adhere to the minimum width, not sure if the fab does this automatically)

As you can see, there are some silkscreen alignment issues, the severity varies a bit from board to board, some a quite good, while others are very noticeable for smaller components.



On a few boards there are also problems with the drill alignment for vias, again this varies a bit from board to board, most are ok.




In general I would say that out of the 15 boards I got, at least 10 are electrically usable, and a few are also good looking. If you have very fine structures I would stick with OSH park, but for a first prototype, the quality is fine and the price (at least for shipping to the E.U.) is very good.

One big word of warning though:
All vias on my board had the soldermask removed.
In my original files half of the vias were tented and half weren't. In the boards I received no vias were tented anymore.
9
General discussion / Re: Best cheap PCB service
Quote
Along that line, it's interesting to note that 95% of our orders are non-us, maybe even more. Tons from Australia, tons from African and Europe.

I think a big reason for that is the free shipping option. If I use Elecrow, Seeed, iTead, etc. shipping is often $15-25, and as far as I know none of them offer free shipping anymore. OSH Park offers free shipping, but it is more expensive for anything over 4cm*4cm (and you only get 3 boards).

If you go with the free shipping, it usually takes 3-5 weeks, regardless whether its shipped from China or the U.S.. So for any larger project (and I've gotten used to the SoB sizes), your service seems to be the best option at the moment.


Quote
There could definitely be an opportunity to be the "OHS Park" of Europe or Australia.
Something like that has been started on a very popular German board (only in German, sorry), but as far as I know everything is still done manually.
In the same community there are also regular community orders at Mouser, since the shipping costs for orders less than $85 is $27. And $27 shipping for a $0.50 part just seems silly.

Btw, my boards arrived toady, and I'm quite happy with the results. I will give you a short review, as soon as I've cleaned up my workspace and made a few pictures.
10
General discussion / Re: Analyze temperature sensor RF 433.92MHz
This would be my interpretation:



I don't really know how to explain the different length. But if you consider the first 16 or so bits, it their value seems to increase with rising temperature.

Edit:
I just noticed all transmissions seem to end with a 1, maybe with a fixed length packet the transmission is ended with the last 1 and any remaining bits can be assumed to be 0.
11
General discussion / Re: Analyze temperature sensor RF 433.92MHz
I think another capture with a bigger temperature difference would be very helpful.

At the moment I would guess, that the signal is simply encoded as:

80ms High, 80ms Low = 0
80ms High, 80ms High = 1

But simply from that I can't really narrow down the data format.

Just for others here are both signals aligned:
12
Project logs / Re: Power Bar - A small breadboard power supply
I think the best way to make it more versatile is to have a small main board, and a well defined extension connector. One reason everything is so cramped, is to make it fit onto a breadboard. Just the USB connector and the barrel socket already take up 1/5th of the whole board. A molex connector would probably be another 1/5th.

At the moment it isn't very usable without an USB connection, but it would be reasonably easy to make an addon board with a display and some buttons to have a standalone version. Of course that wouldn't fit on a breadboard anymore, but maybe it would work with a Sick of Beige 5x5 size.

I've started looking into op-amp voltage regulators, and they seem reasonably simple. However I'm a bit lost trying to figure out which op-amp characteristics are important, so if anybody has some advice (or a good introductory text) I would appreciate it.

Oh, and at the moment both power inputs are fused with a generic 0.5 Amp polyfuse. But I'm not quite sure how fast that one is.
13
Project logs / Re: Power Bar - A small breadboard power supply
I would love some input from someone with more experience as well!

I'm trying to figure out where I got the circuit from, I'm fairly certain that it was some kind of DIY benchtop power supply. But that was a couple of month ago.

A quick LT-spice simulation gives me a 100mV difference between a 300mA load and a 30mA load at both 1.8V and 3.3V output. (with a steady PWM, no control loop). Of course this could be a lot better.

I'll add "investigating op-amp based design" to my ToDo list.

I can see a couple of different directions for this project. For a small breadboard-centric board, I would prefer to keep everything simple and cheap. But there is also room for a slightly larger version with its own display, dedicated controls and higher output current. (Not as big as usual supplies, but maybe in a SoB 5x5 size).

Another thing that I want to try are the STM32F2 series controller. The built-in DAC would eliminate the PWM worries and the 12-bit ADC would help as well. One reason I've stuck with AVR so far, is that the barrier to entry for people wanting to fork or contribute seems a lot lower.
14
Project logs / Re: Power Bar - A small breadboard power supply
Good question. The closest answer I have right now is "I'm not sure".

I'm not much of an analog guy myself, so I tried to stick with existing circuits. In theory the transistors should work reasonably well as regulators. And looking at it with my simple pocket osciloscope the change doesn't seem to extreme:



I basically connected the output of the regulator to a 56 Ohm load resistor and put a switch with a 10 Ohm resistor in parallel. The yellow signal shows the voltage on the 10 Ohm resistor, when I pushed the switch. The blue one is the output of the regulator.

However the measurements of the Atmegas ADC show some fluctuations of ~ 150-200mV when the additional load was switched:



I'll have to check which one gives the wrong results.


For smaller loads, here is the log of an Arduino playing the standard "Blink" sketch with an extra LED:
15
Project logs / Power Bar - A small breadboard power supply
This project is still very much a work in progress, but I'm looking for some early feedback.

Power Bar(working title)
The power bar is a small breadboard friendly power supply with three independent voltage regulators and built-in current monitoring.
The target applications are small, mostly digital projects, which don't need a large 0-30V, 6A benchtop power supply, but at the same time want something more adjustable than the simple 5V USB voltage.



Features (probably already working):
  • Three adjustable output voltages
  • V_in: 2V - 10V
  • V_out: 20mV to (V_in - 1.2V)
  • Output voltage mostly stable around +/- 10mV
  • Voltage monitoring at a 10mV resolution
  • Current monitoring at a 0.5mA resolution
  • I_max ~200 mA (depending on V_in and V_out)
  • USB interface for data logging and configuration
  • Software monitor to limit current (reaction time ~1ms)
  • Generic extension header with UART and I2C

Features (maybe in the future):
  • Software regulated constant current mode
  • Simulated soft start, noise, ...
  • Increased logging / monitoring speed when limited to one channel
  • Control software on PC
  • Extension header used for standalone / bluetooth version
  • Data logging as virtual keyboard
  • Arduino Leo compatibility (currently causes problems with high speed PWM)

Schematic


The power bar uses three transistor based linear regulators and an Atmega32U4. The regulators are controlled from the Atmega via the 10-bit high speed PWM (64 MHz counter). Voltage and current are monitored via the Atmegas 10 bit ADC. The voltage is reduced by an 1:4 voltage divider, the current is measured through a Texas instrument INA214 amplifier.





board files
code

Evaluation


The most limiting factor currently is the ADC. Due to the nature of the voltage regulators, their effective resolution depends on the input voltage. If V_in is 5V, each PWM step will change the output voltage by about 5mV. However, since the ADCs resolution is 10mV, this is the maximum precision theoretically possible. (In practice it is likely less).
For the current prototype, most resistors have a 1% variance, so current accuracy is even less.

While the PWM control is not entirely linear, it is fine enough to allow for a 10mV accuracy:


The PWM for voltage control works reasonably well, due to the high speed the signal is relatively smooth. However after a high-low transition, the voltage can oscillate by about 140mV for up to 120ns. After a low-high transition it can oscillate by about 260mV for up to 170ns. This seriously limits the usefulness, and will need to be investigated.



Future Work
There are quite a few things, that I would change in the next prototype
  • The status LEDs for each regulator are currently directly tied to the output. They should be controlled by the MCU, otherwise they won't light up for voltages less than 1.7V
  • The Extension header should have V_In pin
  • A TO 220 version or similar for higher currents
  • A more accurate ADC
  • Allowing the MCU to be powered not only from USB

Warnings
This is a very hobby-unfriendly board:
  • The Atmega32U4 in a QFN package is hard to solder without paste and hot air / reflow. Even if you can do it, the vias under the footprint can short to the chips ground plane. Consider adding additional silkscreen / protection.
  • The INA214 in SC70 are also relatively small and the board is tightly packed in some places.
  • The ISP header is a 50 mil version, using Madworms pogo pin adapter.
  • The linked code is straight from my development folder and pretty much a mess.
If you want to test the regulator for yourself, I recommend using the breakout boards I designed during the development:

Small regulator
Larger regulator
SC70/6 breakout board for the INA214

( ! ) 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.02052457936session_write_close ( )...(null):0
20.02082589552ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.02082590328Database_MySQL->query( ).../DatabaseHandler.php:119
40.06612729088Database_MySQL->error( ).../Db-mysql.class.php:273