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

1
Web platform / Re: Getting started with microchips TCP IP stack
Thanks Ian.

I apologize for the delay and lack of any progress.
(I have just undergone surgery for my eyes and still recovering)

I am planning to get back to the web platfor soon.
I expect i should be up and experimenting by this weekend.

I ll keep that in mind while working on the web platform.
3
Web platform / Re: Getting started with microchips TCP IP stack
A quick question.

I did come across a post either in the forum or on the main blog which gave the memory addresses to be reserved if i am using the bootloader for programming the dsPIC, but i am unable to get the same post now.
I am using MPLABX.

Ian, can you kindly specify the reserved memory addressess, I am keeping the bootloader intact for its ease of use.

Thanks
4
Web platform / Re: Getting started with microchips TCP IP stack
thank you shuckc
its quite helpful.

i m still experimenting with microchips tcp ip stack
the recent pic24 post on the main page too was helpful to understand the web platform.

i ll graduate slowly over to contiki.

the main gap in microchips stack comes in the http programming.
i m still in the process of getting it to work properly.
6
Web platform / Re: Getting started with microchips TCP IP stack
Thanks Ian and dpropicweb

I guess i shall get cracking with whats already available here.
:-)

I have not at all looked at other alternatives what you suggested ian.
From what you guys have experienced which is a much easier, if not worthwhile, to pursue

Microchip TCP IP stack or a combination or uIP and FreeRTOS??

which is easier to understand and implement??
from a newbies point of view??
7
Web platform / Getting started with microchips TCP IP stack
Hello all..

i know this is a much asked question, but i d still ask it anyway.
I am more of a power electronics guy in embedded systems.

more to do with pwoer conversion and power control.
I did acquire a web platform long ago in hopes of using it in one of my pet projects.

Recently i got an idea for its usage.

Let me make it clear first.
I have ZERO experience in ethernet, tcp ip etc etc etc.

i did read mircochips tcp ip stack help file back to back (not thoroughly though) several times in the last week in hopes of trying to understand it.

First of, it is pathetically documented. a first time user will most probably throw his hands up in disgust at the apparent (lack of) user friendliness.

secondly there is still a very large slip between the cup and the lip between microchips stack and the web platform.

Well, this is not a rant. I am working on a project where i am using a large solar panel (100 watts) to charge a 12V 40 ah battery. This battery will be powering my clients networking hardware (2 fibre optic media converters, 2 8-port linksys switches and 1 16-port switch). The charger itself is intelligent 12V 6A charger, has a PIC controller for sensing the solar panel output, battery level, load current and charge the battery using PWM. the client is happy with the solution and the entire setup, but they have no way of checking the battery level without physically going to the field. The entire setup is self sustainant. My client is a ISP provider. There are already about two hundred such units on the field.

As a personal project, i wanted to upgrade the hardware, implement SNMP protocol using microchips TCP IP stack and plug a ethernet cable from the charger to one of the port switches on the ethernet switch, so that they could monitor the data of the charger over ethernet while in their offices. It is not a clients requirement but i did get this idea that i would like to try out. I have one of their pilot installations on the top of my office. :-D
Not for commercial purposes though, its all on my time and effort.

I do not know if its crazy or not but i wanted to see if i could achieve it.

As i mentioned earlier, i acquired a web platform a while back. i just wanted to see if i could get started on the tcp ip stack on the web platform.

but a week of reading and net trawling = zero progress.

microchips forums are but for the more seasoned pros out there who know what they are doing. i doubt if anyone will want to invest time and effort helping out a greenhorn in networking.

i just wanted to ask here if anyone can get me started with the stack.

You know, something like this
1> include these files
2> modify these #defines
3> customize these variables.
4> Write your html web page using these functions.
5> Arrange your main function like this.
6> Build and flash the dsPic.
7> Connect and run.
Voila!!

(Yes, i am that dumb when it comes to ethernet and no i have no shame in asking for help :-D )

I did get the web platform walkthrough up and running though.
Must say far more newbie friendly than microchip.

Is anybody here willing to walk a newbie through the steps?

Thank you.
8
General discussion / Re: ITead PCB Woes
@arhi

actually i did not face that problem with Seedstudio or iTead..
:-)

Einstein did..

agreed. professionally the volume makes the quality improve.

but look at this from this way with more and more individuals like ian, you and scores other who collaborate on wonderful projects like BP or OLS.
They are by no means a prototype runs even in small batches.
even 50 is a volume, so to speak.

i am not advocating any specific vendor or so..

i am just stating that slowly even hobbyists are moving into a small volume production runs..
if our outlook towards SW/FW can become more and more professional with each cycle then why cant our HW be upto the standards...
9
General discussion / Re: ITead PCB Woes
PS : While we are on the subject

I can happily run a test batch for DP and the users here if you guys are willing to experiment with them.

say a batch of 50 or so.

The SM is available only in green.
their capabilities are 8/8 double sided with 0.6 mm vias.
and the cost is 2C per sq cm with a lead time of 3 weeks for D/S and 10 days for S/S.

i d happy to ship them across if anyone wants to try them out...
10
General discussion / Re: ITead PCB Woes
Hello.

I d like to post my experience with PCB and the PCB service i use.
I give my PCBs at a place called Cosmic Engineering works.

I believe i did post about this in a previous post where Ian asked "which PCB service do you use"

the question of e-test did not come up then.

