I have spent most of my time with micro controllers with picaxe, they are easy to learn, simple to use and can bring more than enough processing power for most things. However I have been thinking about updating some of my projects with more abilities and faster throughput. I have dabbled with Arduino a little - not enough to be that good with coding them. With that in mid I decided to have a look around at what else was out there.
One of the primary thing I wanted to do was speed up one project in particular, so naturally obtaining the fastest unit I could would be a good starting point. I arrived at the teensy 4, which not only offered the speed I was looking for, but also offers routes for upgrading in the future once the basics of the project are laid down.
The basics:
this is what I produced with PICAXE: https://picaxeforum.co.uk/threads/high-speed-photography.26768/
I have done some development to move the project along, but haven't actually gotten a full circuit design as I wasn't sure which direction I was going to go.
The original project required any sensors to be plugged into the main unit, this had the bonus of flexibility, at the cost of ease of use. this is also true with the auxiliary light that the unit can control.
Timing can also be inaccurate on the picaxe simply due to the tokenized interpreted coded system that it uses.
Further development:
I have done some further development, made use of a nextion display which helped to free up some code space.
I made use of the schematic diagram of this: https://learn.sparkfun.com/tutorials/sound-detector-hookup-guide
once that was made up I returned to using a comparator interrupt to trigger a response. The input from the mic/amp circuit is compared to the internal resistor ladder allowing the user to select the threshold of the input. This was done to allow other analogue sensors to be connected with as little additional circuitry as possible. The X2 series of PICAXE microcontrollers have 2 comparators to boot, so 2 sensors can be used at time. The plan was to have a light sensor on one, and the sound sensor on the other and the user can select either or both and the trigger level for them - imagine photographing a lighting/thunder storm.
Further to that, being able to have one start a timer, and the other stop a timer, calculate a speed and ask if it was faster/slower than the required amount before snapping a shot.
I also adding the ability for it to control time lapse.
Hopefully that covered everything I have so far in regard to the project to date.
I have already purchased a teensy 4.0 but have not done anything with it. I am still looking through all the documentation.
Although I still have a lot of research to do, I have noticed that it has the ability to deal with audio. I am assuming, that by comparison to, something similar to the spark fun unit and an interrupt, direct audio processing will be slow. This I think would be more prevalent as I don't actually need to do any frequency processing or filtering, just detect when the sound reaches or drops to a certain level.
From what I have seen so far there is a comparator to use - that all I know far.
However at his point I don't know if its worth while using an ISR or just continuously poll the ADC compare it a variable that can be set by a user interface of some description.
And finally, what are recommendations for writing code. As I said before, I don't have a massive amount of Arduino coding experience so I don't know if its going to be better to start a fresh with something closer to C than Arduino C.
Thanks for any thoughts on this, and I am happy to clarify anything and answer any questions/go over thing that I have likely missed.
One of the primary thing I wanted to do was speed up one project in particular, so naturally obtaining the fastest unit I could would be a good starting point. I arrived at the teensy 4, which not only offered the speed I was looking for, but also offers routes for upgrading in the future once the basics of the project are laid down.
The basics:
this is what I produced with PICAXE: https://picaxeforum.co.uk/threads/high-speed-photography.26768/
I have done some development to move the project along, but haven't actually gotten a full circuit design as I wasn't sure which direction I was going to go.
The original project required any sensors to be plugged into the main unit, this had the bonus of flexibility, at the cost of ease of use. this is also true with the auxiliary light that the unit can control.
Timing can also be inaccurate on the picaxe simply due to the tokenized interpreted coded system that it uses.
Further development:
I have done some further development, made use of a nextion display which helped to free up some code space.
I made use of the schematic diagram of this: https://learn.sparkfun.com/tutorials/sound-detector-hookup-guide
once that was made up I returned to using a comparator interrupt to trigger a response. The input from the mic/amp circuit is compared to the internal resistor ladder allowing the user to select the threshold of the input. This was done to allow other analogue sensors to be connected with as little additional circuitry as possible. The X2 series of PICAXE microcontrollers have 2 comparators to boot, so 2 sensors can be used at time. The plan was to have a light sensor on one, and the sound sensor on the other and the user can select either or both and the trigger level for them - imagine photographing a lighting/thunder storm.
Further to that, being able to have one start a timer, and the other stop a timer, calculate a speed and ask if it was faster/slower than the required amount before snapping a shot.
I also adding the ability for it to control time lapse.
Hopefully that covered everything I have so far in regard to the project to date.
I have already purchased a teensy 4.0 but have not done anything with it. I am still looking through all the documentation.
Although I still have a lot of research to do, I have noticed that it has the ability to deal with audio. I am assuming, that by comparison to, something similar to the spark fun unit and an interrupt, direct audio processing will be slow. This I think would be more prevalent as I don't actually need to do any frequency processing or filtering, just detect when the sound reaches or drops to a certain level.
From what I have seen so far there is a comparator to use - that all I know far.
However at his point I don't know if its worth while using an ISR or just continuously poll the ADC compare it a variable that can be set by a user interface of some description.
And finally, what are recommendations for writing code. As I said before, I don't have a massive amount of Arduino coding experience so I don't know if its going to be better to start a fresh with something closer to C than Arduino C.
Thanks for any thoughts on this, and I am happy to clarify anything and answer any questions/go over thing that I have likely missed.