OT: Buying PIC's from Microchip Direct

Fletch

Member
Not exactly on topic but I need to buy some PICs to implement a project I found on the net. On Microchips site there is the option to buy chips direct but I notice at checkout that these are shipped from Thailand. Any idea how long shipping takes or how much is costs? Any good cheap sources of small quantities of PICs in the US?
 

manuka

Senior Member
How many ?

Semiconductor purchasing options usually relate to just HOW MANY you need. You'll further have to decide which PIC (of zillions on offer) you prefer. Firms such as MicroChip typicially find 1000 up orders trivial, & usually can't be bothered directly with small orders. However some often will just shoot you a few samples gratis ! Give yourself some techie title to smooth the approach. How does "Compliance Engineer" sound?

In fact retail PICAXE can be - gasp- cheaper than the equivalent raw PIC, & I guess just simply wiping the interpreter from an idle 08M may be viable!? Anyone actually done this ? Stan
 
Last edited:

Fletch

Member
The Microchip site deals in small quantities (in fact they only have 32 of the one I want in stock) and I need 5. I've found a design for a 6 channel PPM decoder online that I want to build and it uses a 16F676 PIC. I could recode the program in Basic for a Picaxe but I suspect the overheads of using basic will make the thing impractical.
 

womai

Senior Member
Actually I don't think there is any need for you to _buy_ them at all. Microchip has a very generous sample program and will send you samples within days (often as fast as 2-3 working days) even when you are just a hobbyist. No need for fancy job title etc. I have used them quite a few times so far and they never failed me. If I remember right you can order samples a maximum of 3 times per 3 month period, and each order can be up to 5 different devices, up to 3 of each.

Wolfgang
 

Tom2000

Senior Member
In the small quantities I buy, Microchip Direct ships in about a week to Seattle. Very reliable vendor.

Tom
 

Tom2000

Senior Member
Fletch,

My most recent shipment originated in Chacherngsao, Thailand, and was shipped Fedex 2nd Day Air. I threw away the paperwork, but as I recall, shipping was something like USD $7 on a $52 order.

Tom
 

Dippy

Moderator
The smallest order I've ever made was for 10 off dsPICs which were unavailable from usual UK distributors.
Freight charges were £12.44 and a handling fee was £5. Plus VAT. Arrived in 10 days.
(= 35 to 40 USD?)

Based on previous much larger orders which were quicker I guess sometimes they come from 'local' Microchip distributor - depends on your country I would imagine.


But let's remember this is a PICAXE forum eh?
 

Tom2000

Senior Member
Oops! I was *really* wrong. I just found the emailed invoice.

Shipping was $9.50 on a $40.24 order.

Tom
 

ylp88

Senior Member
I've bought very small quantities from them before - orders less than US$50. Shipping was around US$10 (I'm in Australia), but I'll have to check my receipts to give you and accurate amount. Shipped and received within 3 days.

I also had an order come yeserday which was slightly later as it contained some development tools (ICD2 and some PCBs) and shipping was US$18.00, which included shipping of 20 TO-92 devices from a different warehouse (ICs from Thailand, development parts from USA). Shipping within 2 days, neglecting the public holiday on Monday and the weekend.

ylp88
 

hippy

Technical Support
Staff member
In fact retail PICAXE can be - gasp- cheaper than the equivalent raw PIC, & I guess just simply wiping the interpreter from an idle 08M may be viable!? Anyone actually done this ?
It works with 18X but I've had no joy at all with 08's ( 'killed' and the programmer won't even initialise ) and expect the same problems with 08M's. It should be possible so it could just be the programmer / software I've used. P16PRO plus PicAllW. Microchip ICD / PicKit2 should work, but I've not tried that.
 

Wrenow

Senior Member
The Microchip site deals in small quantities (in fact they only have 32 of the one I want in stock) and I need 5. I've found a design for a 6 channel PPM decoder online that I want to build and it uses a 16F676 PIC. I could recode the program in Basic for a Picaxe but I suspect the overheads of using basic will make the thing impractical.
Fletch,

I may be able to save you a huge amount of time and trouble. First, are you trying to build a decoder for the Vex Robotics system receiver?

If so,
1) there are also instructions for making the decoder with the readily available SX chip on the AllElectronics.com site. Or a Dios version is shown at http://www.kronosrobotics.com/Projects/vexradio.shtml
2) Micron Radio Control sells a DSP decoder for your PPM stream as an upgrade to their DIY receivers for under 8 quid. http://www.micronradiocontrol.co.uk/kitreceivers.html#dsp
3) you can chuck the Vex RX and use the Microbotparts Micro (not the nano) receiver, at only $24.95 (uses the Vex RX crystals) if you only need channels 1-4 http://www.microbotparts.com/microbotparts.html
If you need all 6, he also sells a nice 6 channel version (for $29.95), but it is not on his web site - you have to e-mail him.
4) the Sombra Labs Shadow 3 gives you all 6 channels (it is a 7ch RX), and is synthesized (no crystals needed) and works seamlessly on 72 and 75 MHz. So does the SL-8 (8 channel). http://sombralabs.com/products.php
Both have different features - read carefully as to whether you want/need the programmer.

