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 - rohitdesa

1
Project logs / Re: Smoke Tester
Pointing out a boo-boo on the schematic - you want R9,R15,R16 and R8,R7,R12 to be 66.66kohm in parallel, so they need to be 200k resistors (as mentioned in the text above) and NOT 100k as marked on the schematic.
2
Project logs / Re: DimBlue - 16 channel light dimmer USB/Bluetooth
Nice! I especially like the wireless touch. I'm building something similar but DMX512 controllable. Schematics/layout? Would appreciate if you could point me to some info that shows how to 'properly' wire up triacs to a microcontroller.
3
Project development, ideas, and suggestions / Re: Long distance wired data comms
Thanks everyone for the replies and suggestions.
[quote author="Sjaak"]You can use a technique called csma/cd (carrier sense multiple access collision detect) to make it half duplex. This was also used by coaxial ethernet.[/quote]Wont this become quite complex?


[quote author="bearmos"]I doubt you'd have much luck with something single ended like I2C or one wire, considering the distance you're trying to cover and the possibility that someone is walking past with a two way radio, etc. It might work, but may not be reliable.[/quote]Yeah, I was worried about that. And two way radios are the least of my worries. Electric overhead cranes spitting out tons of EMI :-/ But I was going through Maxim's AN148 http://www.maxim-ic.com/app-notes/index.mvp/id/148 The make no real mention of it being useful in industrial environments. They do however have some nice techniques about improving noise immunity through the use of resistors/R-C filters, and also boosting the line drive capabilities of an MCU. I'm leaning more and more towards 1-wire.


[quote author="matseng"]The easiest way of having a "backchannel" would be a polling scheme. This particular application is not timing critical so the master could actually ask each slave device in turn if they have something to say. If the slave has something to send if would sent it when polled, otherwise it would either send a "null-message" to the master or just ignore the poll and let the master timeout after a few milliseconds.[/quote]I was thinking of using something like this. This seems like the easiest thing to do. Right now, my application has no requirement for duplex comms. But I'd like to keep the option open just in case monitoring is required.


[quote author="alanh"]Minus the power requirement, you could implement a serially chained connection scheme as well where each unit serves as an active relay to each unit down stream of it. If the message ID received is not for the given unit, it retransmits it out a matched out-bound port, etc.[/quote]I like the idea. But wouldn't this restrict me to chaining the devices serially? I wouldn't be able to implement branches easily. Or I'd have to add a 'priority level' to different branches.


[quote author="alanh"]Considering the power requirement, there are a number of mid-range MCUs that have Ethernet. Not sure what your infrastructure budget is, but a PoE switch would be ideal.[/quote]As matseng pointed out, this may turn out to be prohibitively expensive considering that the devices are simple displays.
4
Project development, ideas, and suggestions / Long distance wired data comms
OK, I know that this question has been asked multiple times, not just on this forum, but elsewhere as well, but since every issue has a different set of parameters, the problems are unique. So I'm going to ask it again :-)

I'm trying to design a 'stock level' display system for a warehouse. The warehouse has aisles with multiple racks and component bins. Each rack has about 10 bins. Each bin requires a digital display of the stock remaining. I require a total of about 150-200 display units.