For any quantity above 100 the company itself provides a "BBT" i.e bare board test for free of cost.
I RARELY have had a board that had the BBT sticker  on it  and failed in the open/short test.
(In fact i have not had one failed board that passed the BBT test, nor ones that were NOT BBT tested that i took from them).

The cost :
20 $ for NRE steup costs.
and about 2C per sq cm for a run of 50 boards and gets lesser as the quantity increases.

Agreed, they are limited to 2 layers and 8/8 spec but they are thorough at what they do.
Of course my hobby PCBs are again home etched and i am talking about professional work here.

But then again it is immaterial for the PCB manufacturer whether it is for hobby or profession and the quantity has no bearing on the cost involved.

Regarding the cost of the service 99C for a 5x5 cm.

I feel that the cost should not be a direct bearing on our expectation on the quality of pcbs.
Just because we are paying less, i would not want to be offered any inferior quality.
I d rather pay a little higher and be assured of peace of mind and quality than be penny-wise, pound-foolish with the PCBs.
It is simply not worth it.

It is obvious in the pictures above that we are able to see an open trace, how about a multiple layer board (4/6/8/16) where the inner layers are not visible and we have an open or short.
( small chance of a hobbyist going for > 2  layer board but think from the volume work that itead studio does for others)

Some one has to take it up seriously with the PCB fabrication services.

I'd be wrong at the design end rather than pull my hair out for improper fabrication.

Dont get me wrong here but DP, sparkfun, seeedstudio all are professionals. Iteadstudio does not offer services as a favour to any of them. No reason why any of us who use their services  should settle for any less quality than outside. I'd rather they developed an alternate pcb services vendor.
11
General discussion / Re: Rotary Encoders - reading them with an arduino
So.. turns out there was a slight flaw in the logic.

The division by 2 is not the correct way of displaying the counter value.

Instead i chose to use another temporary variable then then increment or decrement it.

Since there are two statements  checking for direction of the encoder rotation the temporary variable will change by two counts instead of one.

Hence the value of (temporary variable)/2 is added to the counter value and the counter value is displayed directly.
The integers being signed take care of the +/- sign while adding the (temporary variable) /2 to the counter.

This is IMO a more appropriate way of displaying the value. I have updated the code above so that if anyone would like to test it then can do so without much confusion.
12
General discussion / Re: Rotary Encoders - reading them with an arduino
It is pretty obfuscated..
:-D
I should try my luck at the international obfuscated C code competition
http://www.ioccc.org/

Your version is very simple and easy to understand.
I ll try the behavior with your version and come back with the results.
:-)

The actual logic that takes the decision however is a compressed form of if-else statement in ternary form.
The logic XORs for each terminal transition and then XORS the flags set during the previous interrupt routine essentially checking for transitions, state of pins and flags four times in a detent-to-detent movement.
Overkill but does a fairly decent job eliminating half or spurious transition
13
General discussion / Rotary Encoders - reading them with an arduino
Hello all.

I have a project in pipeline that requires the use of a rotary encoder. There are a milliion tutorials out there on the web which show how to read an incremental encoder none worked for me.

After much net-(s)trolling and several semi-sleepless nights later i arrived a version that works with little glitches.
It detects the direction, increments the value by the correct count etc etc.

I would much appreciate it if others were to judge the code and the algorithm.

Of course it does not apply to other encoders but you are welcome to try and adapt it to suit your needs. Any feedback with your respective model of encoders ant the codes behaviour wrt the encoder is much appreciated and highly anticipated.

Thank you guys..



here is a link to the page where i have written my method of arriving at the code/algorithm.

http://https://sites.google.com/site/krishmindmesh/rotary-encoder-with-arduino

and here is the code itself.

Code: [Select]
#define PHASE_A 2
#define PHASE_B 3
#define LED 13

static int counter=0,previous_counter=0,temp_counter=0;
static int CW_A=0,CCW_A=0,CW_B=0,CCW_B=0;

void setup()
{
 
  pinMode(PHASE_A,INPUT);
  pinMode(PHASE_B,INPUT);
  pinMode(LED,OUTPUT);
 
  digitalWrite(PHASE_A,HIGH);
  digitalWrite(PHASE_B,HIGH);
  attachInterrupt(0,rotary_read_A,RISING);
  attachInterrupt(1,rotary_read_B,FALLING);
 
  Serial.begin(9600);
}

void loop()
{
  //wait here forever
 
  if(counter!=previous_counter)
  {
  Serial.println(counter);
 
  previous_counter=counter;
 
  }
  digitalWrite(LED,HIGH);
  delayMicroseconds(counter);
  digitalWrite(LED,LOW);
  delayMicroseconds(500-counter);
 
 
}

void rotary_read_A()
{
  delay(50);
 ((digitalRead(PHASE_A)^digitalRead(PHASE_B))==1)?CW_A=1:CCW_A=1;

  (CW_A&CW_B==1)?temp_counter++:temp_counter--;
  (CCW_A&CCW_B==1)?temp_counter--:temp_counter++;
  counter=counter + (temp_counter/2);
  temp_counter=0;
  CW_A=0;
  CW_B=0;
  CCW_A=0;
  CCW_B=0;
  return;
}

void rotary_read_B()
{
  delay(50);
 ((digitalRead(PHASE_A)^digitalRead(PHASE_B))==0)?CW_B=1:CCW_B=1;
  return;
}

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