If not, 1) and 2) above still apply.

I know this does not answer the question asked, but perhaps answers the unasked question that prompted the asked one?

Cheers,

Wreno
 

hippy

Technical Support
Staff member
I've found a design for a 6 channel PPM decoder online that I want to build and it uses a 16F676 PIC. I could recode the program in Basic for a Picaxe but I suspect the overheads of using basic will make the thing impractical.
You never know; it may be incredibly easy with a PICAXE and not require sourcing components, hardware programmers and other software, let alone getting that to work. And there may be no need to learn Assembly language if you want to modify the design or improve it.

I think it's always better to start with - Can this be done with a PICAXE ? Someone may have done it already and could save you an awful lot of time and expense. Even if they haven't there may be a lot of advice; failures often reveal a lot more about problems and issues than success does.

It's always worthwhile explaining what you want to do first and worry about how to do it second. Even if a single PICAXE cannot do 6 channels of PPM decoding, you may have a design which is already distributed enough to allow each PICAXE to do its own decoding for its own channel(s). Even with a PICmicro or other micro based decoder it may still not be suitable for use within a PICAXE system.
 

Tom2000

Senior Member
You never know; it may be incredibly easy with a PICAXE and not require sourcing components, hardware programmers and other software, let alone getting that to work. And there may be no need to learn Assembly language if you want to modify the design or improve it.
Following Wrenow's info, I just looked at the Vex unit on the front page of the All Electronics site. (Thanks, Wrenow!)

While I was reading Jon Williams' description of the PPM signal, I was struck with just how simple it is to fan that out to four servos. The PPM frame contains all the timing you need; no fancy calculations required. Just switch appropriate outputs on and off when you receive the positive transitions. The receiver does all the hard work for you.

It seemed to me that an 18X is just right for the task. I don't think the PPM timing presents a challenge to the 18X at all.

$29.95... so tempting!

Tom
 
Quote:
Originally Posted by Fletch
I've found a design for a 6 channel PPM decoder online that I want to build and it uses a 16F676 PIC. I could recode the program in Basic for a Picaxe but I suspect the overheads of using basic will make the thing impractical.

The PPM is based on timing pulses that are in miliseconds, so would think think that Picaxe is more than capable. Having a high speed (20mhz) crystal osc, as opposed to an internal osc may make the input/output routines more predictable, especially if you try to use/decode all six channels. Using Basic should not be a problem, but having the ability to use microsecond delays, and being able to use word variables will make life easier.

A lowly 16f684 wil do the job for the aforementioned Vex transmitter receiver combo, although that will limit you to just a few extra spare inputs/outputs. These can be had at Newark for $1.39USD in quantity ones. Going thru the hassle for getting a few Microchip samples is moot at those prices.
 

Fletch

Member
Yes I was thinking of making a decoder for the VEX. If you think $29 is good I just bought 3 on Ebay for around $5 each. I need all six channels and there is a decoder available here

http://homepages.paradise.net.nz/bhabbott/decoder/rxdec6.asm