For the display units, I had thought of using a PIC to drive 7seg displays. The PICs would be daisy-chained to a master which communicates the display quantity to each of the slaves. For now unidirectional comms are adequate, but providing a bidirectional system would allow for addition of sensors in future. I was thinking of using I2C for this, but noise and cable length are issues (the farthest bins will be 100m from the master). I also wanted to pass power (6-9v) along with the data cables (so I'd have just 4 cables -  Vcc, Gnd, SDA and SCL)

Yes, RS485 is an option, but if I'm not mistaken, RS485 drivers are not 'inherently' bidirectional. A DIR pin needs to be toggled. Also, cable complexity increases (differential pairs for SDA/SCL). What if I use a 'booster' every 10-15 bins? A simple line driver? Would this work?

Or is is better to use 1-wire? Speed is not really an issue - 20kHz data rate is more than adequate.

Basic requirements:
low parts cost - no expensive drivers, few components
low cable complexity - just 4 wires if possible
signalling speed not an issue
5
General discussion / Re: Hacking an HP media button strip
Vled (pin 5) seems to be different from Vcc. 7 is definitely ground. I've not managed to figure out which is which still, but I've decided to chuck the strip into the corner and pickup it up in a few weeks - I find that my mind generally works clearer after a short break from the problem :-P
6
Project development, ideas, and suggestions / Re: USB bootloader for PIC 2550. HELP
So I'm getting somewhere with this. I've kinda-sorta-maybe figured out how to fix this issue, but I'll need to play around with it more. Apparently PDFSUSB has an issue with parsing addresses generated by CCS-C and HiTech-C. On this thread http://www.microchip.com/forums/tm.aspx ... e=1#665743 the poster Jan mentioned earlier, that 'proper' files start with
Code: [Select]
:020000040000FA
So we have to convert the files into a format parse-able by PDFSUSB.
 

This post simply suggests editing the hex file and adding ":020000040000FA" to the code right at the top. This did NOT work for me. http://www.picprojects.ne.usbbootloader/index.html
 

This post also talks about a similar issue:
https://www.microchip.com.orums/m637968-print.aspx It suggests that the program 'hexmate' may be of help. Hexmate gets installed with HiTech-C compiler as one of the utilities.
http://forum.htsoft.com/a...topic=&Search=true
 

I used hexmate through a command line to convert my hex file to INHX032 format, which PDFSUSB can now parse properly. I used the command:
Code: [Select]
hexmate wrong.hex -format=INHX032 -Ocorrect.hex
That's 'INHX-zero-32', and '-O-for-orange-correct.hex'
 

I'm going to try calling hexmate from the CCS-C compiler's command line by appending to the optional switches. Or I may probably have to create a batch file to do this automatically. Dirty solution, but it may work.
8
Project development, ideas, and suggestions / Re: USB bootloader for PIC 2550. HELP
Apparently, the hex file generated by MPLAB + CCS-C (the compiler) is 'faulty'. I still don't know why, because this same IDE-compiler combination generates all my other hex files, including one where I have to reserve space, etc perfectly. Sh*t! I hate Murphy. :-/

Anyway, I've made ver 0 of the board. Threw it together with parts from the junk box. Used a PIC18F2550 as the controller. Here are top and bottom images.
[attachment=1]

[attachment=0]
I've encircled the interesting parts in the 'zoomed' portions.
  • Bottom left is the boost converter for backlight. Highlighted are the 100uH inductor, 2N7002 MOSFET, schottky diode, and the resistive divider for feedback to the ADC.
  • Bottom right shows the voltage dividers used to interface the 5v TTL of the PIC to 3.3v of the LCD. Each divider is made using a 2.2k and 4.7k resistor.
  • Top right shows the 3.3v LDO which feeds the LCD logic. I had a REG101-3.3 from TI lying about, so I slapped that on.

I used SMDs on the bottom for three reasons - to get a 'feel' of how small I could shrink the board, to see how heat dissipation on the boost converter and other things affect the board, and finally, since I've used components that are very similar to what is going to go onto the final board, I'd get a rough idea of layout considerations.
9
Project development, ideas, and suggestions / Re: USB bootloader for PIC 2550. HELP
The UBW bootloader firmware works just fine. Its a problem with parsing the addresses.

This hex, created in the output folder directly by my compiler (CCS-C invoked through MPLAB) is parsed wrongly:
Code: [Select]
:0408000018EF04F0F9
:08080800EA6A050EE96EEF50EB
:100810000EE00F0E016E006A002EFED7012EFBD7F0
:100820008F0E006E002EFED70000EF2EF2D7000CC8
:10083000F86AD09EEA6AE96AC150C00B0F09C16E1E
:10084000070EB46E93908A80C80E056EDDDF93901C
:0C0850008A90C80E056ED8DFF5D70300B3
:020000040030CA
:0E0000003FCF3E1E008781000FC00FE00F4073
:00000001FF
;PIC18F2550
;CRC=C9E3  CREATED="19-Jul-12 13:59"

Whereas this hex, created after compiling the same code, BUT by using the 'Export' option in MPLAB, parses and burns just fine.
Code: [Select]
:020000040000FA
:1008000018EF04F0FFFFFFFFEA6A050EE96EEF50F4
:100810000EE00F0E016E006A002EFED7012EFBD7F0
:100820008F0E006E002EFED70000EF2EF2D7000CC8
:10083000F86AD09EEA6AE96AC150C00B0F09C16E1E
:10084000070EB46E93908A80C80E056EDDDF93901C
:0C0850008A90C80E056ED8DFF5D70300B3
:00000001FF
10
Project development, ideas, and suggestions / Re: USB bootloader for PIC 2550. HELP
Something funny going on here - when I compile my code (using F10) a 'normal' 'expected' hex file is created. 0x0000-0x07FF are kept clear for the bootloader. Here's the hex file. Its a simple blink program.[attachment=1]

When I load this file into PDFSUSB this is what it looks like:[attachment=0]What's up with the abnormally high memory locations? Everytime I reload the *same unchanged* hex file (using the "Load HEX file" button", the locations change randomly. So at one time its 298AA0 then its 1A4240, then its something else.

When I load the hex, PDFSUSB tells me that the config data in the hex is different from the board's settings, so I click on 'Cancel'.

Also, if I use the 'Export' function in MPLAB to export the hex file from 0x800 to 0x7ffe, then this file works just fine with PDFSUSB.
11
Project development, ideas, and suggestions / USB bootloader for PIC 2550. HELP
Ok, its 3am and I've been working on a Nokia 6100 display controller based on the 18F2550. It's going to be part of a larger project, and I'll eventually switch to the 18F_J micros. But I have a 2550 at hand so I'm using it. I've tried like mad but I just can't seem to get the USB bootloader to work. I've tried 4 upto now - Diolan's, UBW, and Microchip's HID and CDC bootloaders.

Obviously, I have to mess with the linkers and modify a few ports here and there (no port D on a 2550). Diolan's just won't compile. UBW compiles, Microchip's HID and CDC both compile. The PIC gets detected by PDFSUSB and the HIDbootloader program. When I reprogram the PIC through the bootloader and then read it back through PDFSUSB, I find that no code has been written to the micro. On the other hand, the HID bootloader just locks up halfway through writing, and then the bootloader code gets corrupted.

Funny thing is that I used to use the USB bootloader about 2 years back with no problems. Then I switched to ds30Loader. Now when I want to get back I just can't seem to figure out what my issue is :-/

If by tomorrow morning some kind soul compiles a hex for me I shall be exceedingly grateful. If not, I'll just get back to it tomorrow - maybe my brain has just frozen.

PIC18F2550, bootloader entry through jumper to ground on RB7, (no EEPROM mark required - Diolan bldr), 20MHz crystal, no status LEDs required.
13
General discussion / Re: Powering Projects from Li-polymer cells
[quote author="hmms"]I really dont have the need to suck every ounce of power from the cell , anyways when the cell reaches 3.3v it almost 70% discharged . and i also dont need any higher voltages[/quote]Well in that case get a simple LDO, and you'll be good to go.

I haven't used the TPS61200, but I would simply follow the layout considerations given on page 17 of the datasheet. You don't really have very high current requirements so you could possibly get away with using thinner traces (and not soldering the exposed pad on the bottom of the QFN - though if you have a rework station, or a 'tawa' to make 'chappatis' at home, you could get the pad soldered pretty easily).

From the datasheet:
  • use wide and short traces for the main current path and for the power ground
  • place input and output capacitor, the inductor, and feedback resistors as close as possible to the IC
  • use a common ground node for power ground and a different one for control ground to minimize the effects of ground noise. Connect these ground nodes at any place close to one of the ground pins of the IC like so http://1.bp.blogspot.com/-rtKyra_oo44/T ... 600/g3.JPG This avoids ground shift problems, which can occur due to superimposition of power ground current and control ground current.
  • to reduce EMI make a ground plane bordering the entire switching section with just a wire going out for Vcc

Here are some interesting techniques and tips:
http://www.analog.com/static/imported-f ... unding.pdf
http://analogvsdigitalground.blogspot.i ... ounds.html
http://www.epanorama.net/documents/grou ... rcuit.html

These articles deal with 'digital' and 'analog' grounds - for your purposes 'digital ground'='control ground' and 'analog ground'='power supply ground'
14
General discussion / Re: BP on EEVblog
[quote author="ian"]but you know, it's Dave, and I want everything to be perfect[/quote]Haha, yeah. I've just registered on the EEVblog forum, and am really choosing my words really carefully there. There are a ton of smart, very experienced users there. I would *hate* to be picked on by them or Dave :-P
15
General discussion / Re: Powering Projects from Li-polymer cells
[quote author="hmms"]and the chip is pricey too! it costs like 225 INR a pop here in india(Approx 4 USD) on RS[/quote]Its a bit cheaper at Element14. 164 bucks each. Use http://www.kitsnspares.com to buy Element14 stuff in singles.

[quote author="hmms"]Thanks Guys! :) I settled for a sot23-5 LDO ,a tps76933 (3.3v at 100mA)from TI. It's supposed to have an insanely low Dropout of 71mV at 100ma. I havent verified those figures yet. But seems to work well in my application!
But i really miss the ULVO feature and other cool features of the tps61200! :(
I actually wanted to make a PCB for my project that would include the Chip for the power supply, And from What i've read on the web, SMPS design is all about layout and stuff While for Linear supplies design is pretty straightforward. So i think the LDO solves that problem too,Since i dont have any advanced tools like DSOs and Signal gens for Debugging the PCB!![/quote]
From your design decision I'm a bit confused as to what you're wanting to do. The TPS61200 is a booster-cum-down converter, so you could get 3.3v out even though your Li-ion input swings from 4.1v down to 2.5v. The TPS76933 is simply an LDO. You *can not* get higher output voltage from it. Once the output drops below 3.3V+71mV=3.371V, it's output will always be less than 3.3V.

Here are some LDOs I had selected for an earlier project of mine. A third of the cost of the TPS, but higher dropout voltage.
SI9183DT
TC1015
MCP1700

[quote author="Sjaak"]you can do a ulvo protection if you got a shutdown pin on your ldo. A voltage divider and a comparaotr would do the trick.
Most lipo batteries have a undervoltage protection build in, so it isn't necessary all the time. PLease check yours[/quote]This is a cool method. I used this very technique to implement low voltage protection on my device.

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