This is the one that used the 16F676 and in the notes the guy that wrote it said that timing was tight using that chip (which is why I didn't consider doing it with a PICAXE.)

If possible I would like to use a modified version of this code. It has some advantages like automatic glitch cancelling by reusing the previous frame if the current frame is damaged. I suspect this is where the extra processing is used that requires machine code.
I am aware that I can use some models of conventional radiocontrol receiver with the VEX transmitter but if I do it with a PIC I can make a custom decoder board (I would like channels 1-4 to run servos, 5 to trigger an intermitant relay and channel 6 to toggle a latched relay.)
 
Last edited:

BeanieBots

Moderator
For what it's worth, I've done it with a 28A using pulsin.
Only three channels though. One channel is purely as a monitor. If three consecutive signals are not within bounds then the radio is deemed "down" and appropriate action taken. The other two switch relays. Six further channels control servos but they are decoded by the radio Rx unit.
By only decoding the first 3 channels it gave me plenty of time to do what was required and missing a few frames did not matter because ultra fast response for the relays was not required.
Overclocking might be an option. Really depends on how much you want to "process" the signals and how much averaging/failsafe you want to build in.
 

Tom2000

Senior Member
I think something like the code posted below would work with the Vex receiver and a Picaxe 18X.

Fletch: $5? WOW! Even better than $29.95. I don't need one of these now, but if (or when) I ever do, I'm sure I'll be paying lots more.

Anyway, while I'm thinking about maybe buying one, here's some 18X code for you folks to consider. (and for hippy to prettify. :)

Have fun!

Tom


Code:
#rem

   PPM Servo Decoder - tjl 10/4/07
   
   Picaxe 18X, driven by Vex R/C receiver
   
   Input from receiver on pin1
   
   Servo outputs on out0 through out3
   
   Switch outputs on out4 and out5

   LED (active high) on out6
   
   This is just an idea; I don't have an R/C receiver
   available to test this concept.
   
#endrem 


  symbol PPM        = pin1
  symbol Servo0     = 0
  symbol Servo1     = 1
  symbol Servo2     = 2
  symbol Servo3     = 3
  symbol Sw1        = 4
  symbol Sw2        = 5
  symbol LED         = 6

  symbol sync_count = 50
  symbol breakout     = 100
  
  symbol sync_ctr   = b4
  symbol servo_ctr  = b5
  symbol breakout_ctr = b6
  
  


Main:

   setfreq m8
   
   low Servo0
   low Servo1
   low Servo2
   low Servo3
   low Sw1
   low Sw2
   

   do
	
get_sync:
	
      ; wait for sync:  5 mSec of steady space on PPM input
	
      sync_ctr = 0
      breakout_ctr = 0
      low LED

      do
		
         pulsout 7,20				; pause 100 uSec
	 if PPM = 0 then
	    inc sync_ctr
	 else
            sync_ctr = 0
	 endif
		  
      loop until sync_ctr = sync_count

      do
         pulsout 7,20
         inc breakout_ctr
         if breakout_ctr = breakout then goto get_sync
      loop until PPM = 1

      high LED
	   
      ; set the servos
	   
      servo_ctr = 0
	   
      do
	   
         ; wait for next servo command
	 do
	 loop until PPM = 1
	   
	 on servo_ctr gosub DoServo0,DoServo1,DoServo2,DoServo3
	   	
	 ; wait for end of marker pulse
	 do 
	 loop until PPM = 0

	 inc servo_ctr
	   
      loop until servo_ctr = 4
	   
	   
      ; switch 1
	   
      do
      loop until PPM = 1
	   
      low Servo3
	   
      pause 2
	   
      if PPM = 1 then
         high Sw1
      else
	 low Sw1
      endif
	   
      do
      loop until PPM = 0
	   
	   
      ; switch 2
	   
      do
      loop until PPM = 1
	   
      pause 2
	   
      if PPM = 1 then
         high Sw2
      else
         low Sw2
      endif
	   
      do
      loop until PPM = 0
	   
   loop
  
end



DoServo0:

  high Servo1
  
return



DoServo1:

  low Servo0
  high Servo1
  
return



DoServo2:

  low Servo1
  high Servo2

return



DoServo3:

  low Servo2
  high Servo3
  
return
 
Last edited:
If I had a do-over with a bare Pic, I would go with a 16f88 and a 20mhz crystal, instead of the 14 pin part (using an internal osc). The reason being that you wouldn't have to worry whether or not the osc is still calibrated, and the fact that the i/o pins are a little too precious.
 

Fletch

Member
Well I didnt really need 3..... but this is likely never to be repeated. The ones I have are packaged as second units for folks that build robots complex enough to need 2 operators. My guess is that they vastly over estimated the need for second remotes and liquidated the remaining stock. Right now on ebay the standard price of a transmiter receiver pair is $20 and if people have no starting price (like the ones I bought from) they sell for under $10.
 

Tom2000

Senior Member
That's pretty cool, Fletch, and good to know. I think I'll check the bay for a deal.

Out of curiosity, how are these things hooked up when used as designed? Does a standard robotic R/C receiver have an auxiliary PPM input? From the little I know about R/C stuff, it's not common to see a "naked" PPM port.

If you try the Picaxe code, be aware that error checking stuff needs to be inserted into each "do...loop until PPM = 1" to avoid servo runaway should the signal drop out at the wrong time.

Many thanks,

Tom
 

Fletch

Member
.

Out of curiosity, how are these things hooked up when used as designed? Does a standard robotic R/C receiver have an auxiliary PPM input? From the little I know about R/C stuff, it's not common to see a "naked" PPM port.
No it's not common. My understanding is that VEX went out of their way to make their stuff hard to use with off the shelf parts, their servos for example use none standard connections. These remotes connect to inputs in the VEX controller, that's a microcomputer box that controls the robot. I am told it has 2 PICs inside. Because they had a microcontroller available they chose to use it to decode the PPM.

This approach does have several advantages, for example you can remap channels in software. Two of the 6 channels are mapped to up/down buttons on the back of the transmitter, which in VEX could be used to work relays. As it happens that is exactly what I want to use them for too, hence my interest in making a custom micro based decoder.


If you try the Picaxe code, be aware that error checking stuff needs to be inserted into each "do...loop until PPM = 1" to avoid servo runaway should the signal drop out at the wrong time.

Many thanks,

Tom
I will wire it up and try it but I wont have a lot of time this weekend for debugging (working Sat, away part of Sun.)
 
Last edited:

Wrenow

Senior Member
Contrary to common belief, the Vex system is highly R/C compatible (though they like to claim the system is proprietary and give no info out). The servos and motors have what most people would call male (Bare pin) connectors instead of the more normal R/C standard of what most people would call female (pins plug into them), but in the R/C community are called male. They call the ones with pins (and a shroud) female. Do a gender swap and they plug in to regular R/C receivers and operate just fine. This change was made, I believe, not to make them "incompatible", but to make them easy to plug in to breadboards.

As noted in my earlier post, the easiest solution is to pick up a regular R/C radio receiver that works with it, and there are several. The microreceiver from http://www.microbotparts.com works with the Vex receiver crystals, and he has a 6 channel available for, I believe, $29.95. It is not on his web site yet, and you will have to contact him directly to get it. I have 4 so far. They are probably less than 1/4 the size of the Vex RX. Comparison pictures of the 4ch and 6ch with a standard sized servo and an MTroniks micro ESC are at:http://picasaweb.google.com/wrenow/ReceiverTest

Note: Not all receivers are compatible. These, and the ones mentioned earlier, are ones that are.

By the way, I picked up quite a few on E-Bay as well, but look at the shipping costs. My case of 6 from All Electronics had $7 shipping, or only a little over a buck a radio. Shipping for 5 from another source was over $9 per radio, and I have seen up to $20 for shipping on them from E-Bay. My last E-bay batch was 5 radios for about $57 all in, shipping and all.

There are some gotchas: They come in any frequency you want, as long as you only want Ch89. The TX modules are proprietary. Period.

But, on the other hand, 4 channel frequency kits are relatively cheap (if you get a radio, get at least Kit A, so you have 5 possible frequencies).

Why have I stocked up? Got a club full of ships, including 9 club ships operational, 4 operational personal ships, etc. The format and layout is great for our purposes, and the price is incredible. Plus, the radio makes a good donor if you want the gimbals, etc. for some other project.

I have done a review of the TX and the receivers for our newsletter. If there is interest, I could edit it a bit to relevantize it and post it here.

I have not tried decoding the PPM stream with a Picaxe, but keep in mind one thing, the timing. What a decoder does is just strip the pulses out, in order, to the various servo pins. As such, the pulse frame of 20ms is not an issue. However, if you try to read the pulse stream, fiddle with it, and then output the pulses, you might have trouble doing so within the frame unless you output the pulses in parallel. Even then, it might be "tight."

Or strip the pulses like a decoder. But, then, you wouldn't need a Picaxe, just a decoder chip/circuit. For a more complete discussion of R/C Decoder theory and circuits, see http://homepages.which.net/~paul.hills/Circuits/RxDecoder/RxDecoder.html

Cheers,

Wreno
 
Last edited:

Fletch

Member
Thanks for the links!

I know you can build a basic decoder with a 4017 and about 2 bucks worth of additional parts, the advantage of using a PIC is being able to make a more flexible output, not cost or ease of getting started.

If noone else minds I would like a link to your review.
 
Last edited:

Wrenow

Senior Member
It should be up on our web site in our newsletter in the next few days, I will be happy to link it. It is the September newsletter on the www.ntxbg.org web site. There are several tech articles which might prove useful on the site concerning R/C, ESC's, etc., if you are interested. In the meantime, if you can't wait, here are the PDF's of text of the Vex and Microbotparts articles.

You might want to keep the spares. For now anyway. Good repair parts, and nice donor radios for future projects. Can't beat the price.

Cheers,

Wreno
 

Attachments

Lliam20789

New Member
Microchip currently only accepts online sample orders from registered business or university email addresses. We currently do not accept orders from generic ISP accounts. Please do one of the following:

1. Register with a valid business or university email address and place your sample order
2. Visit www.microchipdirect.com to purchase parts

Thank you for your interest in Microchip.
 
